Files
Radicade/Server/Migrations/20260810115924_AddRoomBans.cs
2026-10-16 23:33:13 -07:00

42 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RadicadeServer.Migrations
{
public partial class AddRoomBans : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "RoomBans",
columns: table => new
{
BanId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
roomId = table.Column<long>(type: "bigint", nullable: false),
actorId = table.Column<long>(type: "bigint", nullable: false),
bannedPlayerId = table.Column<long>(type: "bigint", nullable: false),
bannedByName = table.Column<string>(type: "nvarchar(max)", nullable: false),
reason = table.Column<string>(type: "nvarchar(max)", nullable: false),
bannedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
expiresAt = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RoomBans", x => x.BanId);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RoomBans");
}
}
}