239 lines
8.0 KiB
C#
239 lines
8.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace RMuseum.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class LimitedFieldLengths1 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "CoupletSummary",
|
|
table: "GanjoorVerses",
|
|
type: "nvarchar(4000)",
|
|
maxLength: 4000,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "UrlSlug",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(32)",
|
|
maxLength: 32,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Title",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(1500)",
|
|
maxLength: 1500,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SourceUrlSlug",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(16)",
|
|
maxLength: 16,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SourceName",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(64)",
|
|
maxLength: 64,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "RhymeLetters",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(64)",
|
|
maxLength: 64,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "PoemSummary",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(3000)",
|
|
maxLength: 3000,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OldTagPageUrl",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(32)",
|
|
maxLength: 32,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OldTag",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(16)",
|
|
maxLength: 16,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Language",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(8)",
|
|
maxLength: 8,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "FullTitle",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(1500)",
|
|
maxLength: 1500,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "CoupletSummary",
|
|
table: "GanjoorVerses",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(4000)",
|
|
oldMaxLength: 4000,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "UrlSlug",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(32)",
|
|
oldMaxLength: 32,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Title",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(1500)",
|
|
oldMaxLength: 1500,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SourceUrlSlug",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(16)",
|
|
oldMaxLength: 16,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SourceName",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(64)",
|
|
oldMaxLength: 64,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "RhymeLetters",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(64)",
|
|
oldMaxLength: 64,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "PoemSummary",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(3000)",
|
|
oldMaxLength: 3000,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OldTagPageUrl",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(32)",
|
|
oldMaxLength: 32,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OldTag",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(16)",
|
|
oldMaxLength: 16,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Language",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(8)",
|
|
oldMaxLength: 8,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "FullTitle",
|
|
table: "GanjoorPoems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(1500)",
|
|
oldMaxLength: 1500,
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|