adress und migration
This commit is contained in:
@@ -12,8 +12,8 @@ using Webshop.Infrastructure.Data;
|
||||
namespace Webshop.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20250801073120_AddHouseNumberAndTypeToAddress")]
|
||||
partial class AddHouseNumberAndTypeToAddress
|
||||
[Migration("20250801114205_FinalSchema")]
|
||||
partial class FinalSchema
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -1224,10 +1224,10 @@ namespace Webshop.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Product", b =>
|
||||
{
|
||||
b.Navigation("Productcategorys");
|
||||
|
||||
b.Navigation("ProductDiscounts");
|
||||
|
||||
b.Navigation("Productcategorys");
|
||||
|
||||
b.Navigation("Reviews");
|
||||
|
||||
b.Navigation("Variants");
|
||||
@@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace Webshop.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddHouseNumberAndTypeToAddress : Migration
|
||||
public partial class FinalSchema : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
@@ -163,18 +163,18 @@ namespace Webshop.Infrastructure.Migrations
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CategoryDiscounts", x => new { x.CategoryId, x.DiscountId });
|
||||
table.ForeignKey(
|
||||
name: "FK_CategoryDiscounts_categorys_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "categorys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CategoryDiscounts_Discounts_DiscountId",
|
||||
column: x => x.DiscountId,
|
||||
principalTable: "Discounts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CategoryDiscounts_categorys_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "categorys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -459,18 +459,18 @@ namespace Webshop.Infrastructure.Migrations
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Productcategorys", x => new { x.ProductId, x.CategoryId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Productcategorys_categorys_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "categorys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Productcategorys_Products_ProductId",
|
||||
column: x => x.ProductId,
|
||||
principalTable: "Products",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Productcategorys_categorys_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "categorys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -593,6 +593,11 @@ namespace Webshop.Infrastructure.Migrations
|
||||
table: "Addresses",
|
||||
column: "CustomerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CategoryDiscounts_DiscountId",
|
||||
table: "CategoryDiscounts",
|
||||
column: "DiscountId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_categorys_ParentCategoryId",
|
||||
table: "categorys",
|
||||
@@ -604,11 +609,6 @@ namespace Webshop.Infrastructure.Migrations
|
||||
column: "Slug",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CategoryDiscounts_DiscountId",
|
||||
table: "CategoryDiscounts",
|
||||
column: "DiscountId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Customers_AspNetUserId",
|
||||
table: "Customers",
|
||||
@@ -1221,10 +1221,10 @@ namespace Webshop.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Product", b =>
|
||||
{
|
||||
b.Navigation("Productcategorys");
|
||||
|
||||
b.Navigation("ProductDiscounts");
|
||||
|
||||
b.Navigation("Productcategorys");
|
||||
|
||||
b.Navigation("Reviews");
|
||||
|
||||
b.Navigation("Variants");
|
||||
|
||||
Reference in New Issue
Block a user