26 protected override void Down(MigrationBuilder migrationBuilder)
28 ArgumentNullException.ThrowIfNull(migrationBuilder);
30 migrationBuilder.RenameTable(
31 name:
"DreamDaemonSettings",
32 newName:
"DreamDaemonSettings_down");
34 migrationBuilder.CreateTable(
35 name:
"DreamDaemonSettings",
38 Id = table.Column<
long>(nullable:
false)
39 .Annotation(
"Sqlite:Autoincrement",
true),
40 AllowWebClient = table.Column<
bool>(nullable:
false),
41 SecurityLevel = table.Column<
int>(nullable:
false),
42 Port = table.Column<ushort>(nullable:
false),
43 StartupTimeout = table.Column<uint>(nullable:
false),
44 HeartbeatSeconds = table.Column<uint>(nullable:
false),
45 AutoStart = table.Column<
bool>(nullable:
false),
46 InstanceId = table.Column<
long>(nullable:
false),
47 TopicRequestTimeout = table.Column<uint>(nullable:
false),
51 table.PrimaryKey(
"PK_DreamDaemonSettings", x => x.Id);
53 name:
"FK_DreamDaemonSettings_Instances_InstanceId",
54 column: x => x.InstanceId,
55 principalTable:
"Instances",
56 principalColumn:
"Id",
57 onDelete: ReferentialAction.Cascade);
61 $
"INSERT INTO DreamDaemonSettings SELECT Id,AllowWebClient,SecurityLevel,Port,AutoStart,HeartbeatSeconds,StartupTimeout,InstanceId,TopicRequestTimeout FROM DreamDaemonSettings_down");
63 migrationBuilder.DropTable(
64 name:
"DreamDaemonSettings_down");