< Summary - Jellyfin

Line coverage
99%
Covered lines: 1720
Uncovered lines: 8
Coverable lines: 1728
Total lines: 1829
Line coverage: 99.5%
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.5% (1720/1728) Total lines: 1829

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/20260116114245_AddLatestItemsDateCreatedIndexes.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 AddLatestItemsDateCreatedIndexes : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.DropIndex(
 2114                name: "IX_UserData_UserId",
 2115                table: "UserData");
 16
 2117            migrationBuilder.CreateIndex(
 2118                name: "IX_UserData_UserId_ItemId_LastPlayedDate",
 2119                table: "UserData",
 2120                columns: new[] { "UserId", "ItemId", "LastPlayedDate" });
 2121        }
 22
 23        /// <inheritdoc />
 24        protected override void Down(MigrationBuilder migrationBuilder)
 25        {
 026            migrationBuilder.DropIndex(
 027                name: "IX_UserData_UserId_ItemId_LastPlayedDate",
 028                table: "UserData");
 29
 030            migrationBuilder.CreateIndex(
 031                name: "IX_UserData_UserId",
 032                table: "UserData",
 033                column: "UserId");
 034        }
 35    }
 36}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260116114245_AddLatestItemsDateCreatedIndexes.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("20260116114245_AddLatestItemsDateCreatedIndexes")]
 15    partial class AddLatestItemsDateCreatedIndexes
 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.ToTable("BaseItemImageInfos");
 21457
 21458                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21459                });
 460
 21461            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21462                {
 21463                    b.Property<int>("Id")
 21464                        .HasColumnType("INTEGER");
 21465
 21466                    b.Property<Guid>("ItemId")
 21467                        .HasColumnType("TEXT");
 21468
 21469                    b.HasKey("Id", "ItemId");
 21470
 21471                    b.HasIndex("ItemId");
 21472
 21473                    b.ToTable("BaseItemMetadataFields");
 21474
 21475                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21476                });
 477
 21478            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21479                {
 21480                    b.Property<Guid>("ItemId")
 21481                        .HasColumnType("TEXT");
 21482
 21483                    b.Property<string>("ProviderId")
 21484                        .HasColumnType("TEXT");
 21485
 21486                    b.Property<string>("ProviderValue")
 21487                        .IsRequired()
 21488                        .HasColumnType("TEXT");
 21489
 21490                    b.HasKey("ItemId", "ProviderId");
 21491
 21492                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21493
 21494                    b.ToTable("BaseItemProviders");
 21495
 21496                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21497                });
 498
 21499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21500                {
 21501                    b.Property<int>("Id")
 21502                        .HasColumnType("INTEGER");
 21503
 21504                    b.Property<Guid>("ItemId")
 21505                        .HasColumnType("TEXT");
 21506
 21507                    b.HasKey("Id", "ItemId");
 21508
 21509                    b.HasIndex("ItemId");
 21510
 21511                    b.ToTable("BaseItemTrailerTypes");
 21512
 21513                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21514                });
 515
 21516            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21517                {
 21518                    b.Property<Guid>("ItemId")
 21519                        .HasColumnType("TEXT");
 21520
 21521                    b.Property<int>("ChapterIndex")
 21522                        .HasColumnType("INTEGER");
 21523
 21524                    b.Property<DateTime?>("ImageDateModified")
 21525                        .HasColumnType("TEXT");
 21526
 21527                    b.Property<string>("ImagePath")
 21528                        .HasColumnType("TEXT");
 21529
 21530                    b.Property<string>("Name")
 21531                        .HasColumnType("TEXT");
 21532
 21533                    b.Property<long>("StartPositionTicks")
 21534                        .HasColumnType("INTEGER");
 21535
 21536                    b.HasKey("ItemId", "ChapterIndex");
 21537
 21538                    b.ToTable("Chapters");
 21539
 21540                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21541                });
 542
 21543            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21544                {
 21545                    b.Property<int>("Id")
 21546                        .ValueGeneratedOnAdd()
 21547                        .HasColumnType("INTEGER");
 21548
 21549                    b.Property<string>("Client")
 21550                        .IsRequired()
 21551                        .HasMaxLength(32)
 21552                        .HasColumnType("TEXT");
 21553
 21554                    b.Property<Guid>("ItemId")
 21555                        .HasColumnType("TEXT");
 21556
 21557                    b.Property<string>("Key")
 21558                        .IsRequired()
 21559                        .HasColumnType("TEXT");
 21560
 21561                    b.Property<Guid>("UserId")
 21562                        .HasColumnType("TEXT");
 21563
 21564                    b.Property<string>("Value")
 21565                        .HasColumnType("TEXT");
 21566
 21567                    b.HasKey("Id");
 21568
 21569                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21570                        .IsUnique();
 21571
 21572                    b.ToTable("CustomItemDisplayPreferences");
 21573
 21574                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21575                });
 576
 21577            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21578                {
 21579                    b.Property<int>("Id")
 21580                        .ValueGeneratedOnAdd()
 21581                        .HasColumnType("INTEGER");
 21582
 21583                    b.Property<int>("ChromecastVersion")
 21584                        .HasColumnType("INTEGER");
 21585
 21586                    b.Property<string>("Client")
 21587                        .IsRequired()
 21588                        .HasMaxLength(32)
 21589                        .HasColumnType("TEXT");
 21590
 21591                    b.Property<string>("DashboardTheme")
 21592                        .HasMaxLength(32)
 21593                        .HasColumnType("TEXT");
 21594
 21595                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21596                        .HasColumnType("INTEGER");
 21597
 21598                    b.Property<int?>("IndexBy")
 21599                        .HasColumnType("INTEGER");
 21600
 21601                    b.Property<Guid>("ItemId")
 21602                        .HasColumnType("TEXT");
 21603
 21604                    b.Property<int>("ScrollDirection")
 21605                        .HasColumnType("INTEGER");
 21606
 21607                    b.Property<bool>("ShowBackdrop")
 21608                        .HasColumnType("INTEGER");
 21609
 21610                    b.Property<bool>("ShowSidebar")
 21611                        .HasColumnType("INTEGER");
 21612
 21613                    b.Property<int>("SkipBackwardLength")
 21614                        .HasColumnType("INTEGER");
 21615
 21616                    b.Property<int>("SkipForwardLength")
 21617                        .HasColumnType("INTEGER");
 21618
 21619                    b.Property<string>("TvHome")
 21620                        .HasMaxLength(32)
 21621                        .HasColumnType("TEXT");
 21622
 21623                    b.Property<Guid>("UserId")
 21624                        .HasColumnType("TEXT");
 21625
 21626                    b.HasKey("Id");
 21627
 21628                    b.HasIndex("UserId", "ItemId", "Client")
 21629                        .IsUnique();
 21630
 21631                    b.ToTable("DisplayPreferences");
 21632
 21633                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21634                });
 635
 21636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21637                {
 21638                    b.Property<int>("Id")
 21639                        .ValueGeneratedOnAdd()
 21640                        .HasColumnType("INTEGER");
 21641
 21642                    b.Property<int>("DisplayPreferencesId")
 21643                        .HasColumnType("INTEGER");
 21644
 21645                    b.Property<int>("Order")
 21646                        .HasColumnType("INTEGER");
 21647
 21648                    b.Property<int>("Type")
 21649                        .HasColumnType("INTEGER");
 21650
 21651                    b.HasKey("Id");
 21652
 21653                    b.HasIndex("DisplayPreferencesId");
 21654
 21655                    b.ToTable("HomeSection");
 21656
 21657                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21658                });
 659
 21660            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21661                {
 21662                    b.Property<int>("Id")
 21663                        .ValueGeneratedOnAdd()
 21664                        .HasColumnType("INTEGER");
 21665
 21666                    b.Property<DateTime>("LastModified")
 21667                        .HasColumnType("TEXT");
 21668
 21669                    b.Property<string>("Path")
 21670                        .IsRequired()
 21671                        .HasMaxLength(512)
 21672                        .HasColumnType("TEXT");
 21673
 21674                    b.Property<Guid?>("UserId")
 21675                        .HasColumnType("TEXT");
 21676
 21677                    b.HasKey("Id");
 21678
 21679                    b.HasIndex("UserId")
 21680                        .IsUnique();
 21681
 21682                    b.ToTable("ImageInfos");
 21683
 21684                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21685                });
 686
 21687            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21688                {
 21689                    b.Property<int>("Id")
 21690                        .ValueGeneratedOnAdd()
 21691                        .HasColumnType("INTEGER");
 21692
 21693                    b.Property<string>("Client")
 21694                        .IsRequired()
 21695                        .HasMaxLength(32)
 21696                        .HasColumnType("TEXT");
 21697
 21698                    b.Property<int?>("IndexBy")
 21699                        .HasColumnType("INTEGER");
 21700
 21701                    b.Property<Guid>("ItemId")
 21702                        .HasColumnType("TEXT");
 21703
 21704                    b.Property<bool>("RememberIndexing")
 21705                        .HasColumnType("INTEGER");
 21706
 21707                    b.Property<bool>("RememberSorting")
 21708                        .HasColumnType("INTEGER");
 21709
 21710                    b.Property<string>("SortBy")
 21711                        .IsRequired()
 21712                        .HasMaxLength(64)
 21713                        .HasColumnType("TEXT");
 21714
 21715                    b.Property<int>("SortOrder")
 21716                        .HasColumnType("INTEGER");
 21717
 21718                    b.Property<Guid>("UserId")
 21719                        .HasColumnType("TEXT");
 21720
 21721                    b.Property<int>("ViewType")
 21722                        .HasColumnType("INTEGER");
 21723
 21724                    b.HasKey("Id");
 21725
 21726                    b.HasIndex("UserId");
 21727
 21728                    b.ToTable("ItemDisplayPreferences");
 21729
 21730                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21731                });
 732
 21733            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21734                {
 21735                    b.Property<Guid>("ItemValueId")
 21736                        .ValueGeneratedOnAdd()
 21737                        .HasColumnType("TEXT");
 21738
 21739                    b.Property<string>("CleanValue")
 21740                        .IsRequired()
 21741                        .HasColumnType("TEXT");
 21742
 21743                    b.Property<int>("Type")
 21744                        .HasColumnType("INTEGER");
 21745
 21746                    b.Property<string>("Value")
 21747                        .IsRequired()
 21748                        .HasColumnType("TEXT");
 21749
 21750                    b.HasKey("ItemValueId");
 21751
 21752                    b.HasIndex("Type", "CleanValue");
 21753
 21754                    b.HasIndex("Type", "Value")
 21755                        .IsUnique();
 21756
 21757                    b.ToTable("ItemValues");
 21758
 21759                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21760                });
 761
 21762            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21763                {
 21764                    b.Property<Guid>("ItemValueId")
 21765                        .HasColumnType("TEXT");
 21766
 21767                    b.Property<Guid>("ItemId")
 21768                        .HasColumnType("TEXT");
 21769
 21770                    b.HasKey("ItemValueId", "ItemId");
 21771
 21772                    b.HasIndex("ItemId");
 21773
 21774                    b.ToTable("ItemValuesMap");
 21775
 21776                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21777                });
 778
 21779            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21780                {
 21781                    b.Property<Guid>("ItemId")
 21782                        .HasColumnType("TEXT");
 21783
 21784                    b.PrimitiveCollection<string>("KeyframeTicks")
 21785                        .HasColumnType("TEXT");
 21786
 21787                    b.Property<long>("TotalDuration")
 21788                        .HasColumnType("INTEGER");
 21789
 21790                    b.HasKey("ItemId");
 21791
 21792                    b.ToTable("KeyframeData");
 21793
 21794                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21795                });
 796
 21797            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 21798                {
 21799                    b.Property<Guid>("ParentId")
 21800                        .HasColumnType("TEXT");
 21801
 21802                    b.Property<Guid>("ChildId")
 21803                        .HasColumnType("TEXT");
 21804
 21805                    b.Property<int>("ChildType")
 21806                        .HasColumnType("INTEGER");
 21807
 21808                    b.Property<int?>("SortOrder")
 21809                        .HasColumnType("INTEGER");
 21810
 21811                    b.HasKey("ParentId", "ChildId");
 21812
 21813                    b.HasIndex("ChildId");
 21814
 21815                    b.HasIndex("ParentId");
 21816
 21817                    b.HasIndex("ChildId", "ChildType");
 21818
 21819                    b.HasIndex("ParentId", "ChildType");
 21820
 21821                    b.HasIndex("ParentId", "SortOrder");
 21822
 21823                    b.ToTable("LinkedChildren", (string)null);
 21824
 21825                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21826                });
 827
 21828            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21829                {
 21830                    b.Property<Guid>("Id")
 21831                        .ValueGeneratedOnAdd()
 21832                        .HasColumnType("TEXT");
 21833
 21834                    b.Property<long>("EndTicks")
 21835                        .HasColumnType("INTEGER");
 21836
 21837                    b.Property<Guid>("ItemId")
 21838                        .HasColumnType("TEXT");
 21839
 21840                    b.Property<string>("SegmentProviderId")
 21841                        .IsRequired()
 21842                        .HasColumnType("TEXT");
 21843
 21844                    b.Property<long>("StartTicks")
 21845                        .HasColumnType("INTEGER");
 21846
 21847                    b.Property<int>("Type")
 21848                        .HasColumnType("INTEGER");
 21849
 21850                    b.HasKey("Id");
 21851
 21852                    b.ToTable("MediaSegments");
 21853
 21854                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21855                });
 856
 21857            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21858                {
 21859                    b.Property<Guid>("ItemId")
 21860                        .HasColumnType("TEXT");
 21861
 21862                    b.Property<int>("StreamIndex")
 21863                        .HasColumnType("INTEGER");
 21864
 21865                    b.Property<string>("AspectRatio")
 21866                        .HasColumnType("TEXT");
 21867
 21868                    b.Property<float?>("AverageFrameRate")
 21869                        .HasColumnType("REAL");
 21870
 21871                    b.Property<int?>("BitDepth")
 21872                        .HasColumnType("INTEGER");
 21873
 21874                    b.Property<int?>("BitRate")
 21875                        .HasColumnType("INTEGER");
 21876
 21877                    b.Property<int?>("BlPresentFlag")
 21878                        .HasColumnType("INTEGER");
 21879
 21880                    b.Property<string>("ChannelLayout")
 21881                        .HasColumnType("TEXT");
 21882
 21883                    b.Property<int?>("Channels")
 21884                        .HasColumnType("INTEGER");
 21885
 21886                    b.Property<string>("Codec")
 21887                        .HasColumnType("TEXT");
 21888
 21889                    b.Property<string>("CodecTag")
 21890                        .HasColumnType("TEXT");
 21891
 21892                    b.Property<string>("CodecTimeBase")
 21893                        .HasColumnType("TEXT");
 21894
 21895                    b.Property<string>("ColorPrimaries")
 21896                        .HasColumnType("TEXT");
 21897
 21898                    b.Property<string>("ColorSpace")
 21899                        .HasColumnType("TEXT");
 21900
 21901                    b.Property<string>("ColorTransfer")
 21902                        .HasColumnType("TEXT");
 21903
 21904                    b.Property<string>("Comment")
 21905                        .HasColumnType("TEXT");
 21906
 21907                    b.Property<int?>("DvBlSignalCompatibilityId")
 21908                        .HasColumnType("INTEGER");
 21909
 21910                    b.Property<int?>("DvLevel")
 21911                        .HasColumnType("INTEGER");
 21912
 21913                    b.Property<int?>("DvProfile")
 21914                        .HasColumnType("INTEGER");
 21915
 21916                    b.Property<int?>("DvVersionMajor")
 21917                        .HasColumnType("INTEGER");
 21918
 21919                    b.Property<int?>("DvVersionMinor")
 21920                        .HasColumnType("INTEGER");
 21921
 21922                    b.Property<int?>("ElPresentFlag")
 21923                        .HasColumnType("INTEGER");
 21924
 21925                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21926                        .HasColumnType("INTEGER");
 21927
 21928                    b.Property<int?>("Height")
 21929                        .HasColumnType("INTEGER");
 21930
 21931                    b.Property<bool?>("IsAnamorphic")
 21932                        .HasColumnType("INTEGER");
 21933
 21934                    b.Property<bool?>("IsAvc")
 21935                        .HasColumnType("INTEGER");
 21936
 21937                    b.Property<bool>("IsDefault")
 21938                        .HasColumnType("INTEGER");
 21939
 21940                    b.Property<bool>("IsExternal")
 21941                        .HasColumnType("INTEGER");
 21942
 21943                    b.Property<bool>("IsForced")
 21944                        .HasColumnType("INTEGER");
 21945
 21946                    b.Property<bool?>("IsHearingImpaired")
 21947                        .HasColumnType("INTEGER");
 21948
 21949                    b.Property<bool?>("IsInterlaced")
 21950                        .HasColumnType("INTEGER");
 21951
 21952                    b.Property<string>("KeyFrames")
 21953                        .HasColumnType("TEXT");
 21954
 21955                    b.Property<string>("Language")
 21956                        .HasColumnType("TEXT");
 21957
 21958                    b.Property<float?>("Level")
 21959                        .HasColumnType("REAL");
 21960
 21961                    b.Property<string>("NalLengthSize")
 21962                        .HasColumnType("TEXT");
 21963
 21964                    b.Property<string>("Path")
 21965                        .HasColumnType("TEXT");
 21966
 21967                    b.Property<string>("PixelFormat")
 21968                        .HasColumnType("TEXT");
 21969
 21970                    b.Property<string>("Profile")
 21971                        .HasColumnType("TEXT");
 21972
 21973                    b.Property<float?>("RealFrameRate")
 21974                        .HasColumnType("REAL");
 21975
 21976                    b.Property<int?>("RefFrames")
 21977                        .HasColumnType("INTEGER");
 21978
 21979                    b.Property<int?>("Rotation")
 21980                        .HasColumnType("INTEGER");
 21981
 21982                    b.Property<int?>("RpuPresentFlag")
 21983                        .HasColumnType("INTEGER");
 21984
 21985                    b.Property<int?>("SampleRate")
 21986                        .HasColumnType("INTEGER");
 21987
 21988                    b.Property<int>("StreamType")
 21989                        .HasColumnType("INTEGER");
 21990
 21991                    b.Property<string>("TimeBase")
 21992                        .HasColumnType("TEXT");
 21993
 21994                    b.Property<string>("Title")
 21995                        .HasColumnType("TEXT");
 21996
 21997                    b.Property<int?>("Width")
 21998                        .HasColumnType("INTEGER");
 21999
 211000                    b.HasKey("ItemId", "StreamIndex");
 211001
 211002                    b.HasIndex("StreamIndex");
 211003
 211004                    b.HasIndex("StreamType");
 211005
 211006                    b.HasIndex("StreamIndex", "StreamType");
 211007
 211008                    b.HasIndex("StreamIndex", "StreamType", "Language");
 211009
 211010                    b.ToTable("MediaStreamInfos");
 211011
 211012                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211013                });
 1014
 211015            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211016                {
 211017                    b.Property<Guid>("Id")
 211018                        .ValueGeneratedOnAdd()
 211019                        .HasColumnType("TEXT");
 211020
 211021                    b.Property<string>("Name")
 211022                        .IsRequired()
 211023                        .HasColumnType("TEXT");
 211024
 211025                    b.Property<string>("PersonType")
 211026                        .HasColumnType("TEXT");
 211027
 211028                    b.HasKey("Id");
 211029
 211030                    b.HasIndex("Name");
 211031
 211032                    b.ToTable("Peoples");
 211033
 211034                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211035                });
 1036
 211037            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211038                {
 211039                    b.Property<Guid>("ItemId")
 211040                        .HasColumnType("TEXT");
 211041
 211042                    b.Property<Guid>("PeopleId")
 211043                        .HasColumnType("TEXT");
 211044
 211045                    b.Property<string>("Role")
 211046                        .HasColumnType("TEXT");
 211047
 211048                    b.Property<int?>("ListOrder")
 211049                        .HasColumnType("INTEGER");
 211050
 211051                    b.Property<int?>("SortOrder")
 211052                        .HasColumnType("INTEGER");
 211053
 211054                    b.HasKey("ItemId", "PeopleId", "Role");
 211055
 211056                    b.HasIndex("PeopleId");
 211057
 211058                    b.HasIndex("ItemId", "ListOrder");
 211059
 211060                    b.HasIndex("ItemId", "SortOrder");
 211061
 211062                    b.ToTable("PeopleBaseItemMap");
 211063
 211064                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211065                });
 1066
 211067            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211068                {
 211069                    b.Property<int>("Id")
 211070                        .ValueGeneratedOnAdd()
 211071                        .HasColumnType("INTEGER");
 211072
 211073                    b.Property<int>("Kind")
 211074                        .HasColumnType("INTEGER");
 211075
 211076                    b.Property<Guid?>("Permission_Permissions_Guid")
 211077                        .HasColumnType("TEXT");
 211078
 211079                    b.Property<uint>("RowVersion")
 211080                        .IsConcurrencyToken()
 211081                        .HasColumnType("INTEGER");
 211082
 211083                    b.Property<Guid?>("UserId")
 211084                        .HasColumnType("TEXT");
 211085
 211086                    b.Property<bool>("Value")
 211087                        .HasColumnType("INTEGER");
 211088
 211089                    b.HasKey("Id");
 211090
 211091                    b.HasIndex("UserId", "Kind")
 211092                        .IsUnique()
 211093                        .HasFilter("[UserId] IS NOT NULL");
 211094
 211095                    b.ToTable("Permissions");
 211096
 211097                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211098                });
 1099
 211100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211101                {
 211102                    b.Property<int>("Id")
 211103                        .ValueGeneratedOnAdd()
 211104                        .HasColumnType("INTEGER");
 211105
 211106                    b.Property<int>("Kind")
 211107                        .HasColumnType("INTEGER");
 211108
 211109                    b.Property<Guid?>("Preference_Preferences_Guid")
 211110                        .HasColumnType("TEXT");
 211111
 211112                    b.Property<uint>("RowVersion")
 211113                        .IsConcurrencyToken()
 211114                        .HasColumnType("INTEGER");
 211115
 211116                    b.Property<Guid?>("UserId")
 211117                        .HasColumnType("TEXT");
 211118
 211119                    b.Property<string>("Value")
 211120                        .IsRequired()
 211121                        .HasMaxLength(65535)
 211122                        .HasColumnType("TEXT");
 211123
 211124                    b.HasKey("Id");
 211125
 211126                    b.HasIndex("UserId", "Kind")
 211127                        .IsUnique()
 211128                        .HasFilter("[UserId] IS NOT NULL");
 211129
 211130                    b.ToTable("Preferences");
 211131
 211132                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211133                });
 1134
 211135            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211136                {
 211137                    b.Property<int>("Id")
 211138                        .ValueGeneratedOnAdd()
 211139                        .HasColumnType("INTEGER");
 211140
 211141                    b.Property<string>("AccessToken")
 211142                        .IsRequired()
 211143                        .HasColumnType("TEXT");
 211144
 211145                    b.Property<DateTime>("DateCreated")
 211146                        .HasColumnType("TEXT");
 211147
 211148                    b.Property<DateTime>("DateLastActivity")
 211149                        .HasColumnType("TEXT");
 211150
 211151                    b.Property<string>("Name")
 211152                        .IsRequired()
 211153                        .HasMaxLength(64)
 211154                        .HasColumnType("TEXT");
 211155
 211156                    b.HasKey("Id");
 211157
 211158                    b.HasIndex("AccessToken")
 211159                        .IsUnique();
 211160
 211161                    b.ToTable("ApiKeys");
 211162
 211163                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211164                });
 1165
 211166            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211167                {
 211168                    b.Property<int>("Id")
 211169                        .ValueGeneratedOnAdd()
 211170                        .HasColumnType("INTEGER");
 211171
 211172                    b.Property<string>("AccessToken")
 211173                        .IsRequired()
 211174                        .HasColumnType("TEXT");
 211175
 211176                    b.Property<string>("AppName")
 211177                        .IsRequired()
 211178                        .HasMaxLength(64)
 211179                        .HasColumnType("TEXT");
 211180
 211181                    b.Property<string>("AppVersion")
 211182                        .IsRequired()
 211183                        .HasMaxLength(32)
 211184                        .HasColumnType("TEXT");
 211185
 211186                    b.Property<DateTime>("DateCreated")
 211187                        .HasColumnType("TEXT");
 211188
 211189                    b.Property<DateTime>("DateLastActivity")
 211190                        .HasColumnType("TEXT");
 211191
 211192                    b.Property<DateTime>("DateModified")
 211193                        .HasColumnType("TEXT");
 211194
 211195                    b.Property<string>("DeviceId")
 211196                        .IsRequired()
 211197                        .HasMaxLength(256)
 211198                        .HasColumnType("TEXT");
 211199
 211200                    b.Property<string>("DeviceName")
 211201                        .IsRequired()
 211202                        .HasMaxLength(64)
 211203                        .HasColumnType("TEXT");
 211204
 211205                    b.Property<bool>("IsActive")
 211206                        .HasColumnType("INTEGER");
 211207
 211208                    b.Property<Guid>("UserId")
 211209                        .HasColumnType("TEXT");
 211210
 211211                    b.HasKey("Id");
 211212
 211213                    b.HasIndex("DeviceId");
 211214
 211215                    b.HasIndex("AccessToken", "DateLastActivity");
 211216
 211217                    b.HasIndex("DeviceId", "DateLastActivity");
 211218
 211219                    b.HasIndex("UserId", "DeviceId");
 211220
 211221                    b.ToTable("Devices");
 211222
 211223                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211224                });
 1225
 211226            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211227                {
 211228                    b.Property<int>("Id")
 211229                        .ValueGeneratedOnAdd()
 211230                        .HasColumnType("INTEGER");
 211231
 211232                    b.Property<string>("CustomName")
 211233                        .HasColumnType("TEXT");
 211234
 211235                    b.Property<string>("DeviceId")
 211236                        .IsRequired()
 211237                        .HasColumnType("TEXT");
 211238
 211239                    b.HasKey("Id");
 211240
 211241                    b.HasIndex("DeviceId")
 211242                        .IsUnique();
 211243
 211244                    b.ToTable("DeviceOptions");
 211245
 211246                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211247                });
 1248
 211249            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211250                {
 211251                    b.Property<Guid>("ItemId")
 211252                        .HasColumnType("TEXT");
 211253
 211254                    b.Property<int>("Width")
 211255                        .HasColumnType("INTEGER");
 211256
 211257                    b.Property<int>("Bandwidth")
 211258                        .HasColumnType("INTEGER");
 211259
 211260                    b.Property<int>("Height")
 211261                        .HasColumnType("INTEGER");
 211262
 211263                    b.Property<int>("Interval")
 211264                        .HasColumnType("INTEGER");
 211265
 211266                    b.Property<int>("ThumbnailCount")
 211267                        .HasColumnType("INTEGER");
 211268
 211269                    b.Property<int>("TileHeight")
 211270                        .HasColumnType("INTEGER");
 211271
 211272                    b.Property<int>("TileWidth")
 211273                        .HasColumnType("INTEGER");
 211274
 211275                    b.HasKey("ItemId", "Width");
 211276
 211277                    b.ToTable("TrickplayInfos");
 211278
 211279                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211280                });
 1281
 211282            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211283                {
 211284                    b.Property<Guid>("Id")
 211285                        .ValueGeneratedOnAdd()
 211286                        .HasColumnType("TEXT");
 211287
 211288                    b.Property<string>("AudioLanguagePreference")
 211289                        .HasMaxLength(255)
 211290                        .HasColumnType("TEXT");
 211291
 211292                    b.Property<string>("AuthenticationProviderId")
 211293                        .IsRequired()
 211294                        .HasMaxLength(255)
 211295                        .HasColumnType("TEXT");
 211296
 211297                    b.Property<string>("CastReceiverId")
 211298                        .HasMaxLength(32)
 211299                        .HasColumnType("TEXT");
 211300
 211301                    b.Property<bool>("DisplayCollectionsView")
 211302                        .HasColumnType("INTEGER");
 211303
 211304                    b.Property<bool>("DisplayMissingEpisodes")
 211305                        .HasColumnType("INTEGER");
 211306
 211307                    b.Property<bool>("EnableAutoLogin")
 211308                        .HasColumnType("INTEGER");
 211309
 211310                    b.Property<bool>("EnableLocalPassword")
 211311                        .HasColumnType("INTEGER");
 211312
 211313                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211314                        .HasColumnType("INTEGER");
 211315
 211316                    b.Property<bool>("EnableUserPreferenceAccess")
 211317                        .HasColumnType("INTEGER");
 211318
 211319                    b.Property<bool>("HidePlayedInLatest")
 211320                        .HasColumnType("INTEGER");
 211321
 211322                    b.Property<long>("InternalId")
 211323                        .HasColumnType("INTEGER");
 211324
 211325                    b.Property<int>("InvalidLoginAttemptCount")
 211326                        .HasColumnType("INTEGER");
 211327
 211328                    b.Property<DateTime?>("LastActivityDate")
 211329                        .HasColumnType("TEXT");
 211330
 211331                    b.Property<DateTime?>("LastLoginDate")
 211332                        .HasColumnType("TEXT");
 211333
 211334                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211335                        .HasColumnType("INTEGER");
 211336
 211337                    b.Property<int>("MaxActiveSessions")
 211338                        .HasColumnType("INTEGER");
 211339
 211340                    b.Property<int?>("MaxParentalRatingScore")
 211341                        .HasColumnType("INTEGER");
 211342
 211343                    b.Property<int?>("MaxParentalRatingSubScore")
 211344                        .HasColumnType("INTEGER");
 211345
 211346                    b.Property<bool>("MustUpdatePassword")
 211347                        .HasColumnType("INTEGER");
 211348
 211349                    b.Property<string>("Password")
 211350                        .HasMaxLength(65535)
 211351                        .HasColumnType("TEXT");
 211352
 211353                    b.Property<string>("PasswordResetProviderId")
 211354                        .IsRequired()
 211355                        .HasMaxLength(255)
 211356                        .HasColumnType("TEXT");
 211357
 211358                    b.Property<bool>("PlayDefaultAudioTrack")
 211359                        .HasColumnType("INTEGER");
 211360
 211361                    b.Property<bool>("RememberAudioSelections")
 211362                        .HasColumnType("INTEGER");
 211363
 211364                    b.Property<bool>("RememberSubtitleSelections")
 211365                        .HasColumnType("INTEGER");
 211366
 211367                    b.Property<int?>("RemoteClientBitrateLimit")
 211368                        .HasColumnType("INTEGER");
 211369
 211370                    b.Property<uint>("RowVersion")
 211371                        .IsConcurrencyToken()
 211372                        .HasColumnType("INTEGER");
 211373
 211374                    b.Property<string>("SubtitleLanguagePreference")
 211375                        .HasMaxLength(255)
 211376                        .HasColumnType("TEXT");
 211377
 211378                    b.Property<int>("SubtitleMode")
 211379                        .HasColumnType("INTEGER");
 211380
 211381                    b.Property<int>("SyncPlayAccess")
 211382                        .HasColumnType("INTEGER");
 211383
 211384                    b.Property<string>("Username")
 211385                        .IsRequired()
 211386                        .HasMaxLength(255)
 211387                        .HasColumnType("TEXT");
 211388
 211389                    b.HasKey("Id");
 211390
 211391                    b.HasIndex("Username")
 211392                        .IsUnique();
 211393
 211394                    b.ToTable("Users");
 211395
 211396                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211397                });
 1398
 211399            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211400                {
 211401                    b.Property<Guid>("ItemId")
 211402                        .HasColumnType("TEXT");
 211403
 211404                    b.Property<Guid>("UserId")
 211405                        .HasColumnType("TEXT");
 211406
 211407                    b.Property<string>("CustomDataKey")
 211408                        .HasColumnType("TEXT");
 211409
 211410                    b.Property<int?>("AudioStreamIndex")
 211411                        .HasColumnType("INTEGER");
 211412
 211413                    b.Property<bool>("IsFavorite")
 211414                        .HasColumnType("INTEGER");
 211415
 211416                    b.Property<DateTime?>("LastPlayedDate")
 211417                        .HasColumnType("TEXT");
 211418
 211419                    b.Property<bool?>("Likes")
 211420                        .HasColumnType("INTEGER");
 211421
 211422                    b.Property<int>("PlayCount")
 211423                        .HasColumnType("INTEGER");
 211424
 211425                    b.Property<long>("PlaybackPositionTicks")
 211426                        .HasColumnType("INTEGER");
 211427
 211428                    b.Property<bool>("Played")
 211429                        .HasColumnType("INTEGER");
 211430
 211431                    b.Property<double?>("Rating")
 211432                        .HasColumnType("REAL");
 211433
 211434                    b.Property<DateTime?>("RetentionDate")
 211435                        .HasColumnType("TEXT");
 211436
 211437                    b.Property<int?>("SubtitleStreamIndex")
 211438                        .HasColumnType("INTEGER");
 211439
 211440                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211441
 211442                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211443
 211444                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211445
 211446                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211447
 211448                    b.HasIndex("ItemId", "UserId", "Played");
 211449
 211450                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 211451
 211452                    b.ToTable("UserData");
 211453
 211454                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211455                });
 1456
 211457            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211458                {
 211459                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211460                        .WithMany("AccessSchedules")
 211461                        .HasForeignKey("UserId")
 211462                        .OnDelete(DeleteBehavior.Cascade)
 211463                        .IsRequired();
 211464                });
 1465
 211466            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211467                {
 211468                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211469                        .WithMany("Parents")
 211470                        .HasForeignKey("ItemId")
 211471                        .OnDelete(DeleteBehavior.Cascade)
 211472                        .IsRequired();
 211473
 211474                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211475                        .WithMany("Children")
 211476                        .HasForeignKey("ParentItemId")
 211477                        .OnDelete(DeleteBehavior.Cascade)
 211478                        .IsRequired();
 211479
 211480                    b.Navigation("Item");
 211481
 211482                    b.Navigation("ParentItem");
 211483                });
 1484
 211485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211486                {
 211487                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211488                        .WithMany()
 211489                        .HasForeignKey("ItemId")
 211490                        .OnDelete(DeleteBehavior.Cascade)
 211491                        .IsRequired();
 211492
 211493                    b.Navigation("Item");
 211494                });
 1495
 211496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211497                {
 211498                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 211499                        .WithMany("Extras")
 211500                        .HasForeignKey("OwnerId")
 211501                        .OnDelete(DeleteBehavior.NoAction);
 211502
 211503                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 211504                        .WithMany("DirectChildren")
 211505                        .HasForeignKey("ParentId")
 211506                        .OnDelete(DeleteBehavior.Cascade);
 211507
 211508                    b.Navigation("DirectParent");
 211509
 211510                    b.Navigation("Owner");
 211511                });
 1512
 211513            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211514                {
 211515                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211516                        .WithMany("Images")
 211517                        .HasForeignKey("ItemId")
 211518                        .OnDelete(DeleteBehavior.Cascade)
 211519                        .IsRequired();
 211520
 211521                    b.Navigation("Item");
 211522                });
 1523
 211524            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211525                {
 211526                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211527                        .WithMany("LockedFields")
 211528                        .HasForeignKey("ItemId")
 211529                        .OnDelete(DeleteBehavior.Cascade)
 211530                        .IsRequired();
 211531
 211532                    b.Navigation("Item");
 211533                });
 1534
 211535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211536                {
 211537                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211538                        .WithMany("Provider")
 211539                        .HasForeignKey("ItemId")
 211540                        .OnDelete(DeleteBehavior.Cascade)
 211541                        .IsRequired();
 211542
 211543                    b.Navigation("Item");
 211544                });
 1545
 211546            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211547                {
 211548                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211549                        .WithMany("TrailerTypes")
 211550                        .HasForeignKey("ItemId")
 211551                        .OnDelete(DeleteBehavior.Cascade)
 211552                        .IsRequired();
 211553
 211554                    b.Navigation("Item");
 211555                });
 1556
 211557            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211558                {
 211559                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211560                        .WithMany("Chapters")
 211561                        .HasForeignKey("ItemId")
 211562                        .OnDelete(DeleteBehavior.Cascade)
 211563                        .IsRequired();
 211564
 211565                    b.Navigation("Item");
 211566                });
 1567
 211568            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211569                {
 211570                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211571                        .WithMany("DisplayPreferences")
 211572                        .HasForeignKey("UserId")
 211573                        .OnDelete(DeleteBehavior.Cascade)
 211574                        .IsRequired();
 211575                });
 1576
 211577            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211578                {
 211579                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211580                        .WithMany("HomeSections")
 211581                        .HasForeignKey("DisplayPreferencesId")
 211582                        .OnDelete(DeleteBehavior.Cascade)
 211583                        .IsRequired();
 211584                });
 1585
 211586            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211587                {
 211588                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211589                        .WithOne("ProfileImage")
 211590                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211591                        .OnDelete(DeleteBehavior.Cascade);
 211592                });
 1593
 211594            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211595                {
 211596                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211597                        .WithMany("ItemDisplayPreferences")
 211598                        .HasForeignKey("UserId")
 211599                        .OnDelete(DeleteBehavior.Cascade)
 211600                        .IsRequired();
 211601                });
 1602
 211603            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211604                {
 211605                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211606                        .WithMany("ItemValues")
 211607                        .HasForeignKey("ItemId")
 211608                        .OnDelete(DeleteBehavior.Cascade)
 211609                        .IsRequired();
 211610
 211611                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211612                        .WithMany("BaseItemsMap")
 211613                        .HasForeignKey("ItemValueId")
 211614                        .OnDelete(DeleteBehavior.Cascade)
 211615                        .IsRequired();
 211616
 211617                    b.Navigation("Item");
 211618
 211619                    b.Navigation("ItemValue");
 211620                });
 1621
 211622            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211623                {
 211624                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211625                        .WithMany()
 211626                        .HasForeignKey("ItemId")
 211627                        .OnDelete(DeleteBehavior.Cascade)
 211628                        .IsRequired();
 211629
 211630                    b.Navigation("Item");
 211631                });
 1632
 211633            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 211634                {
 211635                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 211636                        .WithMany("LinkedChildOfEntities")
 211637                        .HasForeignKey("ChildId")
 211638                        .OnDelete(DeleteBehavior.NoAction)
 211639                        .IsRequired();
 211640
 211641                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 211642                        .WithMany("LinkedChildEntities")
 211643                        .HasForeignKey("ParentId")
 211644                        .OnDelete(DeleteBehavior.NoAction)
 211645                        .IsRequired();
 211646
 211647                    b.Navigation("Child");
 211648
 211649                    b.Navigation("Parent");
 211650                });
 1651
 211652            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211653                {
 211654                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211655                        .WithMany("MediaStreams")
 211656                        .HasForeignKey("ItemId")
 211657                        .OnDelete(DeleteBehavior.Cascade)
 211658                        .IsRequired();
 211659
 211660                    b.Navigation("Item");
 211661                });
 1662
 211663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211664                {
 211665                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211666                        .WithMany("Peoples")
 211667                        .HasForeignKey("ItemId")
 211668                        .OnDelete(DeleteBehavior.Cascade)
 211669                        .IsRequired();
 211670
 211671                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211672                        .WithMany("BaseItems")
 211673                        .HasForeignKey("PeopleId")
 211674                        .OnDelete(DeleteBehavior.Cascade)
 211675                        .IsRequired();
 211676
 211677                    b.Navigation("Item");
 211678
 211679                    b.Navigation("People");
 211680                });
 1681
 211682            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211683                {
 211684                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211685                        .WithMany("Permissions")
 211686                        .HasForeignKey("UserId")
 211687                        .OnDelete(DeleteBehavior.Cascade);
 211688                });
 1689
 211690            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211691                {
 211692                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211693                        .WithMany("Preferences")
 211694                        .HasForeignKey("UserId")
 211695                        .OnDelete(DeleteBehavior.Cascade);
 211696                });
 1697
 211698            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211699                {
 211700                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211701                        .WithMany()
 211702                        .HasForeignKey("UserId")
 211703                        .OnDelete(DeleteBehavior.Cascade)
 211704                        .IsRequired();
 211705
 211706                    b.Navigation("User");
 211707                });
 1708
 211709            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211710                {
 211711                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211712                        .WithMany("UserData")
 211713                        .HasForeignKey("ItemId")
 211714                        .OnDelete(DeleteBehavior.Cascade)
 211715                        .IsRequired();
 211716
 211717                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211718                        .WithMany()
 211719                        .HasForeignKey("UserId")
 211720                        .OnDelete(DeleteBehavior.Cascade)
 211721                        .IsRequired();
 211722
 211723                    b.Navigation("Item");
 211724
 211725                    b.Navigation("User");
 211726                });
 1727
 211728            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211729                {
 211730                    b.Navigation("Chapters");
 211731
 211732                    b.Navigation("Children");
 211733
 211734                    b.Navigation("DirectChildren");
 211735
 211736                    b.Navigation("Extras");
 211737
 211738                    b.Navigation("Images");
 211739
 211740                    b.Navigation("ItemValues");
 211741
 211742                    b.Navigation("LinkedChildEntities");
 211743
 211744                    b.Navigation("LinkedChildOfEntities");
 211745
 211746                    b.Navigation("LockedFields");
 211747
 211748                    b.Navigation("MediaStreams");
 211749
 211750                    b.Navigation("Parents");
 211751
 211752                    b.Navigation("Peoples");
 211753
 211754                    b.Navigation("Provider");
 211755
 211756                    b.Navigation("TrailerTypes");
 211757
 211758                    b.Navigation("UserData");
 211759                });
 1760
 211761            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211762                {
 211763                    b.Navigation("HomeSections");
 211764                });
 1765
 211766            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211767                {
 211768                    b.Navigation("BaseItemsMap");
 211769                });
 1770
 211771            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211772                {
 211773                    b.Navigation("BaseItems");
 211774                });
 1775
 211776            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211777                {
 211778                    b.Navigation("AccessSchedules");
 211779
 211780                    b.Navigation("DisplayPreferences");
 211781
 211782                    b.Navigation("ItemDisplayPreferences");
 211783
 211784                    b.Navigation("Permissions");
 211785
 211786                    b.Navigation("Preferences");
 211787
 211788                    b.Navigation("ProfileImage");
 211789                });
 1790#pragma warning restore 612, 618
 211791        }
 1792    }
 1793}