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

@@ -0,0 +1,42 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Migrations.Actions
{
/// <inheritdoc />
public partial class Actions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Actions",
columns: table => new
{
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: "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),
FileLibraryId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
MetadataFetcher = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Actions", x => x.Key);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Actions");
}
}
}