This commit is contained in:
2023-08-04 20:10:57 +03:00
parent 70edf34cf6
commit 0d45061d81
14 changed files with 866 additions and 35 deletions
@@ -0,0 +1,37 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class AccountAccesUnique : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_AccountAccesses_AccountId",
table: "AccountAccesses");
migrationBuilder.CreateIndex(
name: "IX_AccountAccesses_AccountId_UserId",
table: "AccountAccesses",
columns: new[] { "AccountId", "UserId" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_AccountAccesses_AccountId_UserId",
table: "AccountAccesses");
migrationBuilder.CreateIndex(
name: "IX_AccountAccesses_AccountId",
table: "AccountAccesses",
column: "AccountId");
}
}
}