tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20190219041825_MSFixRevInfoIndex.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
10 public partial class MSFixRevInfoIndex : Migration
11 {
13 protected override void Up(MigrationBuilder migrationBuilder)
14 {
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
16
17 migrationBuilder.DropIndex(
18 name: "IX_RevisionInformations_CommitSha",
19 table: "RevisionInformations");
20
21 migrationBuilder.DropIndex(
22 name: "IX_RevisionInformations_InstanceId",
23 table: "RevisionInformations");
24
25 migrationBuilder.CreateIndex(
26 name: "IX_RevisionInformations_InstanceId_CommitSha",
27 table: "RevisionInformations",
28 columns: new[] { "InstanceId", "CommitSha" },
29 unique: true);
30 }
31
33 protected override void Down(MigrationBuilder migrationBuilder)
34 {
35 ArgumentNullException.ThrowIfNull(migrationBuilder);
36
37 migrationBuilder.DropIndex(
38 name: "IX_RevisionInformations_InstanceId_CommitSha",
39 table: "RevisionInformations");
40
41 migrationBuilder.CreateIndex(
42 name: "IX_RevisionInformations_CommitSha",
43 table: "RevisionInformations",
44 column: "CommitSha",
45 unique: true);
46
47 migrationBuilder.CreateIndex(
48 name: "IX_RevisionInformations_InstanceId",
49 table: "RevisionInformations",
50 column: "InstanceId");
51 }
52 }
53}