This commit is contained in:
Tizian.Breuch
2025-08-01 10:06:00 +02:00
parent 8a4590ee5a
commit 6f86d0de87
15 changed files with 79 additions and 79 deletions

View File

@@ -264,7 +264,7 @@ namespace Webshop.Infrastructure.Migrations
b.HasIndex("Slug")
.IsUnique();
b.ToTable("Categories");
b.ToTable("categorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.CategoryDiscount", b =>
@@ -667,7 +667,7 @@ namespace Webshop.Infrastructure.Migrations
b.HasIndex("CategoryId");
b.ToTable("ProductCategories");
b.ToTable("Productcategorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.ProductDiscount", b =>
@@ -1009,7 +1009,7 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.Category", b =>
{
b.HasOne("Webshop.Domain.Entities.Category", "ParentCategory")
.WithMany("SubCategories")
.WithMany("Subcategorys")
.HasForeignKey("ParentCategoryId")
.OnDelete(DeleteBehavior.Restrict);
@@ -1120,13 +1120,13 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.ProductCategory", b =>
{
b.HasOne("Webshop.Domain.Entities.Category", "Category")
.WithMany("ProductCategories")
.WithMany("Productcategorys")
.HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Webshop.Domain.Entities.Product", "Product")
.WithMany("ProductCategories")
.WithMany("Productcategorys")
.HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -1196,9 +1196,9 @@ namespace Webshop.Infrastructure.Migrations
{
b.Navigation("CategoryDiscounts");
b.Navigation("ProductCategories");
b.Navigation("Productcategorys");
b.Navigation("SubCategories");
b.Navigation("Subcategorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.Customer", b =>
@@ -1224,7 +1224,7 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.Product", b =>
{
b.Navigation("ProductCategories");
b.Navigation("Productcategorys");
b.Navigation("ProductDiscounts");

View File

@@ -13,7 +13,7 @@ namespace Webshop.Infrastructure.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Categories",
name: "categorys",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
@@ -29,11 +29,11 @@ namespace Webshop.Infrastructure.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_Categories", x => x.Id);
table.PrimaryKey("PK_categorys", x => x.Id);
table.ForeignKey(
name: "FK_Categories_Categories_ParentCategoryId",
name: "FK_categorys_categorys_ParentCategoryId",
column: x => x.ParentCategoryId,
principalTable: "Categories",
principalTable: "categorys",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
@@ -164,9 +164,9 @@ namespace Webshop.Infrastructure.Migrations
{
table.PrimaryKey("PK_CategoryDiscounts", x => new { x.CategoryId, x.DiscountId });
table.ForeignKey(
name: "FK_CategoryDiscounts_Categories_CategoryId",
name: "FK_CategoryDiscounts_categorys_CategoryId",
column: x => x.CategoryId,
principalTable: "Categories",
principalTable: "categorys",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
@@ -450,7 +450,7 @@ namespace Webshop.Infrastructure.Migrations
});
migrationBuilder.CreateTable(
name: "ProductCategories",
name: "Productcategorys",
columns: table => new
{
ProductId = table.Column<Guid>(type: "uuid", nullable: false),
@@ -458,15 +458,15 @@ namespace Webshop.Infrastructure.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_ProductCategories", x => new { x.ProductId, x.CategoryId });
table.PrimaryKey("PK_Productcategorys", x => new { x.ProductId, x.CategoryId });
table.ForeignKey(
name: "FK_ProductCategories_Categories_CategoryId",
name: "FK_Productcategorys_categorys_CategoryId",
column: x => x.CategoryId,
principalTable: "Categories",
principalTable: "categorys",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProductCategories_Products_ProductId",
name: "FK_Productcategorys_Products_ProductId",
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
@@ -594,13 +594,13 @@ namespace Webshop.Infrastructure.Migrations
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_Categories_ParentCategoryId",
table: "Categories",
name: "IX_categorys_ParentCategoryId",
table: "categorys",
column: "ParentCategoryId");
migrationBuilder.CreateIndex(
name: "IX_Categories_Slug",
table: "Categories",
name: "IX_categorys_Slug",
table: "categorys",
column: "Slug",
unique: true);
@@ -669,8 +669,8 @@ namespace Webshop.Infrastructure.Migrations
column: "ShippingMethodId");
migrationBuilder.CreateIndex(
name: "IX_ProductCategories_CategoryId",
table: "ProductCategories",
name: "IX_Productcategorys_CategoryId",
table: "Productcategorys",
column: "CategoryId");
migrationBuilder.CreateIndex(
@@ -769,7 +769,7 @@ namespace Webshop.Infrastructure.Migrations
name: "OrderItems");
migrationBuilder.DropTable(
name: "ProductCategories");
name: "Productcategorys");
migrationBuilder.DropTable(
name: "ProductDiscounts");
@@ -802,7 +802,7 @@ namespace Webshop.Infrastructure.Migrations
name: "ProductVariants");
migrationBuilder.DropTable(
name: "Categories");
name: "categorys");
migrationBuilder.DropTable(
name: "Discounts");

View File

@@ -261,7 +261,7 @@ namespace Webshop.Infrastructure.Migrations
b.HasIndex("Slug")
.IsUnique();
b.ToTable("Categories");
b.ToTable("categorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.CategoryDiscount", b =>
@@ -664,7 +664,7 @@ namespace Webshop.Infrastructure.Migrations
b.HasIndex("CategoryId");
b.ToTable("ProductCategories");
b.ToTable("Productcategorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.ProductDiscount", b =>
@@ -1006,7 +1006,7 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.Category", b =>
{
b.HasOne("Webshop.Domain.Entities.Category", "ParentCategory")
.WithMany("SubCategories")
.WithMany("Subcategorys")
.HasForeignKey("ParentCategoryId")
.OnDelete(DeleteBehavior.Restrict);
@@ -1117,13 +1117,13 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.ProductCategory", b =>
{
b.HasOne("Webshop.Domain.Entities.Category", "Category")
.WithMany("ProductCategories")
.WithMany("Productcategorys")
.HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Webshop.Domain.Entities.Product", "Product")
.WithMany("ProductCategories")
.WithMany("Productcategorys")
.HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -1193,9 +1193,9 @@ namespace Webshop.Infrastructure.Migrations
{
b.Navigation("CategoryDiscounts");
b.Navigation("ProductCategories");
b.Navigation("Productcategorys");
b.Navigation("SubCategories");
b.Navigation("Subcategorys");
});
modelBuilder.Entity("Webshop.Domain.Entities.Customer", b =>
@@ -1221,7 +1221,7 @@ namespace Webshop.Infrastructure.Migrations
modelBuilder.Entity("Webshop.Domain.Entities.Product", b =>
{
b.Navigation("ProductCategories");
b.Navigation("Productcategorys");
b.Navigation("ProductDiscounts");