25 protected override void Down(MigrationBuilder migrationBuilder)
27 ArgumentNullException.ThrowIfNull(migrationBuilder);
29 migrationBuilder.RenameTable(
30 name:
"DreamDaemonSettings",
31 newName:
"DreamDaemonSettings_down");
33 migrationBuilder.CreateTable(
34 name:
"DreamDaemonSettings",
37 Id = table.Column<
long>(nullable:
false)
38 .Annotation(
"Sqlite:Autoincrement",
true),
39 AllowWebClient = table.Column<
bool>(nullable:
false),
40 SecurityLevel = table.Column<
int>(nullable:
false),
41 Port = table.Column<ushort>(nullable:
false),
42 StartupTimeout = table.Column<uint>(nullable:
false),
43 HeartbeatSeconds = table.Column<uint>(nullable:
false),
44 AutoStart = table.Column<
bool>(nullable:
false),
45 InstanceId = table.Column<
long>(nullable:
false),
46 TopicRequestTimeout = table.Column<uint>(nullable:
false),
47 AdditionalParameters = table.Column<
string>(maxLength: 10000, nullable:
false),
48 Visibility = table.Column<
bool>(nullable:
false),
49 DumpOnHeartbeatRestart = table.Column<
bool>(nullable:
false),
53 table.PrimaryKey(
"PK_DreamDaemonSettings", x => x.Id);
55 name:
"FK_DreamDaemonSettings_Instances_InstanceId",
56 column: x => x.InstanceId,
57 principalTable:
"Instances",
58 principalColumn:
"Id",
59 onDelete: ReferentialAction.Cascade);
63 $
"INSERT INTO DreamDaemonSettings SELECT Id,AllowWebClient,SecurityLevel,Port,AutoStart,HeartbeatSeconds,StartupTimeout,InstanceId,TopicRequestTimeout,AdditionalParameters,Visibility,DumpOnHeartbeatRestart FROM DreamDaemonSettings_down");
65 migrationBuilder.DropTable(
66 name:
"DreamDaemonSettings_down");
68 migrationBuilder.RenameTable(
69 name:
"DreamDaemonSettings",
70 newName:
"DreamDaemonSettings_down");
72 migrationBuilder.RenameTable(
73 name:
"DreamDaemonSettings_down",
74 newName:
"DreamDaemonSettings");