tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20200420181015_MYLimitsOnChat.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6
8{
12 public partial class MYLimitsOnChat : Migration
13 {
15 protected override void Up(MigrationBuilder migrationBuilder)
16 {
17 ArgumentNullException.ThrowIfNull(migrationBuilder);
18
19 migrationBuilder.AddColumn<ushort>(
20 name: "ChatBotLimit",
21 table: "Instances",
22 nullable: false,
23 defaultValue: Instance.DefaultChatBotLimit);
24
25 migrationBuilder.AddColumn<ushort>(
26 name: "ChannelLimit",
27 table: "ChatBots",
28 nullable: false,
29 defaultValue: ChatBot.DefaultChannelLimit);
30 }
31
33 protected override void Down(MigrationBuilder migrationBuilder)
34 {
35 ArgumentNullException.ThrowIfNull(migrationBuilder);
36
37 migrationBuilder.DropColumn(
38 name: "ChatBotLimit",
39 table: "Instances");
40
41 migrationBuilder.DropColumn(
42 name: "ChannelLimit",
43 table: "ChatBots");
44 }
45 }
46}
override void Down(MigrationBuilder migrationBuilder)
const ushort DefaultChannelLimit
Default for Api.Models.Internal.ChatBotSettings.ChannelLimit.
Definition ChatBot.cs:16
Represents an Api.Models.Instance in the database.
Definition Instance.cs:11
const ushort DefaultChatBotLimit
Default for Api.Models.Instance.ChatBotLimit.
Definition Instance.cs:15