mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 06:03:12 +00:00
40 lines
1.2 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|