24 protected override void Down(MigrationBuilder migrationBuilder)
26 ArgumentNullException.ThrowIfNull(migrationBuilder);
28 migrationBuilder.RenameTable(
29 name:
"DreamDaemonSettings",
30 newName:
"DreamDaemonSettings_down");
32 migrationBuilder.CreateTable(
33 name:
"DreamDaemonSettings",
36 Id = table.Column<
long>(nullable:
false)
37 .Annotation(
"Sqlite:Autoincrement",
true),
38 AllowWebClient = table.Column<
bool>(nullable:
false),
39 SecurityLevel = table.Column<
int>(nullable:
false),
40 PrimaryPort = table.Column<ushort>(nullable:
false),
41 SecondaryPort = table.Column<ushort>(nullable:
false),
42 StartupTimeout = table.Column<uint>(nullable:
false),
43 AutoStart = table.Column<
bool>(nullable:
false),
44 InstanceId = table.Column<
long>(nullable:
false),
45 HeartbeatSeconds = table.Column<uint>(nullable:
false),
49 table.PrimaryKey(
"PK_DreamDaemonSettings", x => x.Id);
51 name:
"FK_DreamDaemonSettings_Instances_InstanceId",
52 column: x => x.InstanceId,
53 principalTable:
"Instances",
54 principalColumn:
"Id",
55 onDelete: ReferentialAction.Cascade);
59 $
"INSERT INTO DreamDaemonSettings SELECT Id,AllowWebClient,SecurityLevel,PrimaryPort,SecondaryPort,StartupTimeout,AutoStart,InstanceId,HeartbeatSeconds FROM DreamDaemonSettings_down");
61 migrationBuilder.DropTable(
62 name:
"DreamDaemonSettings_down");