using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ElectronicsShopDataBaseImplement.Migrations
{
///
public partial class Migration07 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Paymeants_Orders_OrderID",
table: "Paymeants");
migrationBuilder.DropIndex(
name: "IX_Paymeants_OrderID",
table: "Paymeants");
migrationBuilder.AddColumn(
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");
}
///
protected override void Down(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");
migrationBuilder.CreateIndex(
name: "IX_Paymeants_OrderID",
table: "Paymeants",
column: "OrderID");
migrationBuilder.AddForeignKey(
name: "FK_Paymeants_Orders_OrderID",
table: "Paymeants",
column: "OrderID",
principalTable: "Orders",
principalColumn: "ID",
onDelete: ReferentialAction.Cascade);
}
}
}