This commit is contained in:
2023-06-17 14:16:09 +03:00
parent 62178f1f32
commit 7ae5d3bc81
180 changed files with 12932 additions and 192 deletions
@@ -0,0 +1,66 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class AccountCategoriesFix : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AccountAccountCategories_AccountCategories_AccountId",
table: "AccountAccountCategories");
migrationBuilder.DropForeignKey(
name: "FK_AccountAccountCategories_Accounts_CategoryId",
table: "AccountAccountCategories");
migrationBuilder.AddForeignKey(
name: "FK_AccountAccountCategories_AccountCategories_CategoryId",
table: "AccountAccountCategories",
column: "CategoryId",
principalTable: "AccountCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountAccountCategories_Accounts_AccountId",
table: "AccountAccountCategories",
column: "AccountId",
principalTable: "Accounts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AccountAccountCategories_AccountCategories_CategoryId",
table: "AccountAccountCategories");
migrationBuilder.DropForeignKey(
name: "FK_AccountAccountCategories_Accounts_AccountId",
table: "AccountAccountCategories");
migrationBuilder.AddForeignKey(
name: "FK_AccountAccountCategories_AccountCategories_AccountId",
table: "AccountAccountCategories",
column: "AccountId",
principalTable: "AccountCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountAccountCategories_Accounts_CategoryId",
table: "AccountAccountCategories",
column: "CategoryId",
principalTable: "Accounts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}