using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace MyOffice.Migrations.Postgres.Migrations { /// public partial class AccountCategoriesFix : Migration { /// 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); } /// 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); } } }