using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MyOffice.Migrations.Postgres.Migrations
{
    /// <inheritdoc />
    public partial class CurrentRateRemove : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Currencies_CurrencyRates_CurrentRateId1",
                table: "Currencies");

            migrationBuilder.DropIndex(
                name: "IX_Currencies_CurrentRateId1",
                table: "Currencies");

            migrationBuilder.DropColumn(
                name: "CurrentRateId",
                table: "Currencies");

            migrationBuilder.DropColumn(
                name: "CurrentRateId1",
                table: "Currencies");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "CurrentRateId",
                table: "Currencies",
                type: "integer",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CurrentRateId1",
                table: "Currencies",
                type: "integer",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_Currencies_CurrentRateId1",
                table: "Currencies",
                column: "CurrentRateId1");

            migrationBuilder.AddForeignKey(
                name: "FK_Currencies_CurrencyRates_CurrentRateId1",
                table: "Currencies",
                column: "CurrentRateId1",
                principalTable: "CurrencyRates",
                principalColumn: "Id");
        }
    }
}
