Files
wwdpublic/Content.Server.Database/Migrations/Postgres/20241018043329_RoleWhitelist.cs
2024-11-21 17:49:04 +07:00

41 lines
1.4 KiB
C#
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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");
}
}
}