tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20201106082556_MYAddAdditionalDDParameters.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
11 {
13 protected override void Up(MigrationBuilder migrationBuilder)
14 {
15 ArgumentNullException.ThrowIfNull(migrationBuilder);
16
17 migrationBuilder.AddColumn<string>(
18 name: "AdditionalParameters",
19 table: "DreamDaemonSettings",
20 maxLength: 10000);
21
22 // Special handling to get our NOT NULL constraint
23 migrationBuilder.Sql("UPDATE DreamDaemonSettings SET AdditionalParameters = \"\"");
24
25 migrationBuilder.AlterColumn<string>(
26 name: "AdditionalParameters",
27 table: "DreamDaemonSettings",
28 nullable: false,
29 maxLength: 10000);
30 }
31
33 protected override void Down(MigrationBuilder migrationBuilder)
34 {
35 ArgumentNullException.ThrowIfNull(migrationBuilder);
36
37 migrationBuilder.DropColumn(
38 name: "AdditionalParameters",
39 table: "DreamDaemonSettings");
40 }
41 }
42}