using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Govor.Data.Migrations { /// public partial class FixAdminRelation : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Admins", columns: table => new { UserId = table.Column(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); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Admins"); } } }