mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 20:08:19 +02:00
Fix MangaConnectorId Chapters Cascade
This commit is contained in:
@@ -33,4 +33,8 @@
|
||||
<PackageReference Include="System.Drawing.Common" Version="9.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\Manga\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@@ -11,7 +11,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace API.Migrations.Manga
|
||||
{
|
||||
[DbContext(typeof(MangaContext))]
|
||||
[Migration("20250721093858_Initial")]
|
||||
[Migration("20250722203315_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -444,7 +444,7 @@ namespace API.Migrations.Manga
|
||||
b.HasOne("API.Schema.MangaContext.Chapter", "Obj")
|
||||
.WithMany("MangaConnectorIds")
|
||||
.HasForeignKey("ObjId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Obj");
|
@@ -276,7 +276,8 @@ namespace API.Migrations.Manga
|
||||
name: "FK_MangaConnectorToChapter_Chapters_ObjId",
|
||||
column: x => x.ObjId,
|
||||
principalTable: "Chapters",
|
||||
principalColumn: "Key");
|
||||
principalColumn: "Key",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
@@ -441,7 +441,7 @@ namespace API.Migrations.Manga
|
||||
b.HasOne("API.Schema.MangaContext.Chapter", "Obj")
|
||||
.WithMany("MangaConnectorIds")
|
||||
.HasForeignKey("ObjId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Obj");
|
||||
|
@@ -36,7 +36,7 @@ public class MangaContext(DbContextOptions<MangaContext> options) : TrangaBaseCo
|
||||
.HasMany<MangaConnectorId<Chapter>>(c => c.MangaConnectorIds)
|
||||
.WithOne(id => id.Obj)
|
||||
.HasForeignKey(id => id.ObjId)
|
||||
.OnDelete(DeleteBehavior.NoAction);
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
//Manga owns MangaAltTitles
|
||||
modelBuilder.Entity<Manga>()
|
||||
.OwnsMany<AltTitle>(m => m.AltTitles)
|
||||
|
Reference in New Issue
Block a user