From 0d26301504d08fc35babf2fca6787c9499ae4466 Mon Sep 17 00:00:00 2001 From: dasha Date: Tue, 14 Mar 2023 13:05:56 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BF=D0=B0=D1=81=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 20230314085708_ShopMigration.Designer.cs} | 2 +- ...ion.cs => 20230314085708_ShopMigration.cs} | 74 ------------------- 2 files changed, 1 insertion(+), 75 deletions(-) rename SushiBar/SushiBarDatabaseImplement/Migrations/{20230307133039_ShopMigration.Designer.cs => 20230314085708_ShopMigration.Designer.cs} (99%) rename SushiBar/SushiBarDatabaseImplement/Migrations/{20230307133039_ShopMigration.cs => 20230314085708_ShopMigration.cs} (53%) 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); } } }