diff --git a/Webshop.Infrastructure/Migrations/20250908092457_review.Designer.cs b/Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.Designer.cs
similarity index 99%
rename from Webshop.Infrastructure/Migrations/20250908092457_review.Designer.cs
rename to Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.Designer.cs
index d741324..172f6f6 100644
--- a/Webshop.Infrastructure/Migrations/20250908092457_review.Designer.cs
+++ b/Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.Designer.cs
@@ -12,8 +12,8 @@ using Webshop.Infrastructure.Data;
namespace Webshop.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
- [Migration("20250908092457_review")]
- partial class review
+ [Migration("20250908092824_review-beziehung")]
+ partial class reviewbeziehung
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -1274,7 +1274,8 @@ namespace Webshop.Infrastructure.Migrations
{
b.HasOne("Webshop.Domain.Entities.Customer", "Customer")
.WithMany("Reviews")
- .HasForeignKey("CustomerId");
+ .HasForeignKey("CustomerId")
+ .OnDelete(DeleteBehavior.SetNull);
b.HasOne("Webshop.Domain.Entities.Product", "Product")
.WithMany("Reviews")
diff --git a/Webshop.Infrastructure/Migrations/20250908092457_review.cs b/Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.cs
similarity index 99%
rename from Webshop.Infrastructure/Migrations/20250908092457_review.cs
rename to Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.cs
index a90135e..b751841 100644
--- a/Webshop.Infrastructure/Migrations/20250908092457_review.cs
+++ b/Webshop.Infrastructure/Migrations/20250908092824_review-beziehung.cs
@@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Webshop.Infrastructure.Migrations
{
///
- public partial class review : Migration
+ public partial class reviewbeziehung : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
@@ -588,7 +588,8 @@ namespace Webshop.Infrastructure.Migrations
name: "FK_Reviews_Customers_CustomerId",
column: x => x.CustomerId,
principalTable: "Customers",
- principalColumn: "Id");
+ principalColumn: "Id",
+ onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_Reviews_Products_ProductId",
column: x => x.ProductId,
diff --git a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs
index 42ffa62..e9ba6a7 100644
--- a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs
+++ b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs
@@ -1271,7 +1271,8 @@ namespace Webshop.Infrastructure.Migrations
{
b.HasOne("Webshop.Domain.Entities.Customer", "Customer")
.WithMany("Reviews")
- .HasForeignKey("CustomerId");
+ .HasForeignKey("CustomerId")
+ .OnDelete(DeleteBehavior.SetNull);
b.HasOne("Webshop.Domain.Entities.Product", "Product")
.WithMany("Reviews")