29 protected override void Down(MigrationBuilder migrationBuilder)
31 ArgumentNullException.ThrowIfNull(migrationBuilder);
33 migrationBuilder.RenameColumn(
34 name:
"TargetCommitSha",
36 newName:
"PullRequestRevision");
38 migrationBuilder.RenameTable(
40 newName:
"CompileJobs_down");
42 migrationBuilder.CreateTable(
46 Id = table.Column<
long>(nullable:
false)
47 .Annotation(
"Sqlite:Autoincrement",
true),
48 DmeName = table.Column<
string>(nullable:
false),
49 Output = table.Column<
string>(nullable:
false),
50 DirectoryName = table.Column<Guid>(nullable:
false),
51 MinimumSecurityLevel = table.Column<
int>(nullable:
true),
52 JobId = table.Column<
long>(nullable:
false),
53 RevisionInformationId = table.Column<
long>(nullable:
false),
54 ByondVersion = table.Column<
string>(nullable:
false),
55 DMApiMajorVersion = table.Column<
int>(nullable:
true),
56 DMApiMinorVersion = table.Column<
int>(nullable:
true),
57 DMApiPatchVersion = table.Column<
int>(nullable:
true),
58 GitHubDeploymentId = table.Column<
long>(nullable:
true),
59 GitHubRepoId = table.Column<
long>(nullable:
true),
63 table.PrimaryKey(
"PK_CompileJobs", x => x.Id);
65 name:
"FK_CompileJobs_Jobs_JobId",
67 principalTable:
"Jobs",
68 principalColumn:
"Id",
69 onDelete: ReferentialAction.Cascade);
71 name:
"FK_CompileJobs_RevisionInformations_RevisionInformationId",
72 column: x => x.RevisionInformationId,
73 principalTable:
"RevisionInformations",
74 principalColumn:
"Id");
78 $
"INSERT INTO CompileJobs SELECT Id,DmeName,Output,DirectoryName,MinimumSecurityLevel,JobId,RevisionInformationId,ByondVersion,DMApiMajorVersion,DMApiMinorVersion,DMApiPatchVersion,GitHubDeploymentId,GitHubRepoId FROM CompileJobs_down");
80 migrationBuilder.DropTable(
81 name:
"CompileJobs_down");