31 protected override void Down(MigrationBuilder migrationBuilder)
33 ArgumentNullException.ThrowIfNull(migrationBuilder);
35 migrationBuilder.RenameTable(
36 name:
"ReattachInformations",
37 newName:
"ReattachInformations_down");
39 migrationBuilder.CreateTable(
40 name:
"ReattachInformations",
43 Id = table.Column<
long>(nullable:
false)
44 .Annotation(
"Sqlite:Autoincrement",
true),
45 AccessIdentifier = table.Column<
string>(nullable:
false),
46 ProcessId = table.Column<
int>(nullable:
false),
47 Port = table.Column<ushort>(nullable:
false),
48 RebootState = table.Column<
int>(nullable:
false),
49 LaunchSecurityLevel = table.Column<
int>(nullable:
false),
50 CompileJobId = table.Column<
long>(nullable:
false),
54 table.PrimaryKey(
"PK_ReattachInformations", x => x.Id);
56 name:
"FK_ReattachInformations_CompileJobs_CompileJobId",
57 column: x => x.CompileJobId,
58 principalTable:
"CompileJobs",
59 principalColumn:
"Id",
60 onDelete: ReferentialAction.Cascade);
64 $
"INSERT INTO ReattachInformations SELECT Id,AccessIdentifier,ProcessId,Port,RebootState,LaunchSecurityLevel,CompileJobId FROM ReattachInformations_down");
66 migrationBuilder.DropTable(
67 name:
"ReattachInformations_down");
69 migrationBuilder.RenameTable(
70 name:
"ReattachInformations",
71 newName:
"ReattachInformations_down");
73 migrationBuilder.RenameTable(
74 name:
"ReattachInformations_down",
75 newName:
"ReattachInformations");
77 migrationBuilder.RenameTable(
78 name:
"DreamDaemonSettings",
79 newName:
"DreamDaemonSettings_down");
81 migrationBuilder.CreateTable(
82 name:
"DreamDaemonSettings",
85 Id = table.Column<
long>(nullable:
false)
86 .Annotation(
"Sqlite:Autoincrement",
true),
87 AllowWebClient = table.Column<
bool>(nullable:
false),
88 SecurityLevel = table.Column<
int>(nullable:
false),
89 Port = table.Column<ushort>(nullable:
false),
90 StartupTimeout = table.Column<uint>(nullable:
false),
91 HeartbeatSeconds = table.Column<uint>(nullable:
false),
92 AutoStart = table.Column<
bool>(nullable:
false),
93 InstanceId = table.Column<
long>(nullable:
false),
94 TopicRequestTimeout = table.Column<uint>(nullable:
false),
95 AdditionalParameters = table.Column<
string>(maxLength: 10000, nullable:
false),
99 table.PrimaryKey(
"PK_DreamDaemonSettings", x => x.Id);
101 name:
"FK_DreamDaemonSettings_Instances_InstanceId",
102 column: x => x.InstanceId,
103 principalTable:
"Instances",
104 principalColumn:
"Id",
105 onDelete: ReferentialAction.Cascade);
108 migrationBuilder.Sql(
109 $
"INSERT INTO DreamDaemonSettings SELECT Id,AllowWebClient,SecurityLevel,Port,AutoStart,HeartbeatSeconds,StartupTimeout,InstanceId,TopicRequestTimeout,AdditionalParameters FROM DreamDaemonSettings_down");
111 migrationBuilder.DropTable(
112 name:
"DreamDaemonSettings_down");
114 migrationBuilder.RenameTable(
115 name:
"DreamDaemonSettings",
116 newName:
"DreamDaemonSettings_down");
118 migrationBuilder.RenameTable(
119 name:
"DreamDaemonSettings_down",
120 newName:
"DreamDaemonSettings");