tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20241103161915_SLAddAutoStartAndStop.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
8 public partial class SLAddAutoStartAndStop : Migration
9 {
11 protected override void Up(MigrationBuilder migrationBuilder)
12 {
13 ArgumentNullException.ThrowIfNull(migrationBuilder);
14
15 migrationBuilder.AlterColumn<long>(
16 name: "UserId",
17 table: "OAuthConnections",
18 type: "INTEGER",
19 nullable: false,
20 defaultValue: 0L,
21 oldClrType: typeof(long),
22 oldType: "INTEGER",
23 oldNullable: true);
24
25 migrationBuilder.AddColumn<string>(
26 name: "AutoStartCron",
27 table: "Instances",
28 type: "TEXT",
29 maxLength: 1000,
30 nullable: false,
31 defaultValue: String.Empty);
32
33 migrationBuilder.AddColumn<string>(
34 name: "AutoStopCron",
35 table: "Instances",
36 type: "TEXT",
37 maxLength: 1000,
38 nullable: false,
39 defaultValue: String.Empty);
40 }
41
43 protected override void Down(MigrationBuilder migrationBuilder)
44 {
45 ArgumentNullException.ThrowIfNull(migrationBuilder);
46
47 migrationBuilder.DropColumn(
48 name: "AutoStartCron",
49 table: "Instances");
50
51 migrationBuilder.DropColumn(
52 name: "AutoStopCron",
53 table: "Instances");
54
55 migrationBuilder.AlterColumn<long>(
56 name: "UserId",
57 table: "OAuthConnections",
58 type: "INTEGER",
59 nullable: true,
60 oldClrType: typeof(long),
61 oldType: "INTEGER");
62 }
63 }
64}