mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-20 06:58:55 +03:00
41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
#nullable disable
|
||
|
||
using System;
|
||
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
||
namespace Content.Server.Database.Migrations.Postgres
|
||
{
|
||
/// <inheritdoc />
|
||
public partial class RoleWhitelist : Migration
|
||
{
|
||
/// <inheritdoc />
|
||
protected override void Up(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.CreateTable(
|
||
name: "role_whitelists",
|
||
columns: table => new
|
||
{
|
||
player_user_id = table.Column<Guid>(type: "uuid", nullable: false),
|
||
role_id = table.Column<string>(type: "text", nullable: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_role_whitelists", x => new { x.player_user_id, x.role_id });
|
||
table.ForeignKey(
|
||
name: "FK_role_whitelists_player_player_user_id",
|
||
column: x => x.player_user_id,
|
||
principalTable: "player",
|
||
principalColumn: "user_id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
});
|
||
}
|
||
|
||
/// <inheritdoc />
|
||
protected override void Down(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.DropTable(
|
||
name: "role_whitelists");
|
||
}
|
||
}
|
||
}
|