13 protected override void Up(MigrationBuilder migrationBuilder)
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
17 migrationBuilder.DropForeignKey(
18 name:
"FK_CompileJobs_Jobs_JobId",
19 table:
"CompileJobs");
21 migrationBuilder.DropForeignKey(
22 name:
"FK_CompileJobs_RevisionInformations_RevisionInformationId",
23 table:
"CompileJobs");
25 migrationBuilder.DropForeignKey(
26 name:
"FK_RevInfoTestMerges_TestMerges_TestMergeId",
27 table:
"RevInfoTestMerges");
29 migrationBuilder.DropForeignKey(
30 name:
"FK_TestMerges_RevisionInformations_PrimaryRevisionInformationId",
33 migrationBuilder.AddForeignKey(
34 name:
"FK_CompileJobs_Jobs_JobId",
37 principalTable:
"Jobs",
38 principalColumn:
"Id",
39 onDelete: ReferentialAction.Cascade);
41 migrationBuilder.AddForeignKey(
42 name:
"FK_CompileJobs_RevisionInformations_RevisionInformationId",
44 column:
"RevisionInformationId",
45 principalTable:
"RevisionInformations",
46 principalColumn:
"Id");
48 migrationBuilder.AddForeignKey(
49 name:
"FK_RevInfoTestMerges_TestMerges_TestMergeId",
50 table:
"RevInfoTestMerges",
51 column:
"TestMergeId",
52 principalTable:
"TestMerges",
53 principalColumn:
"Id");
55 migrationBuilder.AddForeignKey(
56 name:
"FK_TestMerges_RevisionInformations_PrimaryRevisionInformationId",
58 column:
"PrimaryRevisionInformationId",
59 principalTable:
"RevisionInformations",
60 principalColumn:
"Id",
61 onDelete: ReferentialAction.Cascade);
65 protected override void Down(MigrationBuilder migrationBuilder)
67 ArgumentNullException.ThrowIfNull(migrationBuilder);
69 migrationBuilder.DropForeignKey(
70 name:
"FK_CompileJobs_Jobs_JobId",
71 table:
"CompileJobs");
73 migrationBuilder.DropForeignKey(
74 name:
"FK_CompileJobs_RevisionInformations_RevisionInformationId",
75 table:
"CompileJobs");
77 migrationBuilder.DropForeignKey(
78 name:
"FK_RevInfoTestMerges_TestMerges_TestMergeId",
79 table:
"RevInfoTestMerges");
81 migrationBuilder.DropForeignKey(
82 name:
"FK_TestMerges_RevisionInformations_PrimaryRevisionInformationId",
85 migrationBuilder.AddForeignKey(
86 name:
"FK_CompileJobs_Jobs_JobId",
89 principalTable:
"Jobs",
90 principalColumn:
"Id",
91 onDelete: ReferentialAction.Restrict);
93 migrationBuilder.AddForeignKey(
94 name:
"FK_CompileJobs_RevisionInformations_RevisionInformationId",
96 column:
"RevisionInformationId",
97 principalTable:
"RevisionInformations",
98 principalColumn:
"Id",
99 onDelete: ReferentialAction.Cascade);
101 migrationBuilder.AddForeignKey(
102 name:
"FK_RevInfoTestMerges_TestMerges_TestMergeId",
103 table:
"RevInfoTestMerges",
104 column:
"TestMergeId",
105 principalTable:
"TestMerges",
106 principalColumn:
"Id",
107 onDelete: ReferentialAction.Cascade);
109 migrationBuilder.AddForeignKey(
110 name:
"FK_TestMerges_RevisionInformations_PrimaryRevisionInformationId",
112 column:
"PrimaryRevisionInformationId",
113 principalTable:
"RevisionInformations",
114 principalColumn:
"Id",
115 onDelete: ReferentialAction.Restrict);