Server ban exemption system (#15076)
This commit is contained in:
committed by
GitHub
parent
e037d12899
commit
c8e90e561b
@@ -0,0 +1,43 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user