Files
Govor/Govor.Data/Migrations/20250624053837_FixAdminRelation.cs
T
Artemy ce013eae49 Registration rework
+ InvitesRepository
+ AdminsRepository
+ rework jwt
2025-06-24 14:27:08 +07:00

40 lines
1.2 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Govor.Data.Migrations
{
/// <inheritdoc />
public partial class FixAdminRelation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Admins",
columns: table => new
{
UserId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Admins", x => x.UserId);
table.ForeignKey(
name: "FK_Admins_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Admins");
}
}
}