using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Content.Server.Database.Migrations.Postgres { public partial class ServerBanExemption : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( 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(type: "uuid", nullable: false), flags = table.Column(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"); } } }