Fix Actions that can have related chapters and manga

This commit is contained in:
2025-10-16 20:28:43 +02:00
parent d029512354
commit ef907ee09d
15 changed files with 75 additions and 49 deletions

View File

@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace API.Migrations.Actions
{
[DbContext(typeof(ActionsContext))]
[Migration("20251016170924_Actions")]
[Migration("20251016182526_Actions")]
partial class Actions
{
/// <inheritdoc />
@@ -53,8 +53,14 @@ namespace API.Migrations.Actions
b.Property<string>("ChapterId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("ChapterId");
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(1);
});
@@ -66,8 +72,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(2);
});
@@ -84,8 +90,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(3);
});
@@ -119,8 +125,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(5);
});
@@ -132,8 +138,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.Property<string>("MetadataFetcher")
.IsRequired()

View File

@@ -18,8 +18,8 @@ namespace API.Migrations.Actions
Key = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
Action = table.Column<int>(type: "integer", maxLength: 128, nullable: false),
PerformedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ChapterId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
MangaId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ChapterId = table.Column<string>(type: "text", nullable: true),
MangaId = table.Column<string>(type: "text", nullable: true),
Filename = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true),
From = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),
To = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),

View File

@@ -50,8 +50,14 @@ namespace API.Migrations.Actions
b.Property<string>("ChapterId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("ChapterId");
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(1);
});
@@ -63,8 +69,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(2);
});
@@ -81,8 +87,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(3);
});
@@ -116,8 +122,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.HasDiscriminator().HasValue(5);
});
@@ -129,8 +135,8 @@ namespace API.Migrations.Actions
b.Property<string>("MangaId")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
.HasColumnType("text")
.HasColumnName("MangaId");
b.Property<string>("MetadataFetcher")
.IsRequired()