tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20201222175310_MSAddSwarmIdentifer.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
10 public partial class MSAddSwarmIdentifer : Migration
11 {
13 protected override void Up(MigrationBuilder migrationBuilder)
14 {
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
16
17 migrationBuilder.DropIndex(
18 name: "IX_Instances_Path",
19 table: "Instances");
20
21 migrationBuilder.AddColumn<string>(
22 name: "SwarmIdentifer",
23 table: "Instances",
24 nullable: true);
25
26 migrationBuilder.CreateIndex(
27 name: "IX_Instances_Path_SwarmIdentifer",
28 table: "Instances",
29 columns: new[] { "Path", "SwarmIdentifer" },
30 unique: true,
31 filter: "[SwarmIdentifer] IS NOT NULL");
32 }
33
35 protected override void Down(MigrationBuilder migrationBuilder)
36 {
37 ArgumentNullException.ThrowIfNull(migrationBuilder);
38
39 migrationBuilder.DropIndex(
40 name: "IX_Instances_Path_SwarmIdentifer",
41 table: "Instances");
42
43 migrationBuilder.DropColumn(
44 name: "SwarmIdentifer",
45 table: "Instances");
46
47 migrationBuilder.CreateIndex(
48 name: "IX_Instances_Path",
49 table: "Instances",
50 column: "Path",
51 unique: true);
52 }
53 }
54}