Compare commits
2 Commits
b2185dd836
...
50e45e7fb3
Author | SHA1 | Date | |
---|---|---|---|
50e45e7fb3 | |||
eaafd9b703 |
@ -93,7 +93,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SushiList");
|
||||
b.ToTable("ListSushi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiIngredient", b =>
|
||||
|
@ -44,7 +44,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SushiList",
|
||||
name: "ListSushi",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
@ -54,7 +54,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SushiList", x => x.Id);
|
||||
table.PrimaryKey("PK_ListSushi", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@ -77,9 +77,9 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SushiIngredients_SushiList_SushiId",
|
||||
name: "FK_SushiIngredients_ListSushi_SushiId",
|
||||
column: x => x.SushiId,
|
||||
principalTable: "SushiList",
|
||||
principalTable: "ListSushi",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@ -108,7 +108,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
name: "Ingredients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SushiList");
|
||||
name: "ListSushi");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SushiList");
|
||||
b.ToTable("ListSushi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiIngredient", b =>
|
||||
|
@ -16,10 +16,10 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
column: "SushiId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Orders_SushiList_SushiId",
|
||||
name: "FK_Orders_ListSushi_SushiId",
|
||||
table: "Orders",
|
||||
column: "SushiId",
|
||||
principalTable: "SushiList",
|
||||
principalTable: "ListSushi",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
@ -28,7 +28,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Orders_SushiList_SushiId",
|
||||
name: "FK_Orders_ListSushi_SushiId",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
|
Loading…
Reference in New Issue
Block a user