< Summary - Jellyfin

Line coverage
99%
Covered lines: 1723
Uncovered lines: 8
Coverable lines: 1731
Total lines: 1832
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: 18295/22/2026 - 12:15:17 AM Line coverage: 99.5% (1723/1731) Total lines: 1832

Coverage delta

Coverage delta 1 -1

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        {
 2213            migrationBuilder.DropIndex(
 2214                name: "IX_UserData_UserId",
 2215                table: "UserData");
 16
 2217            migrationBuilder.CreateIndex(
 2218                name: "IX_UserData_UserId_ItemId_LastPlayedDate",
 2219                table: "UserData",
 2220                columns: new[] { "UserId", "ItemId", "LastPlayedDate" });
 2221        }
 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
 2221            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2223            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246
 2247                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2248                });
 49
 2250            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2251                {
 2252                    b.Property<int>("Id")
 2253                        .ValueGeneratedOnAdd()
 2254                        .HasColumnType("INTEGER");
 2255
 2256                    b.Property<DateTime>("DateCreated")
 2257                        .HasColumnType("TEXT");
 2258
 2259                    b.Property<string>("ItemId")
 2260                        .HasMaxLength(256)
 2261                        .HasColumnType("TEXT");
 2262
 2263                    b.Property<int>("LogSeverity")
 2264                        .HasColumnType("INTEGER");
 2265
 2266                    b.Property<string>("Name")
 2267                        .IsRequired()
 2268                        .HasMaxLength(512)
 2269                        .HasColumnType("TEXT");
 2270
 2271                    b.Property<string>("Overview")
 2272                        .HasMaxLength(512)
 2273                        .HasColumnType("TEXT");
 2274
 2275                    b.Property<uint>("RowVersion")
 2276                        .IsConcurrencyToken()
 2277                        .HasColumnType("INTEGER");
 2278
 2279                    b.Property<string>("ShortOverview")
 2280                        .HasMaxLength(512)
 2281                        .HasColumnType("TEXT");
 2282
 2283                    b.Property<string>("Type")
 2284                        .IsRequired()
 2285                        .HasMaxLength(256)
 2286                        .HasColumnType("TEXT");
 2287
 2288                    b.Property<Guid>("UserId")
 2289                        .HasColumnType("TEXT");
 2290
 2291                    b.HasKey("Id");
 2292
 2293                    b.HasIndex("DateCreated");
 2294
 2295                    b.ToTable("ActivityLogs");
 2296
 2297                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2298                });
 99
 22100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 22101                {
 22102                    b.Property<Guid>("ItemId")
 22103                        .HasColumnType("TEXT");
 22104
 22105                    b.Property<Guid>("ParentItemId")
 22106                        .HasColumnType("TEXT");
 22107
 22108                    b.HasKey("ItemId", "ParentItemId");
 22109
 22110                    b.HasIndex("ParentItemId");
 22111
 22112                    b.ToTable("AncestorIds");
 22113
 22114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22115                });
 116
 22117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 22118                {
 22119                    b.Property<Guid>("ItemId")
 22120                        .HasColumnType("TEXT");
 22121
 22122                    b.Property<int>("Index")
 22123                        .HasColumnType("INTEGER");
 22124
 22125                    b.Property<string>("Codec")
 22126                        .HasColumnType("TEXT");
 22127
 22128                    b.Property<string>("CodecTag")
 22129                        .HasColumnType("TEXT");
 22130
 22131                    b.Property<string>("Comment")
 22132                        .HasColumnType("TEXT");
 22133
 22134                    b.Property<string>("Filename")
 22135                        .HasColumnType("TEXT");
 22136
 22137                    b.Property<string>("MimeType")
 22138                        .HasColumnType("TEXT");
 22139
 22140                    b.HasKey("ItemId", "Index");
 22141
 22142                    b.ToTable("AttachmentStreamInfos");
 22143
 22144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22145                });
 146
 22147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 22148                {
 22149                    b.Property<Guid>("Id")
 22150                        .ValueGeneratedOnAdd()
 22151                        .HasColumnType("TEXT");
 22152
 22153                    b.Property<string>("Album")
 22154                        .HasColumnType("TEXT");
 22155
 22156                    b.Property<string>("AlbumArtists")
 22157                        .HasColumnType("TEXT");
 22158
 22159                    b.Property<string>("Artists")
 22160                        .HasColumnType("TEXT");
 22161
 22162                    b.Property<int?>("Audio")
 22163                        .HasColumnType("INTEGER");
 22164
 22165                    b.Property<Guid?>("ChannelId")
 22166                        .HasColumnType("TEXT");
 22167
 22168                    b.Property<string>("CleanName")
 22169                        .HasColumnType("TEXT");
 22170
 22171                    b.Property<float?>("CommunityRating")
 22172                        .HasColumnType("REAL");
 22173
 22174                    b.Property<float?>("CriticRating")
 22175                        .HasColumnType("REAL");
 22176
 22177                    b.Property<string>("CustomRating")
 22178                        .HasColumnType("TEXT");
 22179
 22180                    b.Property<string>("Data")
 22181                        .HasColumnType("TEXT");
 22182
 22183                    b.Property<DateTime?>("DateCreated")
 22184                        .HasColumnType("TEXT");
 22185
 22186                    b.Property<DateTime?>("DateLastMediaAdded")
 22187                        .HasColumnType("TEXT");
 22188
 22189                    b.Property<DateTime?>("DateLastRefreshed")
 22190                        .HasColumnType("TEXT");
 22191
 22192                    b.Property<DateTime?>("DateLastSaved")
 22193                        .HasColumnType("TEXT");
 22194
 22195                    b.Property<DateTime?>("DateModified")
 22196                        .HasColumnType("TEXT");
 22197
 22198                    b.Property<DateTime?>("EndDate")
 22199                        .HasColumnType("TEXT");
 22200
 22201                    b.Property<string>("EpisodeTitle")
 22202                        .HasColumnType("TEXT");
 22203
 22204                    b.Property<string>("ExternalId")
 22205                        .HasColumnType("TEXT");
 22206
 22207                    b.Property<string>("ExternalSeriesId")
 22208                        .HasColumnType("TEXT");
 22209
 22210                    b.Property<string>("ExternalServiceId")
 22211                        .HasColumnType("TEXT");
 22212
 22213                    b.Property<int?>("ExtraType")
 22214                        .HasColumnType("INTEGER");
 22215
 22216                    b.Property<string>("ForcedSortName")
 22217                        .HasColumnType("TEXT");
 22218
 22219                    b.Property<string>("Genres")
 22220                        .HasColumnType("TEXT");
 22221
 22222                    b.Property<int?>("Height")
 22223                        .HasColumnType("INTEGER");
 22224
 22225                    b.Property<int?>("IndexNumber")
 22226                        .HasColumnType("INTEGER");
 22227
 22228                    b.Property<int?>("InheritedParentalRatingSubValue")
 22229                        .HasColumnType("INTEGER");
 22230
 22231                    b.Property<int?>("InheritedParentalRatingValue")
 22232                        .HasColumnType("INTEGER");
 22233
 22234                    b.Property<bool>("IsFolder")
 22235                        .HasColumnType("INTEGER");
 22236
 22237                    b.Property<bool>("IsInMixedFolder")
 22238                        .HasColumnType("INTEGER");
 22239
 22240                    b.Property<bool>("IsLocked")
 22241                        .HasColumnType("INTEGER");
 22242
 22243                    b.Property<bool>("IsMovie")
 22244                        .HasColumnType("INTEGER");
 22245
 22246                    b.Property<bool>("IsRepeat")
 22247                        .HasColumnType("INTEGER");
 22248
 22249                    b.Property<bool>("IsSeries")
 22250                        .HasColumnType("INTEGER");
 22251
 22252                    b.Property<bool>("IsVirtualItem")
 22253                        .HasColumnType("INTEGER");
 22254
 22255                    b.Property<float?>("LUFS")
 22256                        .HasColumnType("REAL");
 22257
 22258                    b.Property<string>("MediaType")
 22259                        .HasColumnType("TEXT");
 22260
 22261                    b.Property<string>("Name")
 22262                        .HasColumnType("TEXT");
 22263
 22264                    b.Property<float?>("NormalizationGain")
 22265                        .HasColumnType("REAL");
 22266
 22267                    b.Property<string>("OfficialRating")
 22268                        .HasColumnType("TEXT");
 22269
 22270                    b.Property<string>("OriginalLanguage")
 22271                        .HasColumnType("TEXT");
 22272
 22273                    b.Property<string>("OriginalTitle")
 22274                        .HasColumnType("TEXT");
 22275
 22276                    b.Property<string>("Overview")
 22277                        .HasColumnType("TEXT");
 22278
 22279                    b.Property<Guid?>("OwnerId")
 22280                        .HasColumnType("TEXT");
 22281
 22282                    b.Property<Guid?>("ParentId")
 22283                        .HasColumnType("TEXT");
 22284
 22285                    b.Property<int?>("ParentIndexNumber")
 22286                        .HasColumnType("INTEGER");
 22287
 22288                    b.Property<string>("Path")
 22289                        .HasColumnType("TEXT");
 22290
 22291                    b.Property<string>("PreferredMetadataCountryCode")
 22292                        .HasColumnType("TEXT");
 22293
 22294                    b.Property<string>("PreferredMetadataLanguage")
 22295                        .HasColumnType("TEXT");
 22296
 22297                    b.Property<DateTime?>("PremiereDate")
 22298                        .HasColumnType("TEXT");
 22299
 22300                    b.Property<string>("PresentationUniqueKey")
 22301                        .HasColumnType("TEXT");
 22302
 22303                    b.Property<string>("PrimaryVersionId")
 22304                        .HasColumnType("TEXT");
 22305
 22306                    b.Property<string>("ProductionLocations")
 22307                        .HasColumnType("TEXT");
 22308
 22309                    b.Property<int?>("ProductionYear")
 22310                        .HasColumnType("INTEGER");
 22311
 22312                    b.Property<long?>("RunTimeTicks")
 22313                        .HasColumnType("INTEGER");
 22314
 22315                    b.Property<Guid?>("SeasonId")
 22316                        .HasColumnType("TEXT");
 22317
 22318                    b.Property<string>("SeasonName")
 22319                        .HasColumnType("TEXT");
 22320
 22321                    b.Property<Guid?>("SeriesId")
 22322                        .HasColumnType("TEXT");
 22323
 22324                    b.Property<string>("SeriesName")
 22325                        .HasColumnType("TEXT");
 22326
 22327                    b.Property<string>("SeriesPresentationUniqueKey")
 22328                        .HasColumnType("TEXT");
 22329
 22330                    b.Property<string>("ShowId")
 22331                        .HasColumnType("TEXT");
 22332
 22333                    b.Property<long?>("Size")
 22334                        .HasColumnType("INTEGER");
 22335
 22336                    b.Property<string>("SortName")
 22337                        .HasColumnType("TEXT");
 22338
 22339                    b.Property<DateTime?>("StartDate")
 22340                        .HasColumnType("TEXT");
 22341
 22342                    b.Property<string>("Studios")
 22343                        .HasColumnType("TEXT");
 22344
 22345                    b.Property<string>("Tagline")
 22346                        .HasColumnType("TEXT");
 22347
 22348                    b.Property<string>("Tags")
 22349                        .HasColumnType("TEXT");
 22350
 22351                    b.Property<Guid?>("TopParentId")
 22352                        .HasColumnType("TEXT");
 22353
 22354                    b.Property<int?>("TotalBitrate")
 22355                        .HasColumnType("INTEGER");
 22356
 22357                    b.Property<string>("Type")
 22358                        .IsRequired()
 22359                        .HasColumnType("TEXT");
 22360
 22361                    b.Property<string>("UnratedType")
 22362                        .HasColumnType("TEXT");
 22363
 22364                    b.Property<int?>("Width")
 22365                        .HasColumnType("INTEGER");
 22366
 22367                    b.HasKey("Id");
 22368
 22369                    b.HasIndex("ExtraType");
 22370
 22371                    b.HasIndex("OwnerId");
 22372
 22373                    b.HasIndex("ParentId");
 22374
 22375                    b.HasIndex("Path");
 22376
 22377                    b.HasIndex("PresentationUniqueKey");
 22378
 22379                    b.HasIndex("ExtraType", "OwnerId");
 22380
 22381                    b.HasIndex("TopParentId", "Id");
 22382
 22383                    b.HasIndex("Type", "TopParentId", "Id");
 22384
 22385                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22386
 22387                    b.HasIndex("Type", "TopParentId", "StartDate");
 22388
 22389                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22390
 22391                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22392
 22393                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22394
 22395                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22396
 22397                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22398
 22399                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22400
 22401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22402
 22403                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22404
 22405                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22406
 22407                    b.ToTable("BaseItems");
 22408
 22409                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22410
 22411                    b.HasData(
 22412                        new
 22413                        {
 22414                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22415                            IsFolder = false,
 22416                            IsInMixedFolder = false,
 22417                            IsLocked = false,
 22418                            IsMovie = false,
 22419                            IsRepeat = false,
 22420                            IsSeries = false,
 22421                            IsVirtualItem = false,
 22422                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22423                            Type = "PLACEHOLDER"
 22424                        });
 22425                });
 426
 22427            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22428                {
 22429                    b.Property<Guid>("Id")
 22430                        .ValueGeneratedOnAdd()
 22431                        .HasColumnType("TEXT");
 22432
 22433                    b.Property<byte[]>("Blurhash")
 22434                        .HasColumnType("BLOB");
 22435
 22436                    b.Property<DateTime?>("DateModified")
 22437                        .HasColumnType("TEXT");
 22438
 22439                    b.Property<int>("Height")
 22440                        .HasColumnType("INTEGER");
 22441
 22442                    b.Property<int>("ImageType")
 22443                        .HasColumnType("INTEGER");
 22444
 22445                    b.Property<Guid>("ItemId")
 22446                        .HasColumnType("TEXT");
 22447
 22448                    b.Property<string>("Path")
 22449                        .IsRequired()
 22450                        .HasColumnType("TEXT");
 22451
 22452                    b.Property<int>("Width")
 22453                        .HasColumnType("INTEGER");
 22454
 22455                    b.HasKey("Id");
 22456
 22457                    b.HasIndex("ItemId");
 22458
 22459                    b.ToTable("BaseItemImageInfos");
 22460
 22461                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22462                });
 463
 22464            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22465                {
 22466                    b.Property<int>("Id")
 22467                        .HasColumnType("INTEGER");
 22468
 22469                    b.Property<Guid>("ItemId")
 22470                        .HasColumnType("TEXT");
 22471
 22472                    b.HasKey("Id", "ItemId");
 22473
 22474                    b.HasIndex("ItemId");
 22475
 22476                    b.ToTable("BaseItemMetadataFields");
 22477
 22478                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22479                });
 480
 22481            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22482                {
 22483                    b.Property<Guid>("ItemId")
 22484                        .HasColumnType("TEXT");
 22485
 22486                    b.Property<string>("ProviderId")
 22487                        .HasColumnType("TEXT");
 22488
 22489                    b.Property<string>("ProviderValue")
 22490                        .IsRequired()
 22491                        .HasColumnType("TEXT");
 22492
 22493                    b.HasKey("ItemId", "ProviderId");
 22494
 22495                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22496
 22497                    b.ToTable("BaseItemProviders");
 22498
 22499                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22500                });
 501
 22502            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22503                {
 22504                    b.Property<int>("Id")
 22505                        .HasColumnType("INTEGER");
 22506
 22507                    b.Property<Guid>("ItemId")
 22508                        .HasColumnType("TEXT");
 22509
 22510                    b.HasKey("Id", "ItemId");
 22511
 22512                    b.HasIndex("ItemId");
 22513
 22514                    b.ToTable("BaseItemTrailerTypes");
 22515
 22516                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22517                });
 518
 22519            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22520                {
 22521                    b.Property<Guid>("ItemId")
 22522                        .HasColumnType("TEXT");
 22523
 22524                    b.Property<int>("ChapterIndex")
 22525                        .HasColumnType("INTEGER");
 22526
 22527                    b.Property<DateTime?>("ImageDateModified")
 22528                        .HasColumnType("TEXT");
 22529
 22530                    b.Property<string>("ImagePath")
 22531                        .HasColumnType("TEXT");
 22532
 22533                    b.Property<string>("Name")
 22534                        .HasColumnType("TEXT");
 22535
 22536                    b.Property<long>("StartPositionTicks")
 22537                        .HasColumnType("INTEGER");
 22538
 22539                    b.HasKey("ItemId", "ChapterIndex");
 22540
 22541                    b.ToTable("Chapters");
 22542
 22543                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22544                });
 545
 22546            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22547                {
 22548                    b.Property<int>("Id")
 22549                        .ValueGeneratedOnAdd()
 22550                        .HasColumnType("INTEGER");
 22551
 22552                    b.Property<string>("Client")
 22553                        .IsRequired()
 22554                        .HasMaxLength(32)
 22555                        .HasColumnType("TEXT");
 22556
 22557                    b.Property<Guid>("ItemId")
 22558                        .HasColumnType("TEXT");
 22559
 22560                    b.Property<string>("Key")
 22561                        .IsRequired()
 22562                        .HasColumnType("TEXT");
 22563
 22564                    b.Property<Guid>("UserId")
 22565                        .HasColumnType("TEXT");
 22566
 22567                    b.Property<string>("Value")
 22568                        .HasColumnType("TEXT");
 22569
 22570                    b.HasKey("Id");
 22571
 22572                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22573                        .IsUnique();
 22574
 22575                    b.ToTable("CustomItemDisplayPreferences");
 22576
 22577                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22578                });
 579
 22580            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22581                {
 22582                    b.Property<int>("Id")
 22583                        .ValueGeneratedOnAdd()
 22584                        .HasColumnType("INTEGER");
 22585
 22586                    b.Property<int>("ChromecastVersion")
 22587                        .HasColumnType("INTEGER");
 22588
 22589                    b.Property<string>("Client")
 22590                        .IsRequired()
 22591                        .HasMaxLength(32)
 22592                        .HasColumnType("TEXT");
 22593
 22594                    b.Property<string>("DashboardTheme")
 22595                        .HasMaxLength(32)
 22596                        .HasColumnType("TEXT");
 22597
 22598                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22599                        .HasColumnType("INTEGER");
 22600
 22601                    b.Property<int?>("IndexBy")
 22602                        .HasColumnType("INTEGER");
 22603
 22604                    b.Property<Guid>("ItemId")
 22605                        .HasColumnType("TEXT");
 22606
 22607                    b.Property<int>("ScrollDirection")
 22608                        .HasColumnType("INTEGER");
 22609
 22610                    b.Property<bool>("ShowBackdrop")
 22611                        .HasColumnType("INTEGER");
 22612
 22613                    b.Property<bool>("ShowSidebar")
 22614                        .HasColumnType("INTEGER");
 22615
 22616                    b.Property<int>("SkipBackwardLength")
 22617                        .HasColumnType("INTEGER");
 22618
 22619                    b.Property<int>("SkipForwardLength")
 22620                        .HasColumnType("INTEGER");
 22621
 22622                    b.Property<string>("TvHome")
 22623                        .HasMaxLength(32)
 22624                        .HasColumnType("TEXT");
 22625
 22626                    b.Property<Guid>("UserId")
 22627                        .HasColumnType("TEXT");
 22628
 22629                    b.HasKey("Id");
 22630
 22631                    b.HasIndex("UserId", "ItemId", "Client")
 22632                        .IsUnique();
 22633
 22634                    b.ToTable("DisplayPreferences");
 22635
 22636                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22637                });
 638
 22639            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22640                {
 22641                    b.Property<int>("Id")
 22642                        .ValueGeneratedOnAdd()
 22643                        .HasColumnType("INTEGER");
 22644
 22645                    b.Property<int>("DisplayPreferencesId")
 22646                        .HasColumnType("INTEGER");
 22647
 22648                    b.Property<int>("Order")
 22649                        .HasColumnType("INTEGER");
 22650
 22651                    b.Property<int>("Type")
 22652                        .HasColumnType("INTEGER");
 22653
 22654                    b.HasKey("Id");
 22655
 22656                    b.HasIndex("DisplayPreferencesId");
 22657
 22658                    b.ToTable("HomeSection");
 22659
 22660                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22661                });
 662
 22663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22664                {
 22665                    b.Property<int>("Id")
 22666                        .ValueGeneratedOnAdd()
 22667                        .HasColumnType("INTEGER");
 22668
 22669                    b.Property<DateTime>("LastModified")
 22670                        .HasColumnType("TEXT");
 22671
 22672                    b.Property<string>("Path")
 22673                        .IsRequired()
 22674                        .HasMaxLength(512)
 22675                        .HasColumnType("TEXT");
 22676
 22677                    b.Property<Guid?>("UserId")
 22678                        .HasColumnType("TEXT");
 22679
 22680                    b.HasKey("Id");
 22681
 22682                    b.HasIndex("UserId")
 22683                        .IsUnique();
 22684
 22685                    b.ToTable("ImageInfos");
 22686
 22687                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22688                });
 689
 22690            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22691                {
 22692                    b.Property<int>("Id")
 22693                        .ValueGeneratedOnAdd()
 22694                        .HasColumnType("INTEGER");
 22695
 22696                    b.Property<string>("Client")
 22697                        .IsRequired()
 22698                        .HasMaxLength(32)
 22699                        .HasColumnType("TEXT");
 22700
 22701                    b.Property<int?>("IndexBy")
 22702                        .HasColumnType("INTEGER");
 22703
 22704                    b.Property<Guid>("ItemId")
 22705                        .HasColumnType("TEXT");
 22706
 22707                    b.Property<bool>("RememberIndexing")
 22708                        .HasColumnType("INTEGER");
 22709
 22710                    b.Property<bool>("RememberSorting")
 22711                        .HasColumnType("INTEGER");
 22712
 22713                    b.Property<string>("SortBy")
 22714                        .IsRequired()
 22715                        .HasMaxLength(64)
 22716                        .HasColumnType("TEXT");
 22717
 22718                    b.Property<int>("SortOrder")
 22719                        .HasColumnType("INTEGER");
 22720
 22721                    b.Property<Guid>("UserId")
 22722                        .HasColumnType("TEXT");
 22723
 22724                    b.Property<int>("ViewType")
 22725                        .HasColumnType("INTEGER");
 22726
 22727                    b.HasKey("Id");
 22728
 22729                    b.HasIndex("UserId");
 22730
 22731                    b.ToTable("ItemDisplayPreferences");
 22732
 22733                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22734                });
 735
 22736            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22737                {
 22738                    b.Property<Guid>("ItemValueId")
 22739                        .ValueGeneratedOnAdd()
 22740                        .HasColumnType("TEXT");
 22741
 22742                    b.Property<string>("CleanValue")
 22743                        .IsRequired()
 22744                        .HasColumnType("TEXT");
 22745
 22746                    b.Property<int>("Type")
 22747                        .HasColumnType("INTEGER");
 22748
 22749                    b.Property<string>("Value")
 22750                        .IsRequired()
 22751                        .HasColumnType("TEXT");
 22752
 22753                    b.HasKey("ItemValueId");
 22754
 22755                    b.HasIndex("Type", "CleanValue");
 22756
 22757                    b.HasIndex("Type", "Value")
 22758                        .IsUnique();
 22759
 22760                    b.ToTable("ItemValues");
 22761
 22762                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22763                });
 764
 22765            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22766                {
 22767                    b.Property<Guid>("ItemValueId")
 22768                        .HasColumnType("TEXT");
 22769
 22770                    b.Property<Guid>("ItemId")
 22771                        .HasColumnType("TEXT");
 22772
 22773                    b.HasKey("ItemValueId", "ItemId");
 22774
 22775                    b.HasIndex("ItemId");
 22776
 22777                    b.ToTable("ItemValuesMap");
 22778
 22779                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22780                });
 781
 22782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22783                {
 22784                    b.Property<Guid>("ItemId")
 22785                        .HasColumnType("TEXT");
 22786
 22787                    b.PrimitiveCollection<string>("KeyframeTicks")
 22788                        .HasColumnType("TEXT");
 22789
 22790                    b.Property<long>("TotalDuration")
 22791                        .HasColumnType("INTEGER");
 22792
 22793                    b.HasKey("ItemId");
 22794
 22795                    b.ToTable("KeyframeData");
 22796
 22797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22798                });
 799
 22800            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22801                {
 22802                    b.Property<Guid>("ParentId")
 22803                        .HasColumnType("TEXT");
 22804
 22805                    b.Property<Guid>("ChildId")
 22806                        .HasColumnType("TEXT");
 22807
 22808                    b.Property<int>("ChildType")
 22809                        .HasColumnType("INTEGER");
 22810
 22811                    b.Property<int?>("SortOrder")
 22812                        .HasColumnType("INTEGER");
 22813
 22814                    b.HasKey("ParentId", "ChildId");
 22815
 22816                    b.HasIndex("ChildId");
 22817
 22818                    b.HasIndex("ParentId");
 22819
 22820                    b.HasIndex("ChildId", "ChildType");
 22821
 22822                    b.HasIndex("ParentId", "ChildType");
 22823
 22824                    b.HasIndex("ParentId", "SortOrder");
 22825
 22826                    b.ToTable("LinkedChildren", (string)null);
 22827
 22828                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22829                });
 830
 22831            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22832                {
 22833                    b.Property<Guid>("Id")
 22834                        .ValueGeneratedOnAdd()
 22835                        .HasColumnType("TEXT");
 22836
 22837                    b.Property<long>("EndTicks")
 22838                        .HasColumnType("INTEGER");
 22839
 22840                    b.Property<Guid>("ItemId")
 22841                        .HasColumnType("TEXT");
 22842
 22843                    b.Property<string>("SegmentProviderId")
 22844                        .IsRequired()
 22845                        .HasColumnType("TEXT");
 22846
 22847                    b.Property<long>("StartTicks")
 22848                        .HasColumnType("INTEGER");
 22849
 22850                    b.Property<int>("Type")
 22851                        .HasColumnType("INTEGER");
 22852
 22853                    b.HasKey("Id");
 22854
 22855                    b.ToTable("MediaSegments");
 22856
 22857                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22858                });
 859
 22860            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22861                {
 22862                    b.Property<Guid>("ItemId")
 22863                        .HasColumnType("TEXT");
 22864
 22865                    b.Property<int>("StreamIndex")
 22866                        .HasColumnType("INTEGER");
 22867
 22868                    b.Property<string>("AspectRatio")
 22869                        .HasColumnType("TEXT");
 22870
 22871                    b.Property<float?>("AverageFrameRate")
 22872                        .HasColumnType("REAL");
 22873
 22874                    b.Property<int?>("BitDepth")
 22875                        .HasColumnType("INTEGER");
 22876
 22877                    b.Property<int?>("BitRate")
 22878                        .HasColumnType("INTEGER");
 22879
 22880                    b.Property<int?>("BlPresentFlag")
 22881                        .HasColumnType("INTEGER");
 22882
 22883                    b.Property<string>("ChannelLayout")
 22884                        .HasColumnType("TEXT");
 22885
 22886                    b.Property<int?>("Channels")
 22887                        .HasColumnType("INTEGER");
 22888
 22889                    b.Property<string>("Codec")
 22890                        .HasColumnType("TEXT");
 22891
 22892                    b.Property<string>("CodecTag")
 22893                        .HasColumnType("TEXT");
 22894
 22895                    b.Property<string>("CodecTimeBase")
 22896                        .HasColumnType("TEXT");
 22897
 22898                    b.Property<string>("ColorPrimaries")
 22899                        .HasColumnType("TEXT");
 22900
 22901                    b.Property<string>("ColorSpace")
 22902                        .HasColumnType("TEXT");
 22903
 22904                    b.Property<string>("ColorTransfer")
 22905                        .HasColumnType("TEXT");
 22906
 22907                    b.Property<string>("Comment")
 22908                        .HasColumnType("TEXT");
 22909
 22910                    b.Property<int?>("DvBlSignalCompatibilityId")
 22911                        .HasColumnType("INTEGER");
 22912
 22913                    b.Property<int?>("DvLevel")
 22914                        .HasColumnType("INTEGER");
 22915
 22916                    b.Property<int?>("DvProfile")
 22917                        .HasColumnType("INTEGER");
 22918
 22919                    b.Property<int?>("DvVersionMajor")
 22920                        .HasColumnType("INTEGER");
 22921
 22922                    b.Property<int?>("DvVersionMinor")
 22923                        .HasColumnType("INTEGER");
 22924
 22925                    b.Property<int?>("ElPresentFlag")
 22926                        .HasColumnType("INTEGER");
 22927
 22928                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22929                        .HasColumnType("INTEGER");
 22930
 22931                    b.Property<int?>("Height")
 22932                        .HasColumnType("INTEGER");
 22933
 22934                    b.Property<bool?>("IsAnamorphic")
 22935                        .HasColumnType("INTEGER");
 22936
 22937                    b.Property<bool?>("IsAvc")
 22938                        .HasColumnType("INTEGER");
 22939
 22940                    b.Property<bool>("IsDefault")
 22941                        .HasColumnType("INTEGER");
 22942
 22943                    b.Property<bool>("IsExternal")
 22944                        .HasColumnType("INTEGER");
 22945
 22946                    b.Property<bool>("IsForced")
 22947                        .HasColumnType("INTEGER");
 22948
 22949                    b.Property<bool?>("IsHearingImpaired")
 22950                        .HasColumnType("INTEGER");
 22951
 22952                    b.Property<bool?>("IsInterlaced")
 22953                        .HasColumnType("INTEGER");
 22954
 22955                    b.Property<string>("KeyFrames")
 22956                        .HasColumnType("TEXT");
 22957
 22958                    b.Property<string>("Language")
 22959                        .HasColumnType("TEXT");
 22960
 22961                    b.Property<float?>("Level")
 22962                        .HasColumnType("REAL");
 22963
 22964                    b.Property<string>("NalLengthSize")
 22965                        .HasColumnType("TEXT");
 22966
 22967                    b.Property<string>("Path")
 22968                        .HasColumnType("TEXT");
 22969
 22970                    b.Property<string>("PixelFormat")
 22971                        .HasColumnType("TEXT");
 22972
 22973                    b.Property<string>("Profile")
 22974                        .HasColumnType("TEXT");
 22975
 22976                    b.Property<float?>("RealFrameRate")
 22977                        .HasColumnType("REAL");
 22978
 22979                    b.Property<int?>("RefFrames")
 22980                        .HasColumnType("INTEGER");
 22981
 22982                    b.Property<int?>("Rotation")
 22983                        .HasColumnType("INTEGER");
 22984
 22985                    b.Property<int?>("RpuPresentFlag")
 22986                        .HasColumnType("INTEGER");
 22987
 22988                    b.Property<int?>("SampleRate")
 22989                        .HasColumnType("INTEGER");
 22990
 22991                    b.Property<int>("StreamType")
 22992                        .HasColumnType("INTEGER");
 22993
 22994                    b.Property<string>("TimeBase")
 22995                        .HasColumnType("TEXT");
 22996
 22997                    b.Property<string>("Title")
 22998                        .HasColumnType("TEXT");
 22999
 221000                    b.Property<int?>("Width")
 221001                        .HasColumnType("INTEGER");
 221002
 221003                    b.HasKey("ItemId", "StreamIndex");
 221004
 221005                    b.HasIndex("StreamIndex");
 221006
 221007                    b.HasIndex("StreamType");
 221008
 221009                    b.HasIndex("StreamIndex", "StreamType");
 221010
 221011                    b.HasIndex("StreamIndex", "StreamType", "Language");
 221012
 221013                    b.ToTable("MediaStreamInfos");
 221014
 221015                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221016                });
 1017
 221018            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221019                {
 221020                    b.Property<Guid>("Id")
 221021                        .ValueGeneratedOnAdd()
 221022                        .HasColumnType("TEXT");
 221023
 221024                    b.Property<string>("Name")
 221025                        .IsRequired()
 221026                        .HasColumnType("TEXT");
 221027
 221028                    b.Property<string>("PersonType")
 221029                        .HasColumnType("TEXT");
 221030
 221031                    b.HasKey("Id");
 221032
 221033                    b.HasIndex("Name");
 221034
 221035                    b.ToTable("Peoples");
 221036
 221037                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221038                });
 1039
 221040            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221041                {
 221042                    b.Property<Guid>("ItemId")
 221043                        .HasColumnType("TEXT");
 221044
 221045                    b.Property<Guid>("PeopleId")
 221046                        .HasColumnType("TEXT");
 221047
 221048                    b.Property<string>("Role")
 221049                        .HasColumnType("TEXT");
 221050
 221051                    b.Property<int?>("ListOrder")
 221052                        .HasColumnType("INTEGER");
 221053
 221054                    b.Property<int?>("SortOrder")
 221055                        .HasColumnType("INTEGER");
 221056
 221057                    b.HasKey("ItemId", "PeopleId", "Role");
 221058
 221059                    b.HasIndex("PeopleId");
 221060
 221061                    b.HasIndex("ItemId", "ListOrder");
 221062
 221063                    b.HasIndex("ItemId", "SortOrder");
 221064
 221065                    b.ToTable("PeopleBaseItemMap");
 221066
 221067                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221068                });
 1069
 221070            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221071                {
 221072                    b.Property<int>("Id")
 221073                        .ValueGeneratedOnAdd()
 221074                        .HasColumnType("INTEGER");
 221075
 221076                    b.Property<int>("Kind")
 221077                        .HasColumnType("INTEGER");
 221078
 221079                    b.Property<Guid?>("Permission_Permissions_Guid")
 221080                        .HasColumnType("TEXT");
 221081
 221082                    b.Property<uint>("RowVersion")
 221083                        .IsConcurrencyToken()
 221084                        .HasColumnType("INTEGER");
 221085
 221086                    b.Property<Guid?>("UserId")
 221087                        .HasColumnType("TEXT");
 221088
 221089                    b.Property<bool>("Value")
 221090                        .HasColumnType("INTEGER");
 221091
 221092                    b.HasKey("Id");
 221093
 221094                    b.HasIndex("UserId", "Kind")
 221095                        .IsUnique()
 221096                        .HasFilter("[UserId] IS NOT NULL");
 221097
 221098                    b.ToTable("Permissions");
 221099
 221100                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221101                });
 1102
 221103            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221104                {
 221105                    b.Property<int>("Id")
 221106                        .ValueGeneratedOnAdd()
 221107                        .HasColumnType("INTEGER");
 221108
 221109                    b.Property<int>("Kind")
 221110                        .HasColumnType("INTEGER");
 221111
 221112                    b.Property<Guid?>("Preference_Preferences_Guid")
 221113                        .HasColumnType("TEXT");
 221114
 221115                    b.Property<uint>("RowVersion")
 221116                        .IsConcurrencyToken()
 221117                        .HasColumnType("INTEGER");
 221118
 221119                    b.Property<Guid?>("UserId")
 221120                        .HasColumnType("TEXT");
 221121
 221122                    b.Property<string>("Value")
 221123                        .IsRequired()
 221124                        .HasMaxLength(65535)
 221125                        .HasColumnType("TEXT");
 221126
 221127                    b.HasKey("Id");
 221128
 221129                    b.HasIndex("UserId", "Kind")
 221130                        .IsUnique()
 221131                        .HasFilter("[UserId] IS NOT NULL");
 221132
 221133                    b.ToTable("Preferences");
 221134
 221135                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221136                });
 1137
 221138            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221139                {
 221140                    b.Property<int>("Id")
 221141                        .ValueGeneratedOnAdd()
 221142                        .HasColumnType("INTEGER");
 221143
 221144                    b.Property<string>("AccessToken")
 221145                        .IsRequired()
 221146                        .HasColumnType("TEXT");
 221147
 221148                    b.Property<DateTime>("DateCreated")
 221149                        .HasColumnType("TEXT");
 221150
 221151                    b.Property<DateTime>("DateLastActivity")
 221152                        .HasColumnType("TEXT");
 221153
 221154                    b.Property<string>("Name")
 221155                        .IsRequired()
 221156                        .HasMaxLength(64)
 221157                        .HasColumnType("TEXT");
 221158
 221159                    b.HasKey("Id");
 221160
 221161                    b.HasIndex("AccessToken")
 221162                        .IsUnique();
 221163
 221164                    b.ToTable("ApiKeys");
 221165
 221166                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221167                });
 1168
 221169            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221170                {
 221171                    b.Property<int>("Id")
 221172                        .ValueGeneratedOnAdd()
 221173                        .HasColumnType("INTEGER");
 221174
 221175                    b.Property<string>("AccessToken")
 221176                        .IsRequired()
 221177                        .HasColumnType("TEXT");
 221178
 221179                    b.Property<string>("AppName")
 221180                        .IsRequired()
 221181                        .HasMaxLength(64)
 221182                        .HasColumnType("TEXT");
 221183
 221184                    b.Property<string>("AppVersion")
 221185                        .IsRequired()
 221186                        .HasMaxLength(32)
 221187                        .HasColumnType("TEXT");
 221188
 221189                    b.Property<DateTime>("DateCreated")
 221190                        .HasColumnType("TEXT");
 221191
 221192                    b.Property<DateTime>("DateLastActivity")
 221193                        .HasColumnType("TEXT");
 221194
 221195                    b.Property<DateTime>("DateModified")
 221196                        .HasColumnType("TEXT");
 221197
 221198                    b.Property<string>("DeviceId")
 221199                        .IsRequired()
 221200                        .HasMaxLength(256)
 221201                        .HasColumnType("TEXT");
 221202
 221203                    b.Property<string>("DeviceName")
 221204                        .IsRequired()
 221205                        .HasMaxLength(64)
 221206                        .HasColumnType("TEXT");
 221207
 221208                    b.Property<bool>("IsActive")
 221209                        .HasColumnType("INTEGER");
 221210
 221211                    b.Property<Guid>("UserId")
 221212                        .HasColumnType("TEXT");
 221213
 221214                    b.HasKey("Id");
 221215
 221216                    b.HasIndex("DeviceId");
 221217
 221218                    b.HasIndex("AccessToken", "DateLastActivity");
 221219
 221220                    b.HasIndex("DeviceId", "DateLastActivity");
 221221
 221222                    b.HasIndex("UserId", "DeviceId");
 221223
 221224                    b.ToTable("Devices");
 221225
 221226                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221227                });
 1228
 221229            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221230                {
 221231                    b.Property<int>("Id")
 221232                        .ValueGeneratedOnAdd()
 221233                        .HasColumnType("INTEGER");
 221234
 221235                    b.Property<string>("CustomName")
 221236                        .HasColumnType("TEXT");
 221237
 221238                    b.Property<string>("DeviceId")
 221239                        .IsRequired()
 221240                        .HasColumnType("TEXT");
 221241
 221242                    b.HasKey("Id");
 221243
 221244                    b.HasIndex("DeviceId")
 221245                        .IsUnique();
 221246
 221247                    b.ToTable("DeviceOptions");
 221248
 221249                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221250                });
 1251
 221252            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221253                {
 221254                    b.Property<Guid>("ItemId")
 221255                        .HasColumnType("TEXT");
 221256
 221257                    b.Property<int>("Width")
 221258                        .HasColumnType("INTEGER");
 221259
 221260                    b.Property<int>("Bandwidth")
 221261                        .HasColumnType("INTEGER");
 221262
 221263                    b.Property<int>("Height")
 221264                        .HasColumnType("INTEGER");
 221265
 221266                    b.Property<int>("Interval")
 221267                        .HasColumnType("INTEGER");
 221268
 221269                    b.Property<int>("ThumbnailCount")
 221270                        .HasColumnType("INTEGER");
 221271
 221272                    b.Property<int>("TileHeight")
 221273                        .HasColumnType("INTEGER");
 221274
 221275                    b.Property<int>("TileWidth")
 221276                        .HasColumnType("INTEGER");
 221277
 221278                    b.HasKey("ItemId", "Width");
 221279
 221280                    b.ToTable("TrickplayInfos");
 221281
 221282                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221283                });
 1284
 221285            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221286                {
 221287                    b.Property<Guid>("Id")
 221288                        .ValueGeneratedOnAdd()
 221289                        .HasColumnType("TEXT");
 221290
 221291                    b.Property<string>("AudioLanguagePreference")
 221292                        .HasMaxLength(255)
 221293                        .HasColumnType("TEXT");
 221294
 221295                    b.Property<string>("AuthenticationProviderId")
 221296                        .IsRequired()
 221297                        .HasMaxLength(255)
 221298                        .HasColumnType("TEXT");
 221299
 221300                    b.Property<string>("CastReceiverId")
 221301                        .HasMaxLength(32)
 221302                        .HasColumnType("TEXT");
 221303
 221304                    b.Property<bool>("DisplayCollectionsView")
 221305                        .HasColumnType("INTEGER");
 221306
 221307                    b.Property<bool>("DisplayMissingEpisodes")
 221308                        .HasColumnType("INTEGER");
 221309
 221310                    b.Property<bool>("EnableAutoLogin")
 221311                        .HasColumnType("INTEGER");
 221312
 221313                    b.Property<bool>("EnableLocalPassword")
 221314                        .HasColumnType("INTEGER");
 221315
 221316                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221317                        .HasColumnType("INTEGER");
 221318
 221319                    b.Property<bool>("EnableUserPreferenceAccess")
 221320                        .HasColumnType("INTEGER");
 221321
 221322                    b.Property<bool>("HidePlayedInLatest")
 221323                        .HasColumnType("INTEGER");
 221324
 221325                    b.Property<long>("InternalId")
 221326                        .HasColumnType("INTEGER");
 221327
 221328                    b.Property<int>("InvalidLoginAttemptCount")
 221329                        .HasColumnType("INTEGER");
 221330
 221331                    b.Property<DateTime?>("LastActivityDate")
 221332                        .HasColumnType("TEXT");
 221333
 221334                    b.Property<DateTime?>("LastLoginDate")
 221335                        .HasColumnType("TEXT");
 221336
 221337                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221338                        .HasColumnType("INTEGER");
 221339
 221340                    b.Property<int>("MaxActiveSessions")
 221341                        .HasColumnType("INTEGER");
 221342
 221343                    b.Property<int?>("MaxParentalRatingScore")
 221344                        .HasColumnType("INTEGER");
 221345
 221346                    b.Property<int?>("MaxParentalRatingSubScore")
 221347                        .HasColumnType("INTEGER");
 221348
 221349                    b.Property<bool>("MustUpdatePassword")
 221350                        .HasColumnType("INTEGER");
 221351
 221352                    b.Property<string>("Password")
 221353                        .HasMaxLength(65535)
 221354                        .HasColumnType("TEXT");
 221355
 221356                    b.Property<string>("PasswordResetProviderId")
 221357                        .IsRequired()
 221358                        .HasMaxLength(255)
 221359                        .HasColumnType("TEXT");
 221360
 221361                    b.Property<bool>("PlayDefaultAudioTrack")
 221362                        .HasColumnType("INTEGER");
 221363
 221364                    b.Property<bool>("RememberAudioSelections")
 221365                        .HasColumnType("INTEGER");
 221366
 221367                    b.Property<bool>("RememberSubtitleSelections")
 221368                        .HasColumnType("INTEGER");
 221369
 221370                    b.Property<int?>("RemoteClientBitrateLimit")
 221371                        .HasColumnType("INTEGER");
 221372
 221373                    b.Property<uint>("RowVersion")
 221374                        .IsConcurrencyToken()
 221375                        .HasColumnType("INTEGER");
 221376
 221377                    b.Property<string>("SubtitleLanguagePreference")
 221378                        .HasMaxLength(255)
 221379                        .HasColumnType("TEXT");
 221380
 221381                    b.Property<int>("SubtitleMode")
 221382                        .HasColumnType("INTEGER");
 221383
 221384                    b.Property<int>("SyncPlayAccess")
 221385                        .HasColumnType("INTEGER");
 221386
 221387                    b.Property<string>("Username")
 221388                        .IsRequired()
 221389                        .HasMaxLength(255)
 221390                        .HasColumnType("TEXT");
 221391
 221392                    b.HasKey("Id");
 221393
 221394                    b.HasIndex("Username")
 221395                        .IsUnique();
 221396
 221397                    b.ToTable("Users");
 221398
 221399                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221400                });
 1401
 221402            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221403                {
 221404                    b.Property<Guid>("ItemId")
 221405                        .HasColumnType("TEXT");
 221406
 221407                    b.Property<Guid>("UserId")
 221408                        .HasColumnType("TEXT");
 221409
 221410                    b.Property<string>("CustomDataKey")
 221411                        .HasColumnType("TEXT");
 221412
 221413                    b.Property<int?>("AudioStreamIndex")
 221414                        .HasColumnType("INTEGER");
 221415
 221416                    b.Property<bool>("IsFavorite")
 221417                        .HasColumnType("INTEGER");
 221418
 221419                    b.Property<DateTime?>("LastPlayedDate")
 221420                        .HasColumnType("TEXT");
 221421
 221422                    b.Property<bool?>("Likes")
 221423                        .HasColumnType("INTEGER");
 221424
 221425                    b.Property<int>("PlayCount")
 221426                        .HasColumnType("INTEGER");
 221427
 221428                    b.Property<long>("PlaybackPositionTicks")
 221429                        .HasColumnType("INTEGER");
 221430
 221431                    b.Property<bool>("Played")
 221432                        .HasColumnType("INTEGER");
 221433
 221434                    b.Property<double?>("Rating")
 221435                        .HasColumnType("REAL");
 221436
 221437                    b.Property<DateTime?>("RetentionDate")
 221438                        .HasColumnType("TEXT");
 221439
 221440                    b.Property<int?>("SubtitleStreamIndex")
 221441                        .HasColumnType("INTEGER");
 221442
 221443                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221444
 221445                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221446
 221447                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221448
 221449                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221450
 221451                    b.HasIndex("ItemId", "UserId", "Played");
 221452
 221453                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 221454
 221455                    b.ToTable("UserData");
 221456
 221457                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221458                });
 1459
 221460            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221461                {
 221462                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221463                        .WithMany("AccessSchedules")
 221464                        .HasForeignKey("UserId")
 221465                        .OnDelete(DeleteBehavior.Cascade)
 221466                        .IsRequired();
 221467                });
 1468
 221469            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221470                {
 221471                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221472                        .WithMany("Parents")
 221473                        .HasForeignKey("ItemId")
 221474                        .OnDelete(DeleteBehavior.Cascade)
 221475                        .IsRequired();
 221476
 221477                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221478                        .WithMany("Children")
 221479                        .HasForeignKey("ParentItemId")
 221480                        .OnDelete(DeleteBehavior.Cascade)
 221481                        .IsRequired();
 221482
 221483                    b.Navigation("Item");
 221484
 221485                    b.Navigation("ParentItem");
 221486                });
 1487
 221488            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221489                {
 221490                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221491                        .WithMany()
 221492                        .HasForeignKey("ItemId")
 221493                        .OnDelete(DeleteBehavior.Cascade)
 221494                        .IsRequired();
 221495
 221496                    b.Navigation("Item");
 221497                });
 1498
 221499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221500                {
 221501                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221502                        .WithMany("Extras")
 221503                        .HasForeignKey("OwnerId")
 221504                        .OnDelete(DeleteBehavior.NoAction);
 221505
 221506                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221507                        .WithMany("DirectChildren")
 221508                        .HasForeignKey("ParentId")
 221509                        .OnDelete(DeleteBehavior.Cascade);
 221510
 221511                    b.Navigation("DirectParent");
 221512
 221513                    b.Navigation("Owner");
 221514                });
 1515
 221516            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221517                {
 221518                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221519                        .WithMany("Images")
 221520                        .HasForeignKey("ItemId")
 221521                        .OnDelete(DeleteBehavior.Cascade)
 221522                        .IsRequired();
 221523
 221524                    b.Navigation("Item");
 221525                });
 1526
 221527            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221528                {
 221529                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221530                        .WithMany("LockedFields")
 221531                        .HasForeignKey("ItemId")
 221532                        .OnDelete(DeleteBehavior.Cascade)
 221533                        .IsRequired();
 221534
 221535                    b.Navigation("Item");
 221536                });
 1537
 221538            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221539                {
 221540                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221541                        .WithMany("Provider")
 221542                        .HasForeignKey("ItemId")
 221543                        .OnDelete(DeleteBehavior.Cascade)
 221544                        .IsRequired();
 221545
 221546                    b.Navigation("Item");
 221547                });
 1548
 221549            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221550                {
 221551                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221552                        .WithMany("TrailerTypes")
 221553                        .HasForeignKey("ItemId")
 221554                        .OnDelete(DeleteBehavior.Cascade)
 221555                        .IsRequired();
 221556
 221557                    b.Navigation("Item");
 221558                });
 1559
 221560            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221561                {
 221562                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221563                        .WithMany("Chapters")
 221564                        .HasForeignKey("ItemId")
 221565                        .OnDelete(DeleteBehavior.Cascade)
 221566                        .IsRequired();
 221567
 221568                    b.Navigation("Item");
 221569                });
 1570
 221571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221572                {
 221573                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221574                        .WithMany("DisplayPreferences")
 221575                        .HasForeignKey("UserId")
 221576                        .OnDelete(DeleteBehavior.Cascade)
 221577                        .IsRequired();
 221578                });
 1579
 221580            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221581                {
 221582                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221583                        .WithMany("HomeSections")
 221584                        .HasForeignKey("DisplayPreferencesId")
 221585                        .OnDelete(DeleteBehavior.Cascade)
 221586                        .IsRequired();
 221587                });
 1588
 221589            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221590                {
 221591                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221592                        .WithOne("ProfileImage")
 221593                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221594                        .OnDelete(DeleteBehavior.Cascade);
 221595                });
 1596
 221597            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221598                {
 221599                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221600                        .WithMany("ItemDisplayPreferences")
 221601                        .HasForeignKey("UserId")
 221602                        .OnDelete(DeleteBehavior.Cascade)
 221603                        .IsRequired();
 221604                });
 1605
 221606            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221607                {
 221608                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221609                        .WithMany("ItemValues")
 221610                        .HasForeignKey("ItemId")
 221611                        .OnDelete(DeleteBehavior.Cascade)
 221612                        .IsRequired();
 221613
 221614                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221615                        .WithMany("BaseItemsMap")
 221616                        .HasForeignKey("ItemValueId")
 221617                        .OnDelete(DeleteBehavior.Cascade)
 221618                        .IsRequired();
 221619
 221620                    b.Navigation("Item");
 221621
 221622                    b.Navigation("ItemValue");
 221623                });
 1624
 221625            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221626                {
 221627                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221628                        .WithMany()
 221629                        .HasForeignKey("ItemId")
 221630                        .OnDelete(DeleteBehavior.Cascade)
 221631                        .IsRequired();
 221632
 221633                    b.Navigation("Item");
 221634                });
 1635
 221636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221637                {
 221638                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221639                        .WithMany("LinkedChildOfEntities")
 221640                        .HasForeignKey("ChildId")
 221641                        .OnDelete(DeleteBehavior.NoAction)
 221642                        .IsRequired();
 221643
 221644                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221645                        .WithMany("LinkedChildEntities")
 221646                        .HasForeignKey("ParentId")
 221647                        .OnDelete(DeleteBehavior.NoAction)
 221648                        .IsRequired();
 221649
 221650                    b.Navigation("Child");
 221651
 221652                    b.Navigation("Parent");
 221653                });
 1654
 221655            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221656                {
 221657                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221658                        .WithMany("MediaStreams")
 221659                        .HasForeignKey("ItemId")
 221660                        .OnDelete(DeleteBehavior.Cascade)
 221661                        .IsRequired();
 221662
 221663                    b.Navigation("Item");
 221664                });
 1665
 221666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221667                {
 221668                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221669                        .WithMany("Peoples")
 221670                        .HasForeignKey("ItemId")
 221671                        .OnDelete(DeleteBehavior.Cascade)
 221672                        .IsRequired();
 221673
 221674                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221675                        .WithMany("BaseItems")
 221676                        .HasForeignKey("PeopleId")
 221677                        .OnDelete(DeleteBehavior.Cascade)
 221678                        .IsRequired();
 221679
 221680                    b.Navigation("Item");
 221681
 221682                    b.Navigation("People");
 221683                });
 1684
 221685            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221686                {
 221687                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221688                        .WithMany("Permissions")
 221689                        .HasForeignKey("UserId")
 221690                        .OnDelete(DeleteBehavior.Cascade);
 221691                });
 1692
 221693            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221694                {
 221695                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221696                        .WithMany("Preferences")
 221697                        .HasForeignKey("UserId")
 221698                        .OnDelete(DeleteBehavior.Cascade);
 221699                });
 1700
 221701            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221702                {
 221703                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221704                        .WithMany()
 221705                        .HasForeignKey("UserId")
 221706                        .OnDelete(DeleteBehavior.Cascade)
 221707                        .IsRequired();
 221708
 221709                    b.Navigation("User");
 221710                });
 1711
 221712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221713                {
 221714                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221715                        .WithMany("UserData")
 221716                        .HasForeignKey("ItemId")
 221717                        .OnDelete(DeleteBehavior.Cascade)
 221718                        .IsRequired();
 221719
 221720                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221721                        .WithMany()
 221722                        .HasForeignKey("UserId")
 221723                        .OnDelete(DeleteBehavior.Cascade)
 221724                        .IsRequired();
 221725
 221726                    b.Navigation("Item");
 221727
 221728                    b.Navigation("User");
 221729                });
 1730
 221731            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221732                {
 221733                    b.Navigation("Chapters");
 221734
 221735                    b.Navigation("Children");
 221736
 221737                    b.Navigation("DirectChildren");
 221738
 221739                    b.Navigation("Extras");
 221740
 221741                    b.Navigation("Images");
 221742
 221743                    b.Navigation("ItemValues");
 221744
 221745                    b.Navigation("LinkedChildEntities");
 221746
 221747                    b.Navigation("LinkedChildOfEntities");
 221748
 221749                    b.Navigation("LockedFields");
 221750
 221751                    b.Navigation("MediaStreams");
 221752
 221753                    b.Navigation("Parents");
 221754
 221755                    b.Navigation("Peoples");
 221756
 221757                    b.Navigation("Provider");
 221758
 221759                    b.Navigation("TrailerTypes");
 221760
 221761                    b.Navigation("UserData");
 221762                });
 1763
 221764            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221765                {
 221766                    b.Navigation("HomeSections");
 221767                });
 1768
 221769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221770                {
 221771                    b.Navigation("BaseItemsMap");
 221772                });
 1773
 221774            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221775                {
 221776                    b.Navigation("BaseItems");
 221777                });
 1778
 221779            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221780                {
 221781                    b.Navigation("AccessSchedules");
 221782
 221783                    b.Navigation("DisplayPreferences");
 221784
 221785                    b.Navigation("ItemDisplayPreferences");
 221786
 221787                    b.Navigation("Permissions");
 221788
 221789                    b.Navigation("Preferences");
 221790
 221791                    b.Navigation("ProfileImage");
 221792                });
 1793#pragma warning restore 612, 618
 221794        }
 1795    }
 1796}