< Summary - Jellyfin

Line coverage
99%
Covered lines: 1719
Uncovered lines: 4
Coverable lines: 1723
Total lines: 1822
Line coverage: 99.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/4/2026 - 12:15:16 AM Line coverage: 99.7% (1719/1723) Total lines: 1822

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260118182305_AddIndicesToImageInfo.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddIndicesToImageInfo : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.CreateIndex(
 2114                name: "IX_BaseItemImageInfos_ItemId_ImageType",
 2115                table: "BaseItemImageInfos",
 2116                columns: new[] { "ItemId", "ImageType" });
 2117        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_BaseItemImageInfos_ItemId_ImageType",
 024                table: "BaseItemImageInfos");
 025        }
 26    }
 27}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260118182305_AddIndicesToImageInfo.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260118182305_AddIndicesToImageInfo")]
 15    partial class AddIndicesToImageInfo
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2121            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2123            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2124                {
 2125                    b.Property<int>("Id")
 2126                        .ValueGeneratedOnAdd()
 2127                        .HasColumnType("INTEGER");
 2128
 2129                    b.Property<int>("DayOfWeek")
 2130                        .HasColumnType("INTEGER");
 2131
 2132                    b.Property<double>("EndHour")
 2133                        .HasColumnType("REAL");
 2134
 2135                    b.Property<double>("StartHour")
 2136                        .HasColumnType("REAL");
 2137
 2138                    b.Property<Guid>("UserId")
 2139                        .HasColumnType("TEXT");
 2140
 2141                    b.HasKey("Id");
 2142
 2143                    b.HasIndex("UserId");
 2144
 2145                    b.ToTable("AccessSchedules");
 2146
 2147                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2148                });
 49
 2150            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2151                {
 2152                    b.Property<int>("Id")
 2153                        .ValueGeneratedOnAdd()
 2154                        .HasColumnType("INTEGER");
 2155
 2156                    b.Property<DateTime>("DateCreated")
 2157                        .HasColumnType("TEXT");
 2158
 2159                    b.Property<string>("ItemId")
 2160                        .HasMaxLength(256)
 2161                        .HasColumnType("TEXT");
 2162
 2163                    b.Property<int>("LogSeverity")
 2164                        .HasColumnType("INTEGER");
 2165
 2166                    b.Property<string>("Name")
 2167                        .IsRequired()
 2168                        .HasMaxLength(512)
 2169                        .HasColumnType("TEXT");
 2170
 2171                    b.Property<string>("Overview")
 2172                        .HasMaxLength(512)
 2173                        .HasColumnType("TEXT");
 2174
 2175                    b.Property<uint>("RowVersion")
 2176                        .IsConcurrencyToken()
 2177                        .HasColumnType("INTEGER");
 2178
 2179                    b.Property<string>("ShortOverview")
 2180                        .HasMaxLength(512)
 2181                        .HasColumnType("TEXT");
 2182
 2183                    b.Property<string>("Type")
 2184                        .IsRequired()
 2185                        .HasMaxLength(256)
 2186                        .HasColumnType("TEXT");
 2187
 2188                    b.Property<Guid>("UserId")
 2189                        .HasColumnType("TEXT");
 2190
 2191                    b.HasKey("Id");
 2192
 2193                    b.HasIndex("DateCreated");
 2194
 2195                    b.ToTable("ActivityLogs");
 2196
 2197                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2198                });
 99
 21100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 21101                {
 21102                    b.Property<Guid>("ItemId")
 21103                        .HasColumnType("TEXT");
 21104
 21105                    b.Property<Guid>("ParentItemId")
 21106                        .HasColumnType("TEXT");
 21107
 21108                    b.HasKey("ItemId", "ParentItemId");
 21109
 21110                    b.HasIndex("ParentItemId");
 21111
 21112                    b.ToTable("AncestorIds");
 21113
 21114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21115                });
 116
 21117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 21118                {
 21119                    b.Property<Guid>("ItemId")
 21120                        .HasColumnType("TEXT");
 21121
 21122                    b.Property<int>("Index")
 21123                        .HasColumnType("INTEGER");
 21124
 21125                    b.Property<string>("Codec")
 21126                        .HasColumnType("TEXT");
 21127
 21128                    b.Property<string>("CodecTag")
 21129                        .HasColumnType("TEXT");
 21130
 21131                    b.Property<string>("Comment")
 21132                        .HasColumnType("TEXT");
 21133
 21134                    b.Property<string>("Filename")
 21135                        .HasColumnType("TEXT");
 21136
 21137                    b.Property<string>("MimeType")
 21138                        .HasColumnType("TEXT");
 21139
 21140                    b.HasKey("ItemId", "Index");
 21141
 21142                    b.ToTable("AttachmentStreamInfos");
 21143
 21144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21145                });
 146
 21147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 21148                {
 21149                    b.Property<Guid>("Id")
 21150                        .ValueGeneratedOnAdd()
 21151                        .HasColumnType("TEXT");
 21152
 21153                    b.Property<string>("Album")
 21154                        .HasColumnType("TEXT");
 21155
 21156                    b.Property<string>("AlbumArtists")
 21157                        .HasColumnType("TEXT");
 21158
 21159                    b.Property<string>("Artists")
 21160                        .HasColumnType("TEXT");
 21161
 21162                    b.Property<int?>("Audio")
 21163                        .HasColumnType("INTEGER");
 21164
 21165                    b.Property<Guid?>("ChannelId")
 21166                        .HasColumnType("TEXT");
 21167
 21168                    b.Property<string>("CleanName")
 21169                        .HasColumnType("TEXT");
 21170
 21171                    b.Property<float?>("CommunityRating")
 21172                        .HasColumnType("REAL");
 21173
 21174                    b.Property<float?>("CriticRating")
 21175                        .HasColumnType("REAL");
 21176
 21177                    b.Property<string>("CustomRating")
 21178                        .HasColumnType("TEXT");
 21179
 21180                    b.Property<string>("Data")
 21181                        .HasColumnType("TEXT");
 21182
 21183                    b.Property<DateTime?>("DateCreated")
 21184                        .HasColumnType("TEXT");
 21185
 21186                    b.Property<DateTime?>("DateLastMediaAdded")
 21187                        .HasColumnType("TEXT");
 21188
 21189                    b.Property<DateTime?>("DateLastRefreshed")
 21190                        .HasColumnType("TEXT");
 21191
 21192                    b.Property<DateTime?>("DateLastSaved")
 21193                        .HasColumnType("TEXT");
 21194
 21195                    b.Property<DateTime?>("DateModified")
 21196                        .HasColumnType("TEXT");
 21197
 21198                    b.Property<DateTime?>("EndDate")
 21199                        .HasColumnType("TEXT");
 21200
 21201                    b.Property<string>("EpisodeTitle")
 21202                        .HasColumnType("TEXT");
 21203
 21204                    b.Property<string>("ExternalId")
 21205                        .HasColumnType("TEXT");
 21206
 21207                    b.Property<string>("ExternalSeriesId")
 21208                        .HasColumnType("TEXT");
 21209
 21210                    b.Property<string>("ExternalServiceId")
 21211                        .HasColumnType("TEXT");
 21212
 21213                    b.Property<int?>("ExtraType")
 21214                        .HasColumnType("INTEGER");
 21215
 21216                    b.Property<string>("ForcedSortName")
 21217                        .HasColumnType("TEXT");
 21218
 21219                    b.Property<string>("Genres")
 21220                        .HasColumnType("TEXT");
 21221
 21222                    b.Property<int?>("Height")
 21223                        .HasColumnType("INTEGER");
 21224
 21225                    b.Property<int?>("IndexNumber")
 21226                        .HasColumnType("INTEGER");
 21227
 21228                    b.Property<int?>("InheritedParentalRatingSubValue")
 21229                        .HasColumnType("INTEGER");
 21230
 21231                    b.Property<int?>("InheritedParentalRatingValue")
 21232                        .HasColumnType("INTEGER");
 21233
 21234                    b.Property<bool>("IsFolder")
 21235                        .HasColumnType("INTEGER");
 21236
 21237                    b.Property<bool>("IsInMixedFolder")
 21238                        .HasColumnType("INTEGER");
 21239
 21240                    b.Property<bool>("IsLocked")
 21241                        .HasColumnType("INTEGER");
 21242
 21243                    b.Property<bool>("IsMovie")
 21244                        .HasColumnType("INTEGER");
 21245
 21246                    b.Property<bool>("IsRepeat")
 21247                        .HasColumnType("INTEGER");
 21248
 21249                    b.Property<bool>("IsSeries")
 21250                        .HasColumnType("INTEGER");
 21251
 21252                    b.Property<bool>("IsVirtualItem")
 21253                        .HasColumnType("INTEGER");
 21254
 21255                    b.Property<float?>("LUFS")
 21256                        .HasColumnType("REAL");
 21257
 21258                    b.Property<string>("MediaType")
 21259                        .HasColumnType("TEXT");
 21260
 21261                    b.Property<string>("Name")
 21262                        .HasColumnType("TEXT");
 21263
 21264                    b.Property<float?>("NormalizationGain")
 21265                        .HasColumnType("REAL");
 21266
 21267                    b.Property<string>("OfficialRating")
 21268                        .HasColumnType("TEXT");
 21269
 21270                    b.Property<string>("OriginalTitle")
 21271                        .HasColumnType("TEXT");
 21272
 21273                    b.Property<string>("Overview")
 21274                        .HasColumnType("TEXT");
 21275
 21276                    b.Property<Guid?>("OwnerId")
 21277                        .HasColumnType("TEXT");
 21278
 21279                    b.Property<Guid?>("ParentId")
 21280                        .HasColumnType("TEXT");
 21281
 21282                    b.Property<int?>("ParentIndexNumber")
 21283                        .HasColumnType("INTEGER");
 21284
 21285                    b.Property<string>("Path")
 21286                        .HasColumnType("TEXT");
 21287
 21288                    b.Property<string>("PreferredMetadataCountryCode")
 21289                        .HasColumnType("TEXT");
 21290
 21291                    b.Property<string>("PreferredMetadataLanguage")
 21292                        .HasColumnType("TEXT");
 21293
 21294                    b.Property<DateTime?>("PremiereDate")
 21295                        .HasColumnType("TEXT");
 21296
 21297                    b.Property<string>("PresentationUniqueKey")
 21298                        .HasColumnType("TEXT");
 21299
 21300                    b.Property<string>("PrimaryVersionId")
 21301                        .HasColumnType("TEXT");
 21302
 21303                    b.Property<string>("ProductionLocations")
 21304                        .HasColumnType("TEXT");
 21305
 21306                    b.Property<int?>("ProductionYear")
 21307                        .HasColumnType("INTEGER");
 21308
 21309                    b.Property<long?>("RunTimeTicks")
 21310                        .HasColumnType("INTEGER");
 21311
 21312                    b.Property<Guid?>("SeasonId")
 21313                        .HasColumnType("TEXT");
 21314
 21315                    b.Property<string>("SeasonName")
 21316                        .HasColumnType("TEXT");
 21317
 21318                    b.Property<Guid?>("SeriesId")
 21319                        .HasColumnType("TEXT");
 21320
 21321                    b.Property<string>("SeriesName")
 21322                        .HasColumnType("TEXT");
 21323
 21324                    b.Property<string>("SeriesPresentationUniqueKey")
 21325                        .HasColumnType("TEXT");
 21326
 21327                    b.Property<string>("ShowId")
 21328                        .HasColumnType("TEXT");
 21329
 21330                    b.Property<long?>("Size")
 21331                        .HasColumnType("INTEGER");
 21332
 21333                    b.Property<string>("SortName")
 21334                        .HasColumnType("TEXT");
 21335
 21336                    b.Property<DateTime?>("StartDate")
 21337                        .HasColumnType("TEXT");
 21338
 21339                    b.Property<string>("Studios")
 21340                        .HasColumnType("TEXT");
 21341
 21342                    b.Property<string>("Tagline")
 21343                        .HasColumnType("TEXT");
 21344
 21345                    b.Property<string>("Tags")
 21346                        .HasColumnType("TEXT");
 21347
 21348                    b.Property<Guid?>("TopParentId")
 21349                        .HasColumnType("TEXT");
 21350
 21351                    b.Property<int?>("TotalBitrate")
 21352                        .HasColumnType("INTEGER");
 21353
 21354                    b.Property<string>("Type")
 21355                        .IsRequired()
 21356                        .HasColumnType("TEXT");
 21357
 21358                    b.Property<string>("UnratedType")
 21359                        .HasColumnType("TEXT");
 21360
 21361                    b.Property<int?>("Width")
 21362                        .HasColumnType("INTEGER");
 21363
 21364                    b.HasKey("Id");
 21365
 21366                    b.HasIndex("ExtraType");
 21367
 21368                    b.HasIndex("OwnerId");
 21369
 21370                    b.HasIndex("ParentId");
 21371
 21372                    b.HasIndex("Path");
 21373
 21374                    b.HasIndex("PresentationUniqueKey");
 21375
 21376                    b.HasIndex("ExtraType", "OwnerId");
 21377
 21378                    b.HasIndex("TopParentId", "Id");
 21379
 21380                    b.HasIndex("Type", "TopParentId", "Id");
 21381
 21382                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21383
 21384                    b.HasIndex("Type", "TopParentId", "StartDate");
 21385
 21386                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 21387
 21388                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21389
 21390                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 21391
 21392                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 21393
 21394                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 21395
 21396                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21397
 21398                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21399
 21400                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21401
 21402                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21403
 21404                    b.ToTable("BaseItems");
 21405
 21406                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21407
 21408                    b.HasData(
 21409                        new
 21410                        {
 21411                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 21412                            IsFolder = false,
 21413                            IsInMixedFolder = false,
 21414                            IsLocked = false,
 21415                            IsMovie = false,
 21416                            IsRepeat = false,
 21417                            IsSeries = false,
 21418                            IsVirtualItem = false,
 21419                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 21420                            Type = "PLACEHOLDER"
 21421                        });
 21422                });
 423
 21424            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21425                {
 21426                    b.Property<Guid>("Id")
 21427                        .ValueGeneratedOnAdd()
 21428                        .HasColumnType("TEXT");
 21429
 21430                    b.Property<byte[]>("Blurhash")
 21431                        .HasColumnType("BLOB");
 21432
 21433                    b.Property<DateTime?>("DateModified")
 21434                        .HasColumnType("TEXT");
 21435
 21436                    b.Property<int>("Height")
 21437                        .HasColumnType("INTEGER");
 21438
 21439                    b.Property<int>("ImageType")
 21440                        .HasColumnType("INTEGER");
 21441
 21442                    b.Property<Guid>("ItemId")
 21443                        .HasColumnType("TEXT");
 21444
 21445                    b.Property<string>("Path")
 21446                        .IsRequired()
 21447                        .HasColumnType("TEXT");
 21448
 21449                    b.Property<int>("Width")
 21450                        .HasColumnType("INTEGER");
 21451
 21452                    b.HasKey("Id");
 21453
 21454                    b.HasIndex("ItemId");
 21455
 21456                    b.HasIndex("ItemId", "ImageType");
 21457
 21458                    b.ToTable("BaseItemImageInfos");
 21459
 21460                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21461                });
 462
 21463            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21464                {
 21465                    b.Property<int>("Id")
 21466                        .HasColumnType("INTEGER");
 21467
 21468                    b.Property<Guid>("ItemId")
 21469                        .HasColumnType("TEXT");
 21470
 21471                    b.HasKey("Id", "ItemId");
 21472
 21473                    b.HasIndex("ItemId");
 21474
 21475                    b.ToTable("BaseItemMetadataFields");
 21476
 21477                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21478                });
 479
 21480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21481                {
 21482                    b.Property<Guid>("ItemId")
 21483                        .HasColumnType("TEXT");
 21484
 21485                    b.Property<string>("ProviderId")
 21486                        .HasColumnType("TEXT");
 21487
 21488                    b.Property<string>("ProviderValue")
 21489                        .IsRequired()
 21490                        .HasColumnType("TEXT");
 21491
 21492                    b.HasKey("ItemId", "ProviderId");
 21493
 21494                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21495
 21496                    b.ToTable("BaseItemProviders");
 21497
 21498                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21499                });
 500
 21501            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21502                {
 21503                    b.Property<int>("Id")
 21504                        .HasColumnType("INTEGER");
 21505
 21506                    b.Property<Guid>("ItemId")
 21507                        .HasColumnType("TEXT");
 21508
 21509                    b.HasKey("Id", "ItemId");
 21510
 21511                    b.HasIndex("ItemId");
 21512
 21513                    b.ToTable("BaseItemTrailerTypes");
 21514
 21515                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21516                });
 517
 21518            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21519                {
 21520                    b.Property<Guid>("ItemId")
 21521                        .HasColumnType("TEXT");
 21522
 21523                    b.Property<int>("ChapterIndex")
 21524                        .HasColumnType("INTEGER");
 21525
 21526                    b.Property<DateTime?>("ImageDateModified")
 21527                        .HasColumnType("TEXT");
 21528
 21529                    b.Property<string>("ImagePath")
 21530                        .HasColumnType("TEXT");
 21531
 21532                    b.Property<string>("Name")
 21533                        .HasColumnType("TEXT");
 21534
 21535                    b.Property<long>("StartPositionTicks")
 21536                        .HasColumnType("INTEGER");
 21537
 21538                    b.HasKey("ItemId", "ChapterIndex");
 21539
 21540                    b.ToTable("Chapters");
 21541
 21542                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21543                });
 544
 21545            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21546                {
 21547                    b.Property<int>("Id")
 21548                        .ValueGeneratedOnAdd()
 21549                        .HasColumnType("INTEGER");
 21550
 21551                    b.Property<string>("Client")
 21552                        .IsRequired()
 21553                        .HasMaxLength(32)
 21554                        .HasColumnType("TEXT");
 21555
 21556                    b.Property<Guid>("ItemId")
 21557                        .HasColumnType("TEXT");
 21558
 21559                    b.Property<string>("Key")
 21560                        .IsRequired()
 21561                        .HasColumnType("TEXT");
 21562
 21563                    b.Property<Guid>("UserId")
 21564                        .HasColumnType("TEXT");
 21565
 21566                    b.Property<string>("Value")
 21567                        .HasColumnType("TEXT");
 21568
 21569                    b.HasKey("Id");
 21570
 21571                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21572                        .IsUnique();
 21573
 21574                    b.ToTable("CustomItemDisplayPreferences");
 21575
 21576                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21577                });
 578
 21579            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21580                {
 21581                    b.Property<int>("Id")
 21582                        .ValueGeneratedOnAdd()
 21583                        .HasColumnType("INTEGER");
 21584
 21585                    b.Property<int>("ChromecastVersion")
 21586                        .HasColumnType("INTEGER");
 21587
 21588                    b.Property<string>("Client")
 21589                        .IsRequired()
 21590                        .HasMaxLength(32)
 21591                        .HasColumnType("TEXT");
 21592
 21593                    b.Property<string>("DashboardTheme")
 21594                        .HasMaxLength(32)
 21595                        .HasColumnType("TEXT");
 21596
 21597                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21598                        .HasColumnType("INTEGER");
 21599
 21600                    b.Property<int?>("IndexBy")
 21601                        .HasColumnType("INTEGER");
 21602
 21603                    b.Property<Guid>("ItemId")
 21604                        .HasColumnType("TEXT");
 21605
 21606                    b.Property<int>("ScrollDirection")
 21607                        .HasColumnType("INTEGER");
 21608
 21609                    b.Property<bool>("ShowBackdrop")
 21610                        .HasColumnType("INTEGER");
 21611
 21612                    b.Property<bool>("ShowSidebar")
 21613                        .HasColumnType("INTEGER");
 21614
 21615                    b.Property<int>("SkipBackwardLength")
 21616                        .HasColumnType("INTEGER");
 21617
 21618                    b.Property<int>("SkipForwardLength")
 21619                        .HasColumnType("INTEGER");
 21620
 21621                    b.Property<string>("TvHome")
 21622                        .HasMaxLength(32)
 21623                        .HasColumnType("TEXT");
 21624
 21625                    b.Property<Guid>("UserId")
 21626                        .HasColumnType("TEXT");
 21627
 21628                    b.HasKey("Id");
 21629
 21630                    b.HasIndex("UserId", "ItemId", "Client")
 21631                        .IsUnique();
 21632
 21633                    b.ToTable("DisplayPreferences");
 21634
 21635                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21636                });
 637
 21638            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21639                {
 21640                    b.Property<int>("Id")
 21641                        .ValueGeneratedOnAdd()
 21642                        .HasColumnType("INTEGER");
 21643
 21644                    b.Property<int>("DisplayPreferencesId")
 21645                        .HasColumnType("INTEGER");
 21646
 21647                    b.Property<int>("Order")
 21648                        .HasColumnType("INTEGER");
 21649
 21650                    b.Property<int>("Type")
 21651                        .HasColumnType("INTEGER");
 21652
 21653                    b.HasKey("Id");
 21654
 21655                    b.HasIndex("DisplayPreferencesId");
 21656
 21657                    b.ToTable("HomeSection");
 21658
 21659                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21660                });
 661
 21662            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21663                {
 21664                    b.Property<int>("Id")
 21665                        .ValueGeneratedOnAdd()
 21666                        .HasColumnType("INTEGER");
 21667
 21668                    b.Property<DateTime>("LastModified")
 21669                        .HasColumnType("TEXT");
 21670
 21671                    b.Property<string>("Path")
 21672                        .IsRequired()
 21673                        .HasMaxLength(512)
 21674                        .HasColumnType("TEXT");
 21675
 21676                    b.Property<Guid?>("UserId")
 21677                        .HasColumnType("TEXT");
 21678
 21679                    b.HasKey("Id");
 21680
 21681                    b.HasIndex("UserId")
 21682                        .IsUnique();
 21683
 21684                    b.ToTable("ImageInfos");
 21685
 21686                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21687                });
 688
 21689            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21690                {
 21691                    b.Property<int>("Id")
 21692                        .ValueGeneratedOnAdd()
 21693                        .HasColumnType("INTEGER");
 21694
 21695                    b.Property<string>("Client")
 21696                        .IsRequired()
 21697                        .HasMaxLength(32)
 21698                        .HasColumnType("TEXT");
 21699
 21700                    b.Property<int?>("IndexBy")
 21701                        .HasColumnType("INTEGER");
 21702
 21703                    b.Property<Guid>("ItemId")
 21704                        .HasColumnType("TEXT");
 21705
 21706                    b.Property<bool>("RememberIndexing")
 21707                        .HasColumnType("INTEGER");
 21708
 21709                    b.Property<bool>("RememberSorting")
 21710                        .HasColumnType("INTEGER");
 21711
 21712                    b.Property<string>("SortBy")
 21713                        .IsRequired()
 21714                        .HasMaxLength(64)
 21715                        .HasColumnType("TEXT");
 21716
 21717                    b.Property<int>("SortOrder")
 21718                        .HasColumnType("INTEGER");
 21719
 21720                    b.Property<Guid>("UserId")
 21721                        .HasColumnType("TEXT");
 21722
 21723                    b.Property<int>("ViewType")
 21724                        .HasColumnType("INTEGER");
 21725
 21726                    b.HasKey("Id");
 21727
 21728                    b.HasIndex("UserId");
 21729
 21730                    b.ToTable("ItemDisplayPreferences");
 21731
 21732                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21733                });
 734
 21735            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21736                {
 21737                    b.Property<Guid>("ItemValueId")
 21738                        .ValueGeneratedOnAdd()
 21739                        .HasColumnType("TEXT");
 21740
 21741                    b.Property<string>("CleanValue")
 21742                        .IsRequired()
 21743                        .HasColumnType("TEXT");
 21744
 21745                    b.Property<int>("Type")
 21746                        .HasColumnType("INTEGER");
 21747
 21748                    b.Property<string>("Value")
 21749                        .IsRequired()
 21750                        .HasColumnType("TEXT");
 21751
 21752                    b.HasKey("ItemValueId");
 21753
 21754                    b.HasIndex("Type", "CleanValue");
 21755
 21756                    b.HasIndex("Type", "Value")
 21757                        .IsUnique();
 21758
 21759                    b.ToTable("ItemValues");
 21760
 21761                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21762                });
 763
 21764            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21765                {
 21766                    b.Property<Guid>("ItemValueId")
 21767                        .HasColumnType("TEXT");
 21768
 21769                    b.Property<Guid>("ItemId")
 21770                        .HasColumnType("TEXT");
 21771
 21772                    b.HasKey("ItemValueId", "ItemId");
 21773
 21774                    b.HasIndex("ItemId");
 21775
 21776                    b.ToTable("ItemValuesMap");
 21777
 21778                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21779                });
 780
 21781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21782                {
 21783                    b.Property<Guid>("ItemId")
 21784                        .HasColumnType("TEXT");
 21785
 21786                    b.PrimitiveCollection<string>("KeyframeTicks")
 21787                        .HasColumnType("TEXT");
 21788
 21789                    b.Property<long>("TotalDuration")
 21790                        .HasColumnType("INTEGER");
 21791
 21792                    b.HasKey("ItemId");
 21793
 21794                    b.ToTable("KeyframeData");
 21795
 21796                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21797                });
 798
 21799            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 21800                {
 21801                    b.Property<Guid>("ParentId")
 21802                        .HasColumnType("TEXT");
 21803
 21804                    b.Property<Guid>("ChildId")
 21805                        .HasColumnType("TEXT");
 21806
 21807                    b.Property<int>("ChildType")
 21808                        .HasColumnType("INTEGER");
 21809
 21810                    b.Property<int?>("SortOrder")
 21811                        .HasColumnType("INTEGER");
 21812
 21813                    b.HasKey("ParentId", "ChildId");
 21814
 21815                    b.HasIndex("ChildId");
 21816
 21817                    b.HasIndex("ParentId");
 21818
 21819                    b.HasIndex("ChildId", "ChildType");
 21820
 21821                    b.HasIndex("ParentId", "ChildType");
 21822
 21823                    b.HasIndex("ParentId", "SortOrder");
 21824
 21825                    b.ToTable("LinkedChildren", (string)null);
 21826
 21827                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21828                });
 829
 21830            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21831                {
 21832                    b.Property<Guid>("Id")
 21833                        .ValueGeneratedOnAdd()
 21834                        .HasColumnType("TEXT");
 21835
 21836                    b.Property<long>("EndTicks")
 21837                        .HasColumnType("INTEGER");
 21838
 21839                    b.Property<Guid>("ItemId")
 21840                        .HasColumnType("TEXT");
 21841
 21842                    b.Property<string>("SegmentProviderId")
 21843                        .IsRequired()
 21844                        .HasColumnType("TEXT");
 21845
 21846                    b.Property<long>("StartTicks")
 21847                        .HasColumnType("INTEGER");
 21848
 21849                    b.Property<int>("Type")
 21850                        .HasColumnType("INTEGER");
 21851
 21852                    b.HasKey("Id");
 21853
 21854                    b.ToTable("MediaSegments");
 21855
 21856                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21857                });
 858
 21859            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21860                {
 21861                    b.Property<Guid>("ItemId")
 21862                        .HasColumnType("TEXT");
 21863
 21864                    b.Property<int>("StreamIndex")
 21865                        .HasColumnType("INTEGER");
 21866
 21867                    b.Property<string>("AspectRatio")
 21868                        .HasColumnType("TEXT");
 21869
 21870                    b.Property<float?>("AverageFrameRate")
 21871                        .HasColumnType("REAL");
 21872
 21873                    b.Property<int?>("BitDepth")
 21874                        .HasColumnType("INTEGER");
 21875
 21876                    b.Property<int?>("BitRate")
 21877                        .HasColumnType("INTEGER");
 21878
 21879                    b.Property<int?>("BlPresentFlag")
 21880                        .HasColumnType("INTEGER");
 21881
 21882                    b.Property<string>("ChannelLayout")
 21883                        .HasColumnType("TEXT");
 21884
 21885                    b.Property<int?>("Channels")
 21886                        .HasColumnType("INTEGER");
 21887
 21888                    b.Property<string>("Codec")
 21889                        .HasColumnType("TEXT");
 21890
 21891                    b.Property<string>("CodecTag")
 21892                        .HasColumnType("TEXT");
 21893
 21894                    b.Property<string>("CodecTimeBase")
 21895                        .HasColumnType("TEXT");
 21896
 21897                    b.Property<string>("ColorPrimaries")
 21898                        .HasColumnType("TEXT");
 21899
 21900                    b.Property<string>("ColorSpace")
 21901                        .HasColumnType("TEXT");
 21902
 21903                    b.Property<string>("ColorTransfer")
 21904                        .HasColumnType("TEXT");
 21905
 21906                    b.Property<string>("Comment")
 21907                        .HasColumnType("TEXT");
 21908
 21909                    b.Property<int?>("DvBlSignalCompatibilityId")
 21910                        .HasColumnType("INTEGER");
 21911
 21912                    b.Property<int?>("DvLevel")
 21913                        .HasColumnType("INTEGER");
 21914
 21915                    b.Property<int?>("DvProfile")
 21916                        .HasColumnType("INTEGER");
 21917
 21918                    b.Property<int?>("DvVersionMajor")
 21919                        .HasColumnType("INTEGER");
 21920
 21921                    b.Property<int?>("DvVersionMinor")
 21922                        .HasColumnType("INTEGER");
 21923
 21924                    b.Property<int?>("ElPresentFlag")
 21925                        .HasColumnType("INTEGER");
 21926
 21927                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21928                        .HasColumnType("INTEGER");
 21929
 21930                    b.Property<int?>("Height")
 21931                        .HasColumnType("INTEGER");
 21932
 21933                    b.Property<bool?>("IsAnamorphic")
 21934                        .HasColumnType("INTEGER");
 21935
 21936                    b.Property<bool?>("IsAvc")
 21937                        .HasColumnType("INTEGER");
 21938
 21939                    b.Property<bool>("IsDefault")
 21940                        .HasColumnType("INTEGER");
 21941
 21942                    b.Property<bool>("IsExternal")
 21943                        .HasColumnType("INTEGER");
 21944
 21945                    b.Property<bool>("IsForced")
 21946                        .HasColumnType("INTEGER");
 21947
 21948                    b.Property<bool?>("IsHearingImpaired")
 21949                        .HasColumnType("INTEGER");
 21950
 21951                    b.Property<bool?>("IsInterlaced")
 21952                        .HasColumnType("INTEGER");
 21953
 21954                    b.Property<string>("KeyFrames")
 21955                        .HasColumnType("TEXT");
 21956
 21957                    b.Property<string>("Language")
 21958                        .HasColumnType("TEXT");
 21959
 21960                    b.Property<float?>("Level")
 21961                        .HasColumnType("REAL");
 21962
 21963                    b.Property<string>("NalLengthSize")
 21964                        .HasColumnType("TEXT");
 21965
 21966                    b.Property<string>("Path")
 21967                        .HasColumnType("TEXT");
 21968
 21969                    b.Property<string>("PixelFormat")
 21970                        .HasColumnType("TEXT");
 21971
 21972                    b.Property<string>("Profile")
 21973                        .HasColumnType("TEXT");
 21974
 21975                    b.Property<float?>("RealFrameRate")
 21976                        .HasColumnType("REAL");
 21977
 21978                    b.Property<int?>("RefFrames")
 21979                        .HasColumnType("INTEGER");
 21980
 21981                    b.Property<int?>("Rotation")
 21982                        .HasColumnType("INTEGER");
 21983
 21984                    b.Property<int?>("RpuPresentFlag")
 21985                        .HasColumnType("INTEGER");
 21986
 21987                    b.Property<int?>("SampleRate")
 21988                        .HasColumnType("INTEGER");
 21989
 21990                    b.Property<int>("StreamType")
 21991                        .HasColumnType("INTEGER");
 21992
 21993                    b.Property<string>("TimeBase")
 21994                        .HasColumnType("TEXT");
 21995
 21996                    b.Property<string>("Title")
 21997                        .HasColumnType("TEXT");
 21998
 21999                    b.Property<int?>("Width")
 211000                        .HasColumnType("INTEGER");
 211001
 211002                    b.HasKey("ItemId", "StreamIndex");
 211003
 211004                    b.HasIndex("StreamIndex");
 211005
 211006                    b.HasIndex("StreamType");
 211007
 211008                    b.HasIndex("StreamIndex", "StreamType");
 211009
 211010                    b.HasIndex("StreamIndex", "StreamType", "Language");
 211011
 211012                    b.ToTable("MediaStreamInfos");
 211013
 211014                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211015                });
 1016
 211017            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211018                {
 211019                    b.Property<Guid>("Id")
 211020                        .ValueGeneratedOnAdd()
 211021                        .HasColumnType("TEXT");
 211022
 211023                    b.Property<string>("Name")
 211024                        .IsRequired()
 211025                        .HasColumnType("TEXT");
 211026
 211027                    b.Property<string>("PersonType")
 211028                        .HasColumnType("TEXT");
 211029
 211030                    b.HasKey("Id");
 211031
 211032                    b.HasIndex("Name");
 211033
 211034                    b.ToTable("Peoples");
 211035
 211036                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211037                });
 1038
 211039            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211040                {
 211041                    b.Property<Guid>("ItemId")
 211042                        .HasColumnType("TEXT");
 211043
 211044                    b.Property<Guid>("PeopleId")
 211045                        .HasColumnType("TEXT");
 211046
 211047                    b.Property<string>("Role")
 211048                        .HasColumnType("TEXT");
 211049
 211050                    b.Property<int?>("ListOrder")
 211051                        .HasColumnType("INTEGER");
 211052
 211053                    b.Property<int?>("SortOrder")
 211054                        .HasColumnType("INTEGER");
 211055
 211056                    b.HasKey("ItemId", "PeopleId", "Role");
 211057
 211058                    b.HasIndex("PeopleId");
 211059
 211060                    b.HasIndex("ItemId", "ListOrder");
 211061
 211062                    b.HasIndex("ItemId", "SortOrder");
 211063
 211064                    b.ToTable("PeopleBaseItemMap");
 211065
 211066                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211067                });
 1068
 211069            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211070                {
 211071                    b.Property<int>("Id")
 211072                        .ValueGeneratedOnAdd()
 211073                        .HasColumnType("INTEGER");
 211074
 211075                    b.Property<int>("Kind")
 211076                        .HasColumnType("INTEGER");
 211077
 211078                    b.Property<Guid?>("Permission_Permissions_Guid")
 211079                        .HasColumnType("TEXT");
 211080
 211081                    b.Property<uint>("RowVersion")
 211082                        .IsConcurrencyToken()
 211083                        .HasColumnType("INTEGER");
 211084
 211085                    b.Property<Guid?>("UserId")
 211086                        .HasColumnType("TEXT");
 211087
 211088                    b.Property<bool>("Value")
 211089                        .HasColumnType("INTEGER");
 211090
 211091                    b.HasKey("Id");
 211092
 211093                    b.HasIndex("UserId", "Kind")
 211094                        .IsUnique()
 211095                        .HasFilter("[UserId] IS NOT NULL");
 211096
 211097                    b.ToTable("Permissions");
 211098
 211099                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211100                });
 1101
 211102            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211103                {
 211104                    b.Property<int>("Id")
 211105                        .ValueGeneratedOnAdd()
 211106                        .HasColumnType("INTEGER");
 211107
 211108                    b.Property<int>("Kind")
 211109                        .HasColumnType("INTEGER");
 211110
 211111                    b.Property<Guid?>("Preference_Preferences_Guid")
 211112                        .HasColumnType("TEXT");
 211113
 211114                    b.Property<uint>("RowVersion")
 211115                        .IsConcurrencyToken()
 211116                        .HasColumnType("INTEGER");
 211117
 211118                    b.Property<Guid?>("UserId")
 211119                        .HasColumnType("TEXT");
 211120
 211121                    b.Property<string>("Value")
 211122                        .IsRequired()
 211123                        .HasMaxLength(65535)
 211124                        .HasColumnType("TEXT");
 211125
 211126                    b.HasKey("Id");
 211127
 211128                    b.HasIndex("UserId", "Kind")
 211129                        .IsUnique()
 211130                        .HasFilter("[UserId] IS NOT NULL");
 211131
 211132                    b.ToTable("Preferences");
 211133
 211134                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211135                });
 1136
 211137            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211138                {
 211139                    b.Property<int>("Id")
 211140                        .ValueGeneratedOnAdd()
 211141                        .HasColumnType("INTEGER");
 211142
 211143                    b.Property<string>("AccessToken")
 211144                        .IsRequired()
 211145                        .HasColumnType("TEXT");
 211146
 211147                    b.Property<DateTime>("DateCreated")
 211148                        .HasColumnType("TEXT");
 211149
 211150                    b.Property<DateTime>("DateLastActivity")
 211151                        .HasColumnType("TEXT");
 211152
 211153                    b.Property<string>("Name")
 211154                        .IsRequired()
 211155                        .HasMaxLength(64)
 211156                        .HasColumnType("TEXT");
 211157
 211158                    b.HasKey("Id");
 211159
 211160                    b.HasIndex("AccessToken")
 211161                        .IsUnique();
 211162
 211163                    b.ToTable("ApiKeys");
 211164
 211165                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211166                });
 1167
 211168            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211169                {
 211170                    b.Property<int>("Id")
 211171                        .ValueGeneratedOnAdd()
 211172                        .HasColumnType("INTEGER");
 211173
 211174                    b.Property<string>("AccessToken")
 211175                        .IsRequired()
 211176                        .HasColumnType("TEXT");
 211177
 211178                    b.Property<string>("AppName")
 211179                        .IsRequired()
 211180                        .HasMaxLength(64)
 211181                        .HasColumnType("TEXT");
 211182
 211183                    b.Property<string>("AppVersion")
 211184                        .IsRequired()
 211185                        .HasMaxLength(32)
 211186                        .HasColumnType("TEXT");
 211187
 211188                    b.Property<DateTime>("DateCreated")
 211189                        .HasColumnType("TEXT");
 211190
 211191                    b.Property<DateTime>("DateLastActivity")
 211192                        .HasColumnType("TEXT");
 211193
 211194                    b.Property<DateTime>("DateModified")
 211195                        .HasColumnType("TEXT");
 211196
 211197                    b.Property<string>("DeviceId")
 211198                        .IsRequired()
 211199                        .HasMaxLength(256)
 211200                        .HasColumnType("TEXT");
 211201
 211202                    b.Property<string>("DeviceName")
 211203                        .IsRequired()
 211204                        .HasMaxLength(64)
 211205                        .HasColumnType("TEXT");
 211206
 211207                    b.Property<bool>("IsActive")
 211208                        .HasColumnType("INTEGER");
 211209
 211210                    b.Property<Guid>("UserId")
 211211                        .HasColumnType("TEXT");
 211212
 211213                    b.HasKey("Id");
 211214
 211215                    b.HasIndex("DeviceId");
 211216
 211217                    b.HasIndex("AccessToken", "DateLastActivity");
 211218
 211219                    b.HasIndex("DeviceId", "DateLastActivity");
 211220
 211221                    b.HasIndex("UserId", "DeviceId");
 211222
 211223                    b.ToTable("Devices");
 211224
 211225                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211226                });
 1227
 211228            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211229                {
 211230                    b.Property<int>("Id")
 211231                        .ValueGeneratedOnAdd()
 211232                        .HasColumnType("INTEGER");
 211233
 211234                    b.Property<string>("CustomName")
 211235                        .HasColumnType("TEXT");
 211236
 211237                    b.Property<string>("DeviceId")
 211238                        .IsRequired()
 211239                        .HasColumnType("TEXT");
 211240
 211241                    b.HasKey("Id");
 211242
 211243                    b.HasIndex("DeviceId")
 211244                        .IsUnique();
 211245
 211246                    b.ToTable("DeviceOptions");
 211247
 211248                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211249                });
 1250
 211251            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211252                {
 211253                    b.Property<Guid>("ItemId")
 211254                        .HasColumnType("TEXT");
 211255
 211256                    b.Property<int>("Width")
 211257                        .HasColumnType("INTEGER");
 211258
 211259                    b.Property<int>("Bandwidth")
 211260                        .HasColumnType("INTEGER");
 211261
 211262                    b.Property<int>("Height")
 211263                        .HasColumnType("INTEGER");
 211264
 211265                    b.Property<int>("Interval")
 211266                        .HasColumnType("INTEGER");
 211267
 211268                    b.Property<int>("ThumbnailCount")
 211269                        .HasColumnType("INTEGER");
 211270
 211271                    b.Property<int>("TileHeight")
 211272                        .HasColumnType("INTEGER");
 211273
 211274                    b.Property<int>("TileWidth")
 211275                        .HasColumnType("INTEGER");
 211276
 211277                    b.HasKey("ItemId", "Width");
 211278
 211279                    b.ToTable("TrickplayInfos");
 211280
 211281                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211282                });
 1283
 211284            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211285                {
 211286                    b.Property<Guid>("Id")
 211287                        .ValueGeneratedOnAdd()
 211288                        .HasColumnType("TEXT");
 211289
 211290                    b.Property<string>("AudioLanguagePreference")
 211291                        .HasMaxLength(255)
 211292                        .HasColumnType("TEXT");
 211293
 211294                    b.Property<string>("AuthenticationProviderId")
 211295                        .IsRequired()
 211296                        .HasMaxLength(255)
 211297                        .HasColumnType("TEXT");
 211298
 211299                    b.Property<string>("CastReceiverId")
 211300                        .HasMaxLength(32)
 211301                        .HasColumnType("TEXT");
 211302
 211303                    b.Property<bool>("DisplayCollectionsView")
 211304                        .HasColumnType("INTEGER");
 211305
 211306                    b.Property<bool>("DisplayMissingEpisodes")
 211307                        .HasColumnType("INTEGER");
 211308
 211309                    b.Property<bool>("EnableAutoLogin")
 211310                        .HasColumnType("INTEGER");
 211311
 211312                    b.Property<bool>("EnableLocalPassword")
 211313                        .HasColumnType("INTEGER");
 211314
 211315                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211316                        .HasColumnType("INTEGER");
 211317
 211318                    b.Property<bool>("EnableUserPreferenceAccess")
 211319                        .HasColumnType("INTEGER");
 211320
 211321                    b.Property<bool>("HidePlayedInLatest")
 211322                        .HasColumnType("INTEGER");
 211323
 211324                    b.Property<long>("InternalId")
 211325                        .HasColumnType("INTEGER");
 211326
 211327                    b.Property<int>("InvalidLoginAttemptCount")
 211328                        .HasColumnType("INTEGER");
 211329
 211330                    b.Property<DateTime?>("LastActivityDate")
 211331                        .HasColumnType("TEXT");
 211332
 211333                    b.Property<DateTime?>("LastLoginDate")
 211334                        .HasColumnType("TEXT");
 211335
 211336                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211337                        .HasColumnType("INTEGER");
 211338
 211339                    b.Property<int>("MaxActiveSessions")
 211340                        .HasColumnType("INTEGER");
 211341
 211342                    b.Property<int?>("MaxParentalRatingScore")
 211343                        .HasColumnType("INTEGER");
 211344
 211345                    b.Property<int?>("MaxParentalRatingSubScore")
 211346                        .HasColumnType("INTEGER");
 211347
 211348                    b.Property<bool>("MustUpdatePassword")
 211349                        .HasColumnType("INTEGER");
 211350
 211351                    b.Property<string>("Password")
 211352                        .HasMaxLength(65535)
 211353                        .HasColumnType("TEXT");
 211354
 211355                    b.Property<string>("PasswordResetProviderId")
 211356                        .IsRequired()
 211357                        .HasMaxLength(255)
 211358                        .HasColumnType("TEXT");
 211359
 211360                    b.Property<bool>("PlayDefaultAudioTrack")
 211361                        .HasColumnType("INTEGER");
 211362
 211363                    b.Property<bool>("RememberAudioSelections")
 211364                        .HasColumnType("INTEGER");
 211365
 211366                    b.Property<bool>("RememberSubtitleSelections")
 211367                        .HasColumnType("INTEGER");
 211368
 211369                    b.Property<int?>("RemoteClientBitrateLimit")
 211370                        .HasColumnType("INTEGER");
 211371
 211372                    b.Property<uint>("RowVersion")
 211373                        .IsConcurrencyToken()
 211374                        .HasColumnType("INTEGER");
 211375
 211376                    b.Property<string>("SubtitleLanguagePreference")
 211377                        .HasMaxLength(255)
 211378                        .HasColumnType("TEXT");
 211379
 211380                    b.Property<int>("SubtitleMode")
 211381                        .HasColumnType("INTEGER");
 211382
 211383                    b.Property<int>("SyncPlayAccess")
 211384                        .HasColumnType("INTEGER");
 211385
 211386                    b.Property<string>("Username")
 211387                        .IsRequired()
 211388                        .HasMaxLength(255)
 211389                        .HasColumnType("TEXT");
 211390
 211391                    b.HasKey("Id");
 211392
 211393                    b.HasIndex("Username")
 211394                        .IsUnique();
 211395
 211396                    b.ToTable("Users");
 211397
 211398                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211399                });
 1400
 211401            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211402                {
 211403                    b.Property<Guid>("ItemId")
 211404                        .HasColumnType("TEXT");
 211405
 211406                    b.Property<Guid>("UserId")
 211407                        .HasColumnType("TEXT");
 211408
 211409                    b.Property<string>("CustomDataKey")
 211410                        .HasColumnType("TEXT");
 211411
 211412                    b.Property<int?>("AudioStreamIndex")
 211413                        .HasColumnType("INTEGER");
 211414
 211415                    b.Property<bool>("IsFavorite")
 211416                        .HasColumnType("INTEGER");
 211417
 211418                    b.Property<DateTime?>("LastPlayedDate")
 211419                        .HasColumnType("TEXT");
 211420
 211421                    b.Property<bool?>("Likes")
 211422                        .HasColumnType("INTEGER");
 211423
 211424                    b.Property<int>("PlayCount")
 211425                        .HasColumnType("INTEGER");
 211426
 211427                    b.Property<long>("PlaybackPositionTicks")
 211428                        .HasColumnType("INTEGER");
 211429
 211430                    b.Property<bool>("Played")
 211431                        .HasColumnType("INTEGER");
 211432
 211433                    b.Property<double?>("Rating")
 211434                        .HasColumnType("REAL");
 211435
 211436                    b.Property<DateTime?>("RetentionDate")
 211437                        .HasColumnType("TEXT");
 211438
 211439                    b.Property<int?>("SubtitleStreamIndex")
 211440                        .HasColumnType("INTEGER");
 211441
 211442                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211443
 211444                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211445
 211446                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211447
 211448                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211449
 211450                    b.HasIndex("ItemId", "UserId", "Played");
 211451
 211452                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 211453
 211454                    b.ToTable("UserData");
 211455
 211456                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211457                });
 1458
 211459            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211460                {
 211461                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211462                        .WithMany("AccessSchedules")
 211463                        .HasForeignKey("UserId")
 211464                        .OnDelete(DeleteBehavior.Cascade)
 211465                        .IsRequired();
 211466                });
 1467
 211468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211469                {
 211470                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211471                        .WithMany("Parents")
 211472                        .HasForeignKey("ItemId")
 211473                        .OnDelete(DeleteBehavior.Cascade)
 211474                        .IsRequired();
 211475
 211476                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211477                        .WithMany("Children")
 211478                        .HasForeignKey("ParentItemId")
 211479                        .OnDelete(DeleteBehavior.Cascade)
 211480                        .IsRequired();
 211481
 211482                    b.Navigation("Item");
 211483
 211484                    b.Navigation("ParentItem");
 211485                });
 1486
 211487            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211488                {
 211489                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211490                        .WithMany()
 211491                        .HasForeignKey("ItemId")
 211492                        .OnDelete(DeleteBehavior.Cascade)
 211493                        .IsRequired();
 211494
 211495                    b.Navigation("Item");
 211496                });
 1497
 211498            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211499                {
 211500                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 211501                        .WithMany("Extras")
 211502                        .HasForeignKey("OwnerId")
 211503                        .OnDelete(DeleteBehavior.NoAction);
 211504
 211505                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 211506                        .WithMany("DirectChildren")
 211507                        .HasForeignKey("ParentId")
 211508                        .OnDelete(DeleteBehavior.Cascade);
 211509
 211510                    b.Navigation("DirectParent");
 211511
 211512                    b.Navigation("Owner");
 211513                });
 1514
 211515            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211516                {
 211517                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211518                        .WithMany("Images")
 211519                        .HasForeignKey("ItemId")
 211520                        .OnDelete(DeleteBehavior.Cascade)
 211521                        .IsRequired();
 211522
 211523                    b.Navigation("Item");
 211524                });
 1525
 211526            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211527                {
 211528                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211529                        .WithMany("LockedFields")
 211530                        .HasForeignKey("ItemId")
 211531                        .OnDelete(DeleteBehavior.Cascade)
 211532                        .IsRequired();
 211533
 211534                    b.Navigation("Item");
 211535                });
 1536
 211537            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211538                {
 211539                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211540                        .WithMany("Provider")
 211541                        .HasForeignKey("ItemId")
 211542                        .OnDelete(DeleteBehavior.Cascade)
 211543                        .IsRequired();
 211544
 211545                    b.Navigation("Item");
 211546                });
 1547
 211548            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211549                {
 211550                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211551                        .WithMany("TrailerTypes")
 211552                        .HasForeignKey("ItemId")
 211553                        .OnDelete(DeleteBehavior.Cascade)
 211554                        .IsRequired();
 211555
 211556                    b.Navigation("Item");
 211557                });
 1558
 211559            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211560                {
 211561                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211562                        .WithMany("Chapters")
 211563                        .HasForeignKey("ItemId")
 211564                        .OnDelete(DeleteBehavior.Cascade)
 211565                        .IsRequired();
 211566
 211567                    b.Navigation("Item");
 211568                });
 1569
 211570            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211571                {
 211572                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211573                        .WithMany("DisplayPreferences")
 211574                        .HasForeignKey("UserId")
 211575                        .OnDelete(DeleteBehavior.Cascade)
 211576                        .IsRequired();
 211577                });
 1578
 211579            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211580                {
 211581                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211582                        .WithMany("HomeSections")
 211583                        .HasForeignKey("DisplayPreferencesId")
 211584                        .OnDelete(DeleteBehavior.Cascade)
 211585                        .IsRequired();
 211586                });
 1587
 211588            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211589                {
 211590                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211591                        .WithOne("ProfileImage")
 211592                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211593                        .OnDelete(DeleteBehavior.Cascade);
 211594                });
 1595
 211596            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211597                {
 211598                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211599                        .WithMany("ItemDisplayPreferences")
 211600                        .HasForeignKey("UserId")
 211601                        .OnDelete(DeleteBehavior.Cascade)
 211602                        .IsRequired();
 211603                });
 1604
 211605            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211606                {
 211607                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211608                        .WithMany("ItemValues")
 211609                        .HasForeignKey("ItemId")
 211610                        .OnDelete(DeleteBehavior.Cascade)
 211611                        .IsRequired();
 211612
 211613                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211614                        .WithMany("BaseItemsMap")
 211615                        .HasForeignKey("ItemValueId")
 211616                        .OnDelete(DeleteBehavior.Cascade)
 211617                        .IsRequired();
 211618
 211619                    b.Navigation("Item");
 211620
 211621                    b.Navigation("ItemValue");
 211622                });
 1623
 211624            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211625                {
 211626                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211627                        .WithMany()
 211628                        .HasForeignKey("ItemId")
 211629                        .OnDelete(DeleteBehavior.Cascade)
 211630                        .IsRequired();
 211631
 211632                    b.Navigation("Item");
 211633                });
 1634
 211635            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 211636                {
 211637                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 211638                        .WithMany("LinkedChildOfEntities")
 211639                        .HasForeignKey("ChildId")
 211640                        .OnDelete(DeleteBehavior.NoAction)
 211641                        .IsRequired();
 211642
 211643                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 211644                        .WithMany("LinkedChildEntities")
 211645                        .HasForeignKey("ParentId")
 211646                        .OnDelete(DeleteBehavior.NoAction)
 211647                        .IsRequired();
 211648
 211649                    b.Navigation("Child");
 211650
 211651                    b.Navigation("Parent");
 211652                });
 1653
 211654            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211655                {
 211656                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211657                        .WithMany("MediaStreams")
 211658                        .HasForeignKey("ItemId")
 211659                        .OnDelete(DeleteBehavior.Cascade)
 211660                        .IsRequired();
 211661
 211662                    b.Navigation("Item");
 211663                });
 1664
 211665            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211666                {
 211667                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211668                        .WithMany("Peoples")
 211669                        .HasForeignKey("ItemId")
 211670                        .OnDelete(DeleteBehavior.Cascade)
 211671                        .IsRequired();
 211672
 211673                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211674                        .WithMany("BaseItems")
 211675                        .HasForeignKey("PeopleId")
 211676                        .OnDelete(DeleteBehavior.Cascade)
 211677                        .IsRequired();
 211678
 211679                    b.Navigation("Item");
 211680
 211681                    b.Navigation("People");
 211682                });
 1683
 211684            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211685                {
 211686                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211687                        .WithMany("Permissions")
 211688                        .HasForeignKey("UserId")
 211689                        .OnDelete(DeleteBehavior.Cascade);
 211690                });
 1691
 211692            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211693                {
 211694                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211695                        .WithMany("Preferences")
 211696                        .HasForeignKey("UserId")
 211697                        .OnDelete(DeleteBehavior.Cascade);
 211698                });
 1699
 211700            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211701                {
 211702                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211703                        .WithMany()
 211704                        .HasForeignKey("UserId")
 211705                        .OnDelete(DeleteBehavior.Cascade)
 211706                        .IsRequired();
 211707
 211708                    b.Navigation("User");
 211709                });
 1710
 211711            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211712                {
 211713                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211714                        .WithMany("UserData")
 211715                        .HasForeignKey("ItemId")
 211716                        .OnDelete(DeleteBehavior.Cascade)
 211717                        .IsRequired();
 211718
 211719                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211720                        .WithMany()
 211721                        .HasForeignKey("UserId")
 211722                        .OnDelete(DeleteBehavior.Cascade)
 211723                        .IsRequired();
 211724
 211725                    b.Navigation("Item");
 211726
 211727                    b.Navigation("User");
 211728                });
 1729
 211730            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211731                {
 211732                    b.Navigation("Chapters");
 211733
 211734                    b.Navigation("Children");
 211735
 211736                    b.Navigation("DirectChildren");
 211737
 211738                    b.Navigation("Extras");
 211739
 211740                    b.Navigation("Images");
 211741
 211742                    b.Navigation("ItemValues");
 211743
 211744                    b.Navigation("LinkedChildEntities");
 211745
 211746                    b.Navigation("LinkedChildOfEntities");
 211747
 211748                    b.Navigation("LockedFields");
 211749
 211750                    b.Navigation("MediaStreams");
 211751
 211752                    b.Navigation("Parents");
 211753
 211754                    b.Navigation("Peoples");
 211755
 211756                    b.Navigation("Provider");
 211757
 211758                    b.Navigation("TrailerTypes");
 211759
 211760                    b.Navigation("UserData");
 211761                });
 1762
 211763            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211764                {
 211765                    b.Navigation("HomeSections");
 211766                });
 1767
 211768            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211769                {
 211770                    b.Navigation("BaseItemsMap");
 211771                });
 1772
 211773            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211774                {
 211775                    b.Navigation("BaseItems");
 211776                });
 1777
 211778            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211779                {
 211780                    b.Navigation("AccessSchedules");
 211781
 211782                    b.Navigation("DisplayPreferences");
 211783
 211784                    b.Navigation("ItemDisplayPreferences");
 211785
 211786                    b.Navigation("Permissions");
 211787
 211788                    b.Navigation("Preferences");
 211789
 211790                    b.Navigation("ProfileImage");
 211791                });
 1792#pragma warning restore 612, 618
 211793        }
 1794    }
 1795}