tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20201222175357_MYAddSwarmIdentifer.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
10 public partial class MYAddSwarmIdentifer : 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 }
32
34 protected override void Down(MigrationBuilder migrationBuilder)
35 {
36 ArgumentNullException.ThrowIfNull(migrationBuilder);
37
38 migrationBuilder.DropIndex(
39 name: "IX_Instances_Path_SwarmIdentifer",
40 table: "Instances");
41
42 migrationBuilder.DropColumn(
43 name: "SwarmIdentifer",
44 table: "Instances");
45
46 migrationBuilder.CreateIndex(
47 name: "IX_Instances_Path",
48 table: "Instances",
49 column: "Path",
50 unique: true);
51 }
52 }
53}