fix
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user