mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: null user/paste fk in reports on delete
This commit is contained in:
@@ -131,9 +131,7 @@ namespace SharpbinV3.Server.Migrations
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte[]>("RowVersion")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("BLOB");
|
||||
|
||||
b.Property<string>("TokenHash")
|
||||
@@ -302,11 +300,13 @@ namespace SharpbinV3.Server.Migrations
|
||||
{
|
||||
b.HasOne("SharpbinV3.Server.Data.Entities.Paste", "Paste")
|
||||
.WithMany("Reports")
|
||||
.HasForeignKey("PastePID");
|
||||
.HasForeignKey("PastePID")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
|
||||
.WithMany("Reports")
|
||||
.HasForeignKey("UserUUID");
|
||||
.HasForeignKey("UserUUID")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.Navigation("Paste");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user