This commit is contained in:
2023-07-21 21:06:45 +03:00
parent 2f108bef4f
commit fa5a8a9001
37 changed files with 2319 additions and 28 deletions
@@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class CurrentRate : Migration
{
/// <inheritdoc />
protected override void Up(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");
}
/// <inheritdoc />
protected override void Down(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");
}
}
}