mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-17 10:50:45 +02:00
This commit is contained in:
156
API/Migrations/Actions/20251016005257_Actions.Designer.cs
generated
Normal file
156
API/Migrations/Actions/20251016005257_Actions.Designer.cs
generated
Normal file
@@ -0,0 +1,156 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using API.Schema.ActionsContext;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations.Actions
|
||||
{
|
||||
[DbContext(typeof(ActionsContext))]
|
||||
[Migration("20251016005257_Actions")]
|
||||
partial class Actions
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.ActionRecord", b =>
|
||||
{
|
||||
b.Property<string>("Key")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("Action")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<DateTime>("PerformedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Key");
|
||||
|
||||
b.ToTable("Actions");
|
||||
|
||||
b.HasDiscriminator<string>("Action").HasValue("ActionRecord");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.ChapterDownloadedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("ChapterId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Chapter.Downloaded");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.ChaptersRetrievedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.ChaptersRetrieved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.CoverDownloadedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("Filename")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("character varying(1024)");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.CoverDownloaded");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.DataMovedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("From")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("To")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Tranga.DataMoved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.LibraryMovedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("FileLibraryId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.LibraryMoved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.MetadataUpdatedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("MetadataFetcher")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("character varying(1024)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.MetadataUpdated");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.StartupActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.HasDiscriminator().HasValue("Tranga.Started");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
42
API/Migrations/Actions/20251016005257_Actions.cs
Normal file
42
API/Migrations/Actions/20251016005257_Actions.cs
Normal 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<string>(type: "character varying(128)", 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),
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
153
API/Migrations/Actions/ActionsContextModelSnapshot.cs
Normal file
153
API/Migrations/Actions/ActionsContextModelSnapshot.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using API.Schema.ActionsContext;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations.Actions
|
||||
{
|
||||
[DbContext(typeof(ActionsContext))]
|
||||
partial class ActionsContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.ActionRecord", b =>
|
||||
{
|
||||
b.Property<string>("Key")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("Action")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<DateTime>("PerformedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Key");
|
||||
|
||||
b.ToTable("Actions");
|
||||
|
||||
b.HasDiscriminator<string>("Action").HasValue("ActionRecord");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.ChapterDownloadedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("ChapterId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Chapter.Downloaded");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.ChaptersRetrievedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.ChaptersRetrieved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.CoverDownloadedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("Filename")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("character varying(1024)");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.CoverDownloaded");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.DataMovedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("From")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("To")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Tranga.DataMoved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.LibraryMovedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("FileLibraryId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.LibraryMoved");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.MetadataUpdatedActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.Property<string>("MangaId")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnUpdateSometimes()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("MetadataFetcher")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("character varying(1024)");
|
||||
|
||||
b.HasDiscriminator().HasValue("Manga.MetadataUpdated");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("API.Schema.ActionsContext.Actions.StartupActionRecord", b =>
|
||||
{
|
||||
b.HasBaseType("API.Schema.ActionsContext.ActionRecord");
|
||||
|
||||
b.HasDiscriminator().HasValue("Tranga.Started");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user