Fix missing Entity-Relation for UpdateFilesDownloadedJob

This commit is contained in:
Glax 2025-05-09 12:03:18 +02:00
parent 53d9be5656
commit 2d69b30e83

View File

@ -87,6 +87,15 @@ public class PgsqlContext(DbContextOptions<PgsqlContext> options) : DbContext(op
modelBuilder.Entity<RetrieveChaptersJob>()
.Navigation(j => j.Manga)
.AutoInclude();
modelBuilder.Entity<UpdateFilesDownloadedJob>()
.HasOne<Manga>(j => j.Manga)
.WithMany()
.HasForeignKey(j => j.MangaId)
.IsRequired()
.OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<UpdateFilesDownloadedJob>()
.Navigation(j => j.Manga)
.AutoInclude();
//Job has possible ParentJob
modelBuilder.Entity<Job>()