13 protected override void Up(MigrationBuilder migrationBuilder)
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
17 migrationBuilder.DropTable(
18 name:
"WatchdogReattachInformations");
20 migrationBuilder.DropColumn(
22 table:
"ReattachInformations");
24 migrationBuilder.DropColumn(
25 name:
"SecondaryPort",
26 table:
"DreamDaemonSettings");
28 migrationBuilder.RenameColumn(
30 table:
"DreamDaemonSettings",
35 protected override void Down(MigrationBuilder migrationBuilder)
37 ArgumentNullException.ThrowIfNull(migrationBuilder);
39 migrationBuilder.RenameColumn(
41 table:
"DreamDaemonSettings",
42 newName:
"PrimaryPort");
44 migrationBuilder.AddColumn<
int>(
45 name:
"SecondaryPort",
46 table:
"DreamDaemonSettings",
51 migrationBuilder.AddColumn<
bool>(
53 table:
"ReattachInformations",
58 migrationBuilder.CreateTable(
59 name:
"WatchdogReattachInformations",
62 Id = table.Column<
long>(type:
"bigint", nullable:
false)
63 .Annotation(
"SqlServer:Identity",
"1, 1"),
64 AlphaId = table.Column<
long>(type:
"bigint", nullable:
true),
65 AlphaIsActive = table.Column<
bool>(type:
"bit", nullable:
false),
66 BravoId = table.Column<
long>(type:
"bigint", nullable:
true),
67 InstanceId = table.Column<
long>(type:
"bigint", nullable:
false),
71 table.PrimaryKey(
"PK_WatchdogReattachInformations", x => x.Id);
73 name:
"FK_WatchdogReattachInformations_ReattachInformations_AlphaId",
74 column: x => x.AlphaId,
75 principalTable:
"ReattachInformations",
76 principalColumn:
"Id",
77 onDelete: ReferentialAction.Restrict);
79 name:
"FK_WatchdogReattachInformations_ReattachInformations_BravoId",
80 column: x => x.BravoId,
81 principalTable:
"ReattachInformations",
82 principalColumn:
"Id",
83 onDelete: ReferentialAction.Restrict);
85 name:
"FK_WatchdogReattachInformations_Instances_InstanceId",
86 column: x => x.InstanceId,
87 principalTable:
"Instances",
88 principalColumn:
"Id",
89 onDelete: ReferentialAction.Cascade);
92 migrationBuilder.CreateIndex(
93 name:
"IX_WatchdogReattachInformations_AlphaId",
94 table:
"WatchdogReattachInformations",
97 migrationBuilder.CreateIndex(
98 name:
"IX_WatchdogReattachInformations_BravoId",
99 table:
"WatchdogReattachInformations",
102 migrationBuilder.CreateIndex(
103 name:
"IX_WatchdogReattachInformations_InstanceId",
104 table:
"WatchdogReattachInformations",
105 column:
"InstanceId",