diff --git a/SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.Designer.cs b/SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.Designer.cs
similarity index 99%
rename from SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.Designer.cs
rename to SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.Designer.cs
index c9c560d..9b63c33 100644
--- a/SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.Designer.cs
+++ b/SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.Designer.cs
@@ -12,7 +12,7 @@ using SushiBarDatabaseImplement;
namespace SushiBarDatabaseImplement.Migrations
{
[DbContext(typeof(SushiBarDatabase))]
- [Migration("20230307133039_ShopMigration")]
+ [Migration("20230314085708_ShopMigration")]
partial class ShopMigration
{
///
diff --git a/SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.cs b/SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.cs
similarity index 53%
rename from SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.cs
rename to SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.cs
index 95dcfa2..dea767f 100644
--- a/SushiBar/SushiBarDatabaseImplement/Migrations/20230307133039_ShopMigration.cs
+++ b/SushiBar/SushiBarDatabaseImplement/Migrations/20230314085708_ShopMigration.cs
@@ -11,27 +11,6 @@ namespace SushiBarDatabaseImplement.Migrations
///
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);
}
///
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);
}
}
}