Спасение приложения
This commit is contained in:
parent
e934dc229f
commit
0d26301504
@ -12,7 +12,7 @@ using SushiBarDatabaseImplement;
|
||||
namespace SushiBarDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(SushiBarDatabase))]
|
||||
[Migration("20230307133039_ShopMigration")]
|
||||
[Migration("20230314085708_ShopMigration")]
|
||||
partial class ShopMigration
|
||||
{
|
||||
/// <inheritdoc />
|
@ -11,27 +11,6 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Orders_SushiList_SushiId",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SushiIngredients_SushiList_SushiId",
|
||||
table: "SushiIngredients");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_SushiList",
|
||||
table: "SushiList");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "SushiList",
|
||||
newName: "ListSushi");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ListSushi",
|
||||
table: "ListSushi",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Shops",
|
||||
columns: table => new
|
||||
@ -84,69 +63,16 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
name: "IX_ShopSushi_SushiId",
|
||||
table: "ShopSushi",
|
||||
column: "SushiId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Orders_ListSushi_SushiId",
|
||||
table: "Orders",
|
||||
column: "SushiId",
|
||||
principalTable: "ListSushi",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SushiIngredients_ListSushi_SushiId",
|
||||
table: "SushiIngredients",
|
||||
column: "SushiId",
|
||||
principalTable: "ListSushi",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Orders_ListSushi_SushiId",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SushiIngredients_ListSushi_SushiId",
|
||||
table: "SushiIngredients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShopSushi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Shops");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ListSushi",
|
||||
table: "ListSushi");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ListSushi",
|
||||
newName: "SushiList");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_SushiList",
|
||||
table: "SushiList",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Orders_SushiList_SushiId",
|
||||
table: "Orders",
|
||||
column: "SushiId",
|
||||
principalTable: "SushiList",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SushiIngredients_SushiList_SushiId",
|
||||
table: "SushiIngredients",
|
||||
column: "SushiId",
|
||||
principalTable: "SushiList",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user