tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20200529171541_MYFixForeignKey.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
10 public partial class MYFixForeignKey : Migration
11 {
13 protected override void Up(MigrationBuilder migrationBuilder)
14 {
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
16
17 migrationBuilder.DropForeignKey(
18 name: "FK_CompileJobs_RevisionInformations_RevisionInformationId",
19 table: "CompileJobs");
20
21 migrationBuilder.AddForeignKey(
22 name: "FK_CompileJobs_RevisionInformations_RevisionInformationId",
23 table: "CompileJobs",
24 column: "RevisionInformationId",
25 principalTable: "RevisionInformations",
26 principalColumn: "Id",
27 onDelete: ReferentialAction.Cascade);
28 }
29
31 protected override void Down(MigrationBuilder migrationBuilder)
32 {
33 ArgumentNullException.ThrowIfNull(migrationBuilder);
34
35 migrationBuilder.DropForeignKey(
36 name: "FK_CompileJobs_RevisionInformations_RevisionInformationId",
37 table: "CompileJobs");
38
39 migrationBuilder.AddForeignKey(
40 name: "FK_CompileJobs_RevisionInformations_RevisionInformationId",
41 table: "CompileJobs",
42 column: "RevisionInformationId",
43 principalTable: "RevisionInformations",
44 principalColumn: "Id");
45 }
46 }
47}
Fix the CompileJob/RevisionInformation foreign key for MySQL.