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