This commit is contained in:
2023-07-28 21:18:18 +03:00
parent 5ecefe5756
commit 90f0386bfe
53 changed files with 3067 additions and 267 deletions
@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class AccessOwner : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "OwnerId",
table: "AccountAccesses",
type: "uuid",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_AccountAccesses_OwnerId",
table: "AccountAccesses",
column: "OwnerId");
migrationBuilder.AddForeignKey(
name: "FK_AccountAccesses_Users_OwnerId",
table: "AccountAccesses",
column: "OwnerId",
principalTable: "Users",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AccountAccesses_Users_OwnerId",
table: "AccountAccesses");
migrationBuilder.DropIndex(
name: "IX_AccountAccesses_OwnerId",
table: "AccountAccesses");
migrationBuilder.DropColumn(
name: "OwnerId",
table: "AccountAccesses");
}
}
}