using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MyOffice.Migrations.Postgres.Migrations
{
    /// <inheritdoc />
    public partial class acccatunique : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_AccountAccountCategories_AccountId",
                table: "AccountAccountCategories");

            migrationBuilder.CreateIndex(
                name: "IX_AccountAccountCategories_AccountId_CategoryId",
                table: "AccountAccountCategories",
                columns: new[] { "AccountId", "CategoryId" },
                unique: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_AccountAccountCategories_AccountId_CategoryId",
                table: "AccountAccountCategories");

            migrationBuilder.CreateIndex(
                name: "IX_AccountAccountCategories_AccountId",
                table: "AccountAccountCategories",
                column: "AccountId");
        }
    }
}
