This commit is contained in:
Tizian.Breuch
2025-08-01 15:11:42 +02:00
parent 96f082b38f
commit 55eeaca7f4
29 changed files with 452 additions and 452 deletions

View File

@@ -13,14 +13,14 @@ namespace Webshop.Infrastructure.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "categorys",
name: "categories",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Slug = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
ParentCategoryId = table.Column<Guid>(type: "uuid", nullable: true),
ParentcategorieId = table.Column<Guid>(type: "uuid", nullable: true),
ImageUrl = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
IsActive = table.Column<bool>(type: "boolean", nullable: false),
DisplayOrder = table.Column<int>(type: "integer", nullable: false),
@@ -29,11 +29,11 @@ namespace Webshop.Infrastructure.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_categorys", x => x.Id);
table.PrimaryKey("PK_categories", x => x.Id);
table.ForeignKey(
name: "FK_categorys_categorys_ParentCategoryId",
column: x => x.ParentCategoryId,
principalTable: "categorys",
name: "FK_categories_categories_ParentcategorieId",
column: x => x.ParentcategorieId,
principalTable: "categories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
@@ -154,25 +154,25 @@ namespace Webshop.Infrastructure.Migrations
});
migrationBuilder.CreateTable(
name: "CategoryDiscounts",
name: "categorieDiscounts",
columns: table => new
{
CategoryId = table.Column<Guid>(type: "uuid", nullable: false),
categorieId = table.Column<Guid>(type: "uuid", nullable: false),
DiscountId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CategoryDiscounts", x => new { x.CategoryId, x.DiscountId });
table.PrimaryKey("PK_categorieDiscounts", x => new { x.categorieId, x.DiscountId });
table.ForeignKey(
name: "FK_CategoryDiscounts_Discounts_DiscountId",
name: "FK_categorieDiscounts_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",
name: "FK_categorieDiscounts_categories_categorieId",
column: x => x.categorieId,
principalTable: "categories",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
@@ -450,25 +450,25 @@ namespace Webshop.Infrastructure.Migrations
});
migrationBuilder.CreateTable(
name: "Productcategorys",
name: "Productcategories",
columns: table => new
{
ProductId = table.Column<Guid>(type: "uuid", nullable: false),
CategoryId = table.Column<Guid>(type: "uuid", nullable: false)
categorieId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Productcategorys", x => new { x.ProductId, x.CategoryId });
table.PrimaryKey("PK_Productcategories", x => new { x.ProductId, x.categorieId });
table.ForeignKey(
name: "FK_Productcategorys_Products_ProductId",
name: "FK_Productcategories_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",
name: "FK_Productcategories_categories_categorieId",
column: x => x.categorieId,
principalTable: "categories",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
@@ -594,18 +594,18 @@ namespace Webshop.Infrastructure.Migrations
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_CategoryDiscounts_DiscountId",
table: "CategoryDiscounts",
name: "IX_categorieDiscounts_DiscountId",
table: "categorieDiscounts",
column: "DiscountId");
migrationBuilder.CreateIndex(
name: "IX_categorys_ParentCategoryId",
table: "categorys",
column: "ParentCategoryId");
name: "IX_categories_ParentcategorieId",
table: "categories",
column: "ParentcategorieId");
migrationBuilder.CreateIndex(
name: "IX_categorys_Slug",
table: "categorys",
name: "IX_categories_Slug",
table: "categories",
column: "Slug",
unique: true);
@@ -669,9 +669,9 @@ namespace Webshop.Infrastructure.Migrations
column: "ShippingMethodId");
migrationBuilder.CreateIndex(
name: "IX_Productcategorys_CategoryId",
table: "Productcategorys",
column: "CategoryId");
name: "IX_Productcategories_categorieId",
table: "Productcategories",
column: "categorieId");
migrationBuilder.CreateIndex(
name: "IX_ProductDiscounts_DiscountId",
@@ -763,13 +763,13 @@ namespace Webshop.Infrastructure.Migrations
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CategoryDiscounts");
name: "categorieDiscounts");
migrationBuilder.DropTable(
name: "OrderItems");
migrationBuilder.DropTable(
name: "Productcategorys");
name: "Productcategories");
migrationBuilder.DropTable(
name: "ProductDiscounts");
@@ -802,7 +802,7 @@ namespace Webshop.Infrastructure.Migrations
name: "ProductVariants");
migrationBuilder.DropTable(
name: "categorys");
name: "categories");
migrationBuilder.DropTable(
name: "Discounts");