49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ElectronicsShopDataBaseImplement.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Migration02 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Paymeants_Orders_PaymentID",
|
|
table: "Paymeants");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Paymeants_PaymentID",
|
|
table: "Paymeants");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PaymentID",
|
|
table: "Paymeants");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "PaymentID",
|
|
table: "Paymeants",
|
|
type: "int",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Paymeants_PaymentID",
|
|
table: "Paymeants",
|
|
column: "PaymentID");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Paymeants_Orders_PaymentID",
|
|
table: "Paymeants",
|
|
column: "PaymentID",
|
|
principalTable: "Orders",
|
|
principalColumn: "ID");
|
|
}
|
|
}
|
|
}
|