//
using System;
using System.Collections.Generic;
using Kavita.Database;
using Kavita.Models.Entities.MetadataMatching;
using Kavita.Models.Entities.Progress;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Kavita.Database.Migrations
{
[DbContext(typeof(DataContext))]
partial class DataContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.5");
modelBuilder.Entity("AppUserCollectionSeries", b =>
{
b.Property("CollectionsId")
.HasColumnType("INTEGER");
b.Property("ItemsId")
.HasColumnType("INTEGER");
b.HasKey("CollectionsId", "ItemsId");
b.HasIndex("ItemsId");
b.ToTable("AppUserCollectionSeries");
});
modelBuilder.Entity("AppUserLibrary", b =>
{
b.Property("AppUsersId")
.HasColumnType("INTEGER");
b.Property("LibrariesId")
.HasColumnType("INTEGER");
b.HasKey("AppUsersId", "LibrariesId");
b.HasIndex("LibrariesId");
b.ToTable("AppUserLibrary");
});
modelBuilder.Entity("ChapterGenre", b =>
{
b.Property("ChaptersId")
.HasColumnType("INTEGER");
b.Property("GenresId")
.HasColumnType("INTEGER");
b.HasKey("ChaptersId", "GenresId");
b.HasIndex("GenresId");
b.ToTable("ChapterGenre");
});
modelBuilder.Entity("ChapterTag", b =>
{
b.Property("ChaptersId")
.HasColumnType("INTEGER");
b.Property("TagsId")
.HasColumnType("INTEGER");
b.HasKey("ChaptersId", "TagsId");
b.HasIndex("TagsId");
b.ToTable("ChapterTag");
});
modelBuilder.Entity("CollectionTagSeriesMetadata", b =>
{
b.Property("CollectionTagsId")
.HasColumnType("INTEGER");
b.Property("SeriesMetadatasId")
.HasColumnType("INTEGER");
b.HasKey("CollectionTagsId", "SeriesMetadatasId");
b.HasIndex("SeriesMetadatasId");
b.ToTable("CollectionTagSeriesMetadata");
});
modelBuilder.Entity("ExternalRatingExternalSeriesMetadata", b =>
{
b.Property("ExternalRatingsId")
.HasColumnType("INTEGER");
b.Property("ExternalSeriesMetadatasId")
.HasColumnType("INTEGER");
b.HasKey("ExternalRatingsId", "ExternalSeriesMetadatasId");
b.HasIndex("ExternalSeriesMetadatasId");
b.ToTable("ExternalRatingExternalSeriesMetadata");
});
modelBuilder.Entity("ExternalRecommendationExternalSeriesMetadata", b =>
{
b.Property("ExternalRecommendationsId")
.HasColumnType("INTEGER");
b.Property("ExternalSeriesMetadatasId")
.HasColumnType("INTEGER");
b.HasKey("ExternalRecommendationsId", "ExternalSeriesMetadatasId");
b.HasIndex("ExternalSeriesMetadatasId");
b.ToTable("ExternalRecommendationExternalSeriesMetadata");
});
modelBuilder.Entity("ExternalReviewExternalSeriesMetadata", b =>
{
b.Property("ExternalReviewsId")
.HasColumnType("INTEGER");
b.Property("ExternalSeriesMetadatasId")
.HasColumnType("INTEGER");
b.HasKey("ExternalReviewsId", "ExternalSeriesMetadatasId");
b.HasIndex("ExternalSeriesMetadatasId");
b.ToTable("ExternalReviewExternalSeriesMetadata");
});
modelBuilder.Entity("Kavita.Models.Entities.Chapter", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AgeRating")
.HasColumnType("INTEGER");
b.Property("AgeRatingLocked")
.HasColumnType("INTEGER");
b.Property("AlternateCount")
.HasColumnType("INTEGER");
b.Property("AlternateNumber")
.HasColumnType("TEXT");
b.Property("AlternateSeries")
.HasColumnType("TEXT");
b.Property("AniListId")
.HasColumnType("INTEGER");
b.Property("AverageExternalRating")
.HasColumnType("REAL");
b.Property("AvgHoursToRead")
.HasColumnType("REAL");
b.Property("CharacterLocked")
.HasColumnType("INTEGER");
b.Property("ColoristLocked")
.HasColumnType("INTEGER");
b.Property("ComicVineId")
.HasColumnType("TEXT");
b.Property("Count")
.HasColumnType("INTEGER");
b.Property("CoverArtistLocked")
.HasColumnType("INTEGER");
b.Property("CoverImage")
.HasColumnType("TEXT");
b.Property("CoverImageLocked")
.HasColumnType("INTEGER");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("EditorLocked")
.HasColumnType("INTEGER");
b.Property("GenresLocked")
.HasColumnType("INTEGER");
b.Property("HardcoverId")
.HasColumnType("INTEGER");
b.Property("ISBN")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("");
b.Property("ISBNLocked")
.HasColumnType("INTEGER");
b.Property("ImprintLocked")
.HasColumnType("INTEGER");
b.Property("InkerLocked")
.HasColumnType("INTEGER");
b.Property("IsSpecial")
.HasColumnType("INTEGER");
b.Property("KPlusOverrides")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("[]");
b.Property("Language")
.HasColumnType("TEXT");
b.Property("LanguageLocked")
.HasColumnType("INTEGER");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("LettererLocked")
.HasColumnType("INTEGER");
b.Property("LocationLocked")
.HasColumnType("INTEGER");
b.Property("MalId")
.HasColumnType("INTEGER");
b.Property("MangaBakaId")
.HasColumnType("INTEGER");
b.Property("MaxHoursToRead")
.HasColumnType("INTEGER");
b.Property("MaxNumber")
.HasColumnType("REAL");
b.Property("MetronId")
.HasColumnType("INTEGER");
b.Property("MinHoursToRead")
.HasColumnType("INTEGER");
b.Property("MinNumber")
.HasColumnType("REAL");
b.Property("Number")
.HasColumnType("TEXT");
b.Property("Pages")
.HasColumnType("INTEGER");
b.Property("PencillerLocked")
.HasColumnType("INTEGER");
b.Property("PrimaryColor")
.HasColumnType("TEXT");
b.Property("PublisherLocked")
.HasColumnType("INTEGER");
b.Property("Range")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("ReleaseDateLocked")
.HasColumnType("INTEGER");
b.Property("SecondaryColor")
.HasColumnType("TEXT");
b.Property("SeriesGroup")
.HasColumnType("TEXT");
b.Property("SortOrder")
.HasColumnType("REAL");
b.Property("SortOrderLocked")
.HasColumnType("INTEGER");
b.Property("StoryArc")
.HasColumnType("TEXT");
b.Property("StoryArcNumber")
.HasColumnType("TEXT");
b.Property("Summary")
.HasColumnType("TEXT");
b.Property("SummaryLocked")
.HasColumnType("INTEGER");
b.Property("TagsLocked")
.HasColumnType("INTEGER");
b.Property("TeamLocked")
.HasColumnType("INTEGER");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("TitleName")
.HasColumnType("TEXT");
b.Property("TitleNameLocked")
.HasColumnType("INTEGER");
b.Property("TotalCount")
.HasColumnType("INTEGER");
b.Property("TranslatorLocked")
.HasColumnType("INTEGER");
b.Property("VolumeId")
.HasColumnType("INTEGER");
b.Property("WebLinks")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("");
b.Property("WordCount")
.HasColumnType("INTEGER");
b.Property("WriterLocked")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("TitleName")
.HasDatabaseName("IX_Chapter_TitleName");
b.HasIndex("VolumeId");
b.ToTable("Chapter");
});
modelBuilder.Entity("Kavita.Models.Entities.CollectionTag", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CoverImage")
.HasColumnType("TEXT");
b.Property("CoverImageLocked")
.HasColumnType("INTEGER");
b.Property("NormalizedTitle")
.HasColumnType("TEXT");
b.Property("Promoted")
.HasColumnType("INTEGER");
b.Property("RowVersion")
.HasColumnType("INTEGER");
b.Property("Summary")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Id", "Promoted")
.IsUnique();
b.ToTable("CollectionTag");
});
modelBuilder.Entity("Kavita.Models.Entities.Device", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AppUserId")
.HasColumnType("INTEGER");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("EmailAddress")
.HasColumnType("TEXT");
b.Property("IpAddress")
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("LastUsed")
.HasColumnType("TEXT");
b.Property("LastUsedUtc")
.HasColumnType("TEXT");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("Platform")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("AppUserId");
b.ToTable("Device");
});
modelBuilder.Entity("Kavita.Models.Entities.EmailHistory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AppUserId")
.HasColumnType("INTEGER");
b.Property("Body")
.HasColumnType("TEXT");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("DeliveryStatus")
.HasColumnType("TEXT");
b.Property("EmailTemplate")
.HasColumnType("TEXT");
b.Property("ErrorMessage")
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("SendDate")
.HasColumnType("TEXT");
b.Property("Sent")
.HasColumnType("INTEGER");
b.Property("Subject")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AppUserId");
b.HasIndex("Sent", "AppUserId", "EmailTemplate", "SendDate");
b.ToTable("EmailHistory");
});
modelBuilder.Entity("Kavita.Models.Entities.EpubFont", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("FileName")
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("NormalizedName")
.HasColumnType("TEXT");
b.Property("Provider")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("EpubFont");
});
modelBuilder.Entity("Kavita.Models.Entities.FolderPath", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LastScanned")
.HasColumnType("TEXT");
b.Property("LibraryId")
.HasColumnType("INTEGER");
b.Property("Path")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("LibraryId");
b.ToTable("FolderPath");
});
modelBuilder.Entity("Kavita.Models.Entities.Genre", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("NormalizedTitle")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedTitle")
.IsUnique();
b.ToTable("Genre");
});
modelBuilder.Entity("Kavita.Models.Entities.History.ManualMigrationHistory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("ProductVersion")
.HasColumnType("TEXT");
b.Property("RanAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ManualMigrationHistory");
});
modelBuilder.Entity("Kavita.Models.Entities.Library", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AllowMetadataMatching")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("AllowScrobbling")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("CoverImage")
.HasColumnType("TEXT");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("DefaultLanguage")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("");
b.Property("EnableMetadata")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("FolderWatching")
.HasColumnType("INTEGER");
b.Property("IncludeInDashboard")
.HasColumnType("INTEGER");
b.Property("IncludeInRecommended")
.HasColumnType("INTEGER");
b.Property("IncludeInSearch")
.HasColumnType("INTEGER");
b.Property("InheritWebLinksFromFirstChapter")
.HasColumnType("INTEGER");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("LastScanned")
.HasColumnType("TEXT");
b.Property("ManageCollections")
.HasColumnType("INTEGER");
b.Property("ManageReadingLists")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("PrimaryColor")
.HasColumnType("TEXT");
b.Property("RemovePrefixForSortName")
.HasColumnType("INTEGER");
b.Property("SecondaryColor")
.HasColumnType("TEXT");
b.Property("Type")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Library");
});
modelBuilder.Entity("Kavita.Models.Entities.LibraryExcludePattern", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LibraryId")
.HasColumnType("INTEGER");
b.Property("Pattern")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("LibraryId");
b.ToTable("LibraryExcludePattern");
});
modelBuilder.Entity("Kavita.Models.Entities.LibraryFileTypeGroup", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("FileTypeGroup")
.HasColumnType("INTEGER");
b.Property("LibraryId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("LibraryId");
b.ToTable("LibraryFileTypeGroup");
});
modelBuilder.Entity("Kavita.Models.Entities.MangaFile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Bytes")
.HasColumnType("INTEGER");
b.Property("ChapterId")
.HasColumnType("INTEGER");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("Extension")
.HasColumnType("TEXT");
b.Property("FileName")
.HasColumnType("TEXT");
b.Property("FilePath")
.HasColumnType("TEXT");
b.Property("Format")
.HasColumnType("INTEGER");
b.Property("KoreaderHash")
.HasColumnType("TEXT");
b.Property("LastFileAnalysis")
.HasColumnType("TEXT");
b.Property("LastFileAnalysisUtc")
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("Pages")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ChapterId");
b.HasIndex("FilePath")
.HasDatabaseName("IX_MangaFile_FilePath");
b.ToTable("MangaFile");
});
modelBuilder.Entity("Kavita.Models.Entities.MediaError", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Comment")
.HasColumnType("TEXT");
b.Property("Created")
.HasColumnType("TEXT");
b.Property("CreatedUtc")
.HasColumnType("TEXT");
b.Property("Details")
.HasColumnType("TEXT");
b.Property("Extension")
.HasColumnType("TEXT");
b.Property("FilePath")
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("MediaError");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.ExternalRating", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Authority")
.HasColumnType("INTEGER");
b.Property("AverageScore")
.HasColumnType("INTEGER");
b.Property("ChapterId")
.HasColumnType("INTEGER");
b.Property("FavoriteCount")
.HasColumnType("INTEGER");
b.Property("Provider")
.HasColumnType("INTEGER");
b.Property("ProviderUrl")
.HasColumnType("TEXT");
b.Property("SeriesId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ChapterId");
b.ToTable("ExternalRating");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.ExternalRecommendation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AniListId")
.HasColumnType("INTEGER");
b.Property("CoverUrl")
.HasColumnType("TEXT");
b.Property("MalId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("Provider")
.HasColumnType("INTEGER");
b.Property("SeriesId")
.HasColumnType("INTEGER");
b.Property("Summary")
.HasColumnType("TEXT");
b.Property("Url")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("SeriesId");
b.ToTable("ExternalRecommendation");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.ExternalReview", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Authority")
.HasColumnType("INTEGER");
b.Property("Body")
.HasColumnType("TEXT");
b.Property("BodyJustText")
.HasColumnType("TEXT");
b.Property("ChapterId")
.HasColumnType("INTEGER");
b.Property("Provider")
.HasColumnType("INTEGER");
b.Property("Rating")
.HasColumnType("INTEGER");
b.Property("RawBody")
.HasColumnType("TEXT");
b.Property("Score")
.HasColumnType("INTEGER");
b.Property("SeriesId")
.HasColumnType("INTEGER");
b.Property("SiteUrl")
.HasColumnType("TEXT");
b.Property("Tagline")
.HasColumnType("TEXT");
b.Property("TotalVotes")
.HasColumnType("INTEGER");
b.Property("Username")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ChapterId");
b.ToTable("ExternalReview");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.ExternalSeriesMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AniListId")
.HasColumnType("INTEGER");
b.Property("AverageExternalRating")
.HasColumnType("INTEGER");
b.Property("CbrId")
.HasColumnType("INTEGER");
b.Property("GoogleBooksId")
.HasColumnType("TEXT");
b.Property("MalId")
.HasColumnType("INTEGER");
b.Property("SeriesId")
.HasColumnType("INTEGER");
b.Property("ValidUntilUtc")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("SeriesId")
.IsUnique();
b.ToTable("ExternalSeriesMetadata");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.GenreSeriesMetadata", b =>
{
b.Property("GenresId")
.HasColumnType("INTEGER");
b.Property("SeriesMetadatasId")
.HasColumnType("INTEGER");
b.HasKey("GenresId", "SeriesMetadatasId");
b.HasIndex("SeriesMetadatasId");
b.ToTable("GenreSeriesMetadata");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.SeriesBlacklist", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LastChecked")
.HasColumnType("TEXT");
b.Property("SeriesId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SeriesId");
b.ToTable("SeriesBlacklist");
});
modelBuilder.Entity("Kavita.Models.Entities.Metadata.SeriesMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AgeRating")
.HasColumnType("INTEGER");
b.Property("AgeRatingLocked")
.HasColumnType("INTEGER");
b.Property("CharacterLocked")
.HasColumnType("INTEGER");
b.Property("ColoristLocked")
.HasColumnType("INTEGER");
b.Property("CoverArtistLocked")
.HasColumnType("INTEGER");
b.Property("EditorLocked")
.HasColumnType("INTEGER");
b.Property("GenresLocked")
.HasColumnType("INTEGER");
b.Property("ImprintLocked")
.HasColumnType("INTEGER");
b.Property("InkerLocked")
.HasColumnType("INTEGER");
b.Property("KPlusOverrides")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("[]");
b.Property("Language")
.HasColumnType("TEXT");
b.Property("LanguageLocked")
.HasColumnType("INTEGER");
b.Property("LettererLocked")
.HasColumnType("INTEGER");
b.Property("LocationLocked")
.HasColumnType("INTEGER");
b.Property("MaxCount")
.HasColumnType("INTEGER");
b.Property("PencillerLocked")
.HasColumnType("INTEGER");
b.Property("PublicationStatus")
.HasColumnType("INTEGER");
b.Property("PublicationStatusLocked")
.HasColumnType("INTEGER");
b.Property("PublisherLocked")
.HasColumnType("INTEGER");
b.Property("ReleaseYear")
.HasColumnType("INTEGER");
b.Property