shoc-backend/Data.SeaHavenIndustries/Migrations/20260916211933_SH329_PrimaryAccountOwner.cs
2026-09-16 18:26:20 -03:00

40 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Data.SeaHavenIndustries.Migrations
{
/// <inheritdoc />
public partial class SH329_PrimaryAccountOwner : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsAccountOwner",
table: "AspNetUsers",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateIndex(
name: "IX_AspNetUsers_IsAccountOwner",
table: "AspNetUsers",
column: "IsAccountOwner",
unique: true,
filter: "IsAccountOwner = 1");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_AspNetUsers_IsAccountOwner",
table: "AspNetUsers");
migrationBuilder.DropColumn(
name: "IsAccountOwner",
table: "AspNetUsers");
}
}
}