25 protected override void Down(MigrationBuilder migrationBuilder)
27 ArgumentNullException.ThrowIfNull(migrationBuilder);
29 migrationBuilder.RenameTable(
30 name:
"DreamMakerSettings",
31 newName:
"DreamMakerSettings_down");
33 migrationBuilder.CreateTable(
34 name:
"DreamMakerSettings",
37 Id = table.Column<
long>(nullable:
false)
38 .Annotation(
"Sqlite:Autoincrement",
true),
39 ProjectName = table.Column<
string>(maxLength: 10000, nullable:
true),
40 ApiValidationPort = table.Column<ushort>(nullable:
false),
41 ApiValidationSecurityLevel = table.Column<
int>(nullable:
false),
42 InstanceId = table.Column<
long>(nullable:
false),
43 RequireDMApiValidation = table.Column<
bool>(nullable:
false),
47 table.PrimaryKey(
"PK_DreamMakerSettings", x => x.Id);
49 name:
"FK_DreamMakerSettings_Instances_InstanceId",
50 column: x => x.InstanceId,
51 principalTable:
"Instances",
52 principalColumn:
"Id",
53 onDelete: ReferentialAction.Cascade);
57 $
"INSERT INTO DreamMakerSettings SELECT Id,ProjectName,ApiValidationPort,ApiValidationSecurityLevel,InstanceId,RequireDMApiValidation FROM DreamMakerSettings_down");
59 migrationBuilder.DropTable(
60 name:
"DreamMakerSettings_down");
62 migrationBuilder.RenameTable(
63 name:
"DreamMakerSettings",
64 newName:
"DreamMakerSettings_down");
66 migrationBuilder.RenameTable(
67 name:
"DreamMakerSettings_down",
68 newName:
"DreamMakerSettings");