From 421a25ec31fc1fe404d1522ba9c9a8805890e014 Mon Sep 17 00:00:00 2001 From: Glax Date: Sun, 18 May 2025 16:06:16 +0200 Subject: [PATCH] Delete duplicate IsRequired Statements --- API/Schema/Contexts/PgsqlContext.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/API/Schema/Contexts/PgsqlContext.cs b/API/Schema/Contexts/PgsqlContext.cs index 8fc0b8a..366086f 100644 --- a/API/Schema/Contexts/PgsqlContext.cs +++ b/API/Schema/Contexts/PgsqlContext.cs @@ -46,7 +46,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Manga) .WithMany() .HasForeignKey(j => j.MangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Manga) @@ -55,7 +54,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Manga) .WithMany() .HasForeignKey(j => j.MangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Manga) @@ -64,7 +62,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Chapter) .WithMany() .HasForeignKey(j => j.ChapterId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Chapter) @@ -73,7 +70,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Manga) .WithMany() .HasForeignKey(j => j.MangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Manga) @@ -82,7 +78,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.ToLibrary) .WithMany() .HasForeignKey(j => j.ToLibraryId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.ToLibrary) @@ -91,7 +86,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Manga) .WithMany() .HasForeignKey(j => j.MangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Manga) @@ -100,7 +94,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasOne(j => j.Manga) .WithMany() .HasForeignKey(j => j.MangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(j => j.Manga) @@ -132,7 +125,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasMany() .WithOne(m => m.MangaConnector) .HasForeignKey(m => m.MangaConnectorName) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(m => m.MangaConnector) @@ -143,7 +135,6 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op .HasMany(m => m.Chapters) .WithOne(c => c.ParentManga) .HasForeignKey(c => c.ParentMangaId) - .IsRequired() .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .Navigation(c => c.ParentManga)