Files
tbd-station-14/Content.Server.Database/Migrations/Sqlite/20230319112120_ServerBanExemption.cs
2023-04-03 10:24:55 +10:00

44 lines
1.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
public partial class ServerBanExemption : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "exempt_flags",
table: "server_ban",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "server_ban_exemption",
columns: table => new
{
user_id = table.Column<Guid>(type: "TEXT", nullable: false),
flags = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_server_ban_exemption", x => x.user_id);
table.CheckConstraint("FlagsNotZero", "flags != 0");
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "server_ban_exemption");
migrationBuilder.DropColumn(
name: "exempt_flags",
table: "server_ban");
}
}
}