< Summary - Jellyfin

Line coverage
99%
Covered lines: 1736
Uncovered lines: 10
Coverable lines: 1746
Total lines: 1849
Line coverage: 99.4%
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.4% (1733/1743) Total lines: 18465/22/2026 - 12:15:17 AM Line coverage: 99.4% (1736/1746) Total lines: 1849

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/20260130232147_AddBaseItemNameIndex.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 AddBaseItemNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.CreateIndex(
 2214                name: "IX_UserData_UserId_IsFavorite_ItemId",
 2215                table: "UserData",
 2216                columns: new[] { "UserId", "IsFavorite", "ItemId" });
 17
 2218            migrationBuilder.CreateIndex(
 2219                name: "IX_UserData_UserId_Played_ItemId",
 2220                table: "UserData",
 2221                columns: new[] { "UserId", "Played", "ItemId" });
 22
 2223            migrationBuilder.CreateIndex(
 2224                name: "IX_BaseItems_Name",
 2225                table: "BaseItems",
 2226                column: "Name");
 2227        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_UserData_UserId_IsFavorite_ItemId",
 034                table: "UserData");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_UserData_UserId_Played_ItemId",
 038                table: "UserData");
 39
 040            migrationBuilder.DropIndex(
 041                name: "IX_BaseItems_Name",
 042                table: "BaseItems");
 043        }
 44    }
 45}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.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("20260130232147_AddBaseItemNameIndex")]
 15    partial class AddBaseItemNameIndex
 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("Name");
 22372
 22373                    b.HasIndex("OwnerId");
 22374
 22375                    b.HasIndex("ParentId");
 22376
 22377                    b.HasIndex("Path");
 22378
 22379                    b.HasIndex("PresentationUniqueKey");
 22380
 22381                    b.HasIndex("ExtraType", "OwnerId");
 22382
 22383                    b.HasIndex("TopParentId", "Id");
 22384
 22385                    b.HasIndex("Type", "TopParentId", "Id");
 22386
 22387                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22388
 22389                    b.HasIndex("Type", "TopParentId", "StartDate");
 22390
 22391                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22392
 22393                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22394
 22395                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22396
 22397                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22398
 22399                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22400
 22401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22402
 22403                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22404
 22405                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22406
 22407                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22408
 22409                    b.ToTable("BaseItems");
 22410
 22411                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22412
 22413                    b.HasData(
 22414                        new
 22415                        {
 22416                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22417                            IsFolder = false,
 22418                            IsInMixedFolder = false,
 22419                            IsLocked = false,
 22420                            IsMovie = false,
 22421                            IsRepeat = false,
 22422                            IsSeries = false,
 22423                            IsVirtualItem = false,
 22424                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22425                            Type = "PLACEHOLDER"
 22426                        });
 22427                });
 428
 22429            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22430                {
 22431                    b.Property<Guid>("Id")
 22432                        .ValueGeneratedOnAdd()
 22433                        .HasColumnType("TEXT");
 22434
 22435                    b.Property<byte[]>("Blurhash")
 22436                        .HasColumnType("BLOB");
 22437
 22438                    b.Property<DateTime?>("DateModified")
 22439                        .HasColumnType("TEXT");
 22440
 22441                    b.Property<int>("Height")
 22442                        .HasColumnType("INTEGER");
 22443
 22444                    b.Property<int>("ImageType")
 22445                        .HasColumnType("INTEGER");
 22446
 22447                    b.Property<Guid>("ItemId")
 22448                        .HasColumnType("TEXT");
 22449
 22450                    b.Property<string>("Path")
 22451                        .IsRequired()
 22452                        .HasColumnType("TEXT");
 22453
 22454                    b.Property<int>("Width")
 22455                        .HasColumnType("INTEGER");
 22456
 22457                    b.HasKey("Id");
 22458
 22459                    b.HasIndex("ItemId");
 22460
 22461                    b.HasIndex("ItemId", "ImageType");
 22462
 22463                    b.ToTable("BaseItemImageInfos");
 22464
 22465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22466                });
 467
 22468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22469                {
 22470                    b.Property<int>("Id")
 22471                        .HasColumnType("INTEGER");
 22472
 22473                    b.Property<Guid>("ItemId")
 22474                        .HasColumnType("TEXT");
 22475
 22476                    b.HasKey("Id", "ItemId");
 22477
 22478                    b.HasIndex("ItemId");
 22479
 22480                    b.ToTable("BaseItemMetadataFields");
 22481
 22482                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22483                });
 484
 22485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22486                {
 22487                    b.Property<Guid>("ItemId")
 22488                        .HasColumnType("TEXT");
 22489
 22490                    b.Property<string>("ProviderId")
 22491                        .HasColumnType("TEXT");
 22492
 22493                    b.Property<string>("ProviderValue")
 22494                        .IsRequired()
 22495                        .HasColumnType("TEXT");
 22496
 22497                    b.HasKey("ItemId", "ProviderId");
 22498
 22499                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22500
 22501                    b.ToTable("BaseItemProviders");
 22502
 22503                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22504                });
 505
 22506            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22507                {
 22508                    b.Property<int>("Id")
 22509                        .HasColumnType("INTEGER");
 22510
 22511                    b.Property<Guid>("ItemId")
 22512                        .HasColumnType("TEXT");
 22513
 22514                    b.HasKey("Id", "ItemId");
 22515
 22516                    b.HasIndex("ItemId");
 22517
 22518                    b.ToTable("BaseItemTrailerTypes");
 22519
 22520                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22521                });
 522
 22523            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22524                {
 22525                    b.Property<Guid>("ItemId")
 22526                        .HasColumnType("TEXT");
 22527
 22528                    b.Property<int>("ChapterIndex")
 22529                        .HasColumnType("INTEGER");
 22530
 22531                    b.Property<DateTime?>("ImageDateModified")
 22532                        .HasColumnType("TEXT");
 22533
 22534                    b.Property<string>("ImagePath")
 22535                        .HasColumnType("TEXT");
 22536
 22537                    b.Property<string>("Name")
 22538                        .HasColumnType("TEXT");
 22539
 22540                    b.Property<long>("StartPositionTicks")
 22541                        .HasColumnType("INTEGER");
 22542
 22543                    b.HasKey("ItemId", "ChapterIndex");
 22544
 22545                    b.ToTable("Chapters");
 22546
 22547                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22548                });
 549
 22550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22551                {
 22552                    b.Property<int>("Id")
 22553                        .ValueGeneratedOnAdd()
 22554                        .HasColumnType("INTEGER");
 22555
 22556                    b.Property<string>("Client")
 22557                        .IsRequired()
 22558                        .HasMaxLength(32)
 22559                        .HasColumnType("TEXT");
 22560
 22561                    b.Property<Guid>("ItemId")
 22562                        .HasColumnType("TEXT");
 22563
 22564                    b.Property<string>("Key")
 22565                        .IsRequired()
 22566                        .HasColumnType("TEXT");
 22567
 22568                    b.Property<Guid>("UserId")
 22569                        .HasColumnType("TEXT");
 22570
 22571                    b.Property<string>("Value")
 22572                        .HasColumnType("TEXT");
 22573
 22574                    b.HasKey("Id");
 22575
 22576                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22577                        .IsUnique();
 22578
 22579                    b.ToTable("CustomItemDisplayPreferences");
 22580
 22581                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22582                });
 583
 22584            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22585                {
 22586                    b.Property<int>("Id")
 22587                        .ValueGeneratedOnAdd()
 22588                        .HasColumnType("INTEGER");
 22589
 22590                    b.Property<int>("ChromecastVersion")
 22591                        .HasColumnType("INTEGER");
 22592
 22593                    b.Property<string>("Client")
 22594                        .IsRequired()
 22595                        .HasMaxLength(32)
 22596                        .HasColumnType("TEXT");
 22597
 22598                    b.Property<string>("DashboardTheme")
 22599                        .HasMaxLength(32)
 22600                        .HasColumnType("TEXT");
 22601
 22602                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22603                        .HasColumnType("INTEGER");
 22604
 22605                    b.Property<int?>("IndexBy")
 22606                        .HasColumnType("INTEGER");
 22607
 22608                    b.Property<Guid>("ItemId")
 22609                        .HasColumnType("TEXT");
 22610
 22611                    b.Property<int>("ScrollDirection")
 22612                        .HasColumnType("INTEGER");
 22613
 22614                    b.Property<bool>("ShowBackdrop")
 22615                        .HasColumnType("INTEGER");
 22616
 22617                    b.Property<bool>("ShowSidebar")
 22618                        .HasColumnType("INTEGER");
 22619
 22620                    b.Property<int>("SkipBackwardLength")
 22621                        .HasColumnType("INTEGER");
 22622
 22623                    b.Property<int>("SkipForwardLength")
 22624                        .HasColumnType("INTEGER");
 22625
 22626                    b.Property<string>("TvHome")
 22627                        .HasMaxLength(32)
 22628                        .HasColumnType("TEXT");
 22629
 22630                    b.Property<Guid>("UserId")
 22631                        .HasColumnType("TEXT");
 22632
 22633                    b.HasKey("Id");
 22634
 22635                    b.HasIndex("UserId", "ItemId", "Client")
 22636                        .IsUnique();
 22637
 22638                    b.ToTable("DisplayPreferences");
 22639
 22640                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22641                });
 642
 22643            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22644                {
 22645                    b.Property<int>("Id")
 22646                        .ValueGeneratedOnAdd()
 22647                        .HasColumnType("INTEGER");
 22648
 22649                    b.Property<int>("DisplayPreferencesId")
 22650                        .HasColumnType("INTEGER");
 22651
 22652                    b.Property<int>("Order")
 22653                        .HasColumnType("INTEGER");
 22654
 22655                    b.Property<int>("Type")
 22656                        .HasColumnType("INTEGER");
 22657
 22658                    b.HasKey("Id");
 22659
 22660                    b.HasIndex("DisplayPreferencesId");
 22661
 22662                    b.ToTable("HomeSection");
 22663
 22664                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22665                });
 666
 22667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22668                {
 22669                    b.Property<int>("Id")
 22670                        .ValueGeneratedOnAdd()
 22671                        .HasColumnType("INTEGER");
 22672
 22673                    b.Property<DateTime>("LastModified")
 22674                        .HasColumnType("TEXT");
 22675
 22676                    b.Property<string>("Path")
 22677                        .IsRequired()
 22678                        .HasMaxLength(512)
 22679                        .HasColumnType("TEXT");
 22680
 22681                    b.Property<Guid?>("UserId")
 22682                        .HasColumnType("TEXT");
 22683
 22684                    b.HasKey("Id");
 22685
 22686                    b.HasIndex("UserId")
 22687                        .IsUnique();
 22688
 22689                    b.ToTable("ImageInfos");
 22690
 22691                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22692                });
 693
 22694            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22695                {
 22696                    b.Property<int>("Id")
 22697                        .ValueGeneratedOnAdd()
 22698                        .HasColumnType("INTEGER");
 22699
 22700                    b.Property<string>("Client")
 22701                        .IsRequired()
 22702                        .HasMaxLength(32)
 22703                        .HasColumnType("TEXT");
 22704
 22705                    b.Property<int?>("IndexBy")
 22706                        .HasColumnType("INTEGER");
 22707
 22708                    b.Property<Guid>("ItemId")
 22709                        .HasColumnType("TEXT");
 22710
 22711                    b.Property<bool>("RememberIndexing")
 22712                        .HasColumnType("INTEGER");
 22713
 22714                    b.Property<bool>("RememberSorting")
 22715                        .HasColumnType("INTEGER");
 22716
 22717                    b.Property<string>("SortBy")
 22718                        .IsRequired()
 22719                        .HasMaxLength(64)
 22720                        .HasColumnType("TEXT");
 22721
 22722                    b.Property<int>("SortOrder")
 22723                        .HasColumnType("INTEGER");
 22724
 22725                    b.Property<Guid>("UserId")
 22726                        .HasColumnType("TEXT");
 22727
 22728                    b.Property<int>("ViewType")
 22729                        .HasColumnType("INTEGER");
 22730
 22731                    b.HasKey("Id");
 22732
 22733                    b.HasIndex("UserId");
 22734
 22735                    b.ToTable("ItemDisplayPreferences");
 22736
 22737                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22738                });
 739
 22740            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22741                {
 22742                    b.Property<Guid>("ItemValueId")
 22743                        .ValueGeneratedOnAdd()
 22744                        .HasColumnType("TEXT");
 22745
 22746                    b.Property<string>("CleanValue")
 22747                        .IsRequired()
 22748                        .HasColumnType("TEXT");
 22749
 22750                    b.Property<int>("Type")
 22751                        .HasColumnType("INTEGER");
 22752
 22753                    b.Property<string>("Value")
 22754                        .IsRequired()
 22755                        .HasColumnType("TEXT");
 22756
 22757                    b.HasKey("ItemValueId");
 22758
 22759                    b.HasIndex("Type", "CleanValue");
 22760
 22761                    b.HasIndex("Type", "Value")
 22762                        .IsUnique();
 22763
 22764                    b.ToTable("ItemValues");
 22765
 22766                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22767                });
 768
 22769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22770                {
 22771                    b.Property<Guid>("ItemValueId")
 22772                        .HasColumnType("TEXT");
 22773
 22774                    b.Property<Guid>("ItemId")
 22775                        .HasColumnType("TEXT");
 22776
 22777                    b.HasKey("ItemValueId", "ItemId");
 22778
 22779                    b.HasIndex("ItemId");
 22780
 22781                    b.ToTable("ItemValuesMap");
 22782
 22783                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22784                });
 785
 22786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22787                {
 22788                    b.Property<Guid>("ItemId")
 22789                        .HasColumnType("TEXT");
 22790
 22791                    b.PrimitiveCollection<string>("KeyframeTicks")
 22792                        .HasColumnType("TEXT");
 22793
 22794                    b.Property<long>("TotalDuration")
 22795                        .HasColumnType("INTEGER");
 22796
 22797                    b.HasKey("ItemId");
 22798
 22799                    b.ToTable("KeyframeData");
 22800
 22801                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22802                });
 803
 22804            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22805                {
 22806                    b.Property<Guid>("ParentId")
 22807                        .HasColumnType("TEXT");
 22808
 22809                    b.Property<Guid>("ChildId")
 22810                        .HasColumnType("TEXT");
 22811
 22812                    b.Property<int>("ChildType")
 22813                        .HasColumnType("INTEGER");
 22814
 22815                    b.Property<int?>("SortOrder")
 22816                        .HasColumnType("INTEGER");
 22817
 22818                    b.HasKey("ParentId", "ChildId");
 22819
 22820                    b.HasIndex("ChildId");
 22821
 22822                    b.HasIndex("ParentId");
 22823
 22824                    b.HasIndex("ChildId", "ChildType");
 22825
 22826                    b.HasIndex("ParentId", "ChildType");
 22827
 22828                    b.HasIndex("ParentId", "SortOrder");
 22829
 22830                    b.ToTable("LinkedChildren", (string)null);
 22831
 22832                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22833                });
 834
 22835            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22836                {
 22837                    b.Property<Guid>("Id")
 22838                        .ValueGeneratedOnAdd()
 22839                        .HasColumnType("TEXT");
 22840
 22841                    b.Property<long>("EndTicks")
 22842                        .HasColumnType("INTEGER");
 22843
 22844                    b.Property<Guid>("ItemId")
 22845                        .HasColumnType("TEXT");
 22846
 22847                    b.Property<string>("SegmentProviderId")
 22848                        .IsRequired()
 22849                        .HasColumnType("TEXT");
 22850
 22851                    b.Property<long>("StartTicks")
 22852                        .HasColumnType("INTEGER");
 22853
 22854                    b.Property<int>("Type")
 22855                        .HasColumnType("INTEGER");
 22856
 22857                    b.HasKey("Id");
 22858
 22859                    b.ToTable("MediaSegments");
 22860
 22861                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22862                });
 863
 22864            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22865                {
 22866                    b.Property<Guid>("ItemId")
 22867                        .HasColumnType("TEXT");
 22868
 22869                    b.Property<int>("StreamIndex")
 22870                        .HasColumnType("INTEGER");
 22871
 22872                    b.Property<string>("AspectRatio")
 22873                        .HasColumnType("TEXT");
 22874
 22875                    b.Property<float?>("AverageFrameRate")
 22876                        .HasColumnType("REAL");
 22877
 22878                    b.Property<int?>("BitDepth")
 22879                        .HasColumnType("INTEGER");
 22880
 22881                    b.Property<int?>("BitRate")
 22882                        .HasColumnType("INTEGER");
 22883
 22884                    b.Property<int?>("BlPresentFlag")
 22885                        .HasColumnType("INTEGER");
 22886
 22887                    b.Property<string>("ChannelLayout")
 22888                        .HasColumnType("TEXT");
 22889
 22890                    b.Property<int?>("Channels")
 22891                        .HasColumnType("INTEGER");
 22892
 22893                    b.Property<string>("Codec")
 22894                        .HasColumnType("TEXT");
 22895
 22896                    b.Property<string>("CodecTag")
 22897                        .HasColumnType("TEXT");
 22898
 22899                    b.Property<string>("CodecTimeBase")
 22900                        .HasColumnType("TEXT");
 22901
 22902                    b.Property<string>("ColorPrimaries")
 22903                        .HasColumnType("TEXT");
 22904
 22905                    b.Property<string>("ColorSpace")
 22906                        .HasColumnType("TEXT");
 22907
 22908                    b.Property<string>("ColorTransfer")
 22909                        .HasColumnType("TEXT");
 22910
 22911                    b.Property<string>("Comment")
 22912                        .HasColumnType("TEXT");
 22913
 22914                    b.Property<int?>("DvBlSignalCompatibilityId")
 22915                        .HasColumnType("INTEGER");
 22916
 22917                    b.Property<int?>("DvLevel")
 22918                        .HasColumnType("INTEGER");
 22919
 22920                    b.Property<int?>("DvProfile")
 22921                        .HasColumnType("INTEGER");
 22922
 22923                    b.Property<int?>("DvVersionMajor")
 22924                        .HasColumnType("INTEGER");
 22925
 22926                    b.Property<int?>("DvVersionMinor")
 22927                        .HasColumnType("INTEGER");
 22928
 22929                    b.Property<int?>("ElPresentFlag")
 22930                        .HasColumnType("INTEGER");
 22931
 22932                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22933                        .HasColumnType("INTEGER");
 22934
 22935                    b.Property<int?>("Height")
 22936                        .HasColumnType("INTEGER");
 22937
 22938                    b.Property<bool?>("IsAnamorphic")
 22939                        .HasColumnType("INTEGER");
 22940
 22941                    b.Property<bool?>("IsAvc")
 22942                        .HasColumnType("INTEGER");
 22943
 22944                    b.Property<bool>("IsDefault")
 22945                        .HasColumnType("INTEGER");
 22946
 22947                    b.Property<bool>("IsExternal")
 22948                        .HasColumnType("INTEGER");
 22949
 22950                    b.Property<bool>("IsForced")
 22951                        .HasColumnType("INTEGER");
 22952
 22953                    b.Property<bool?>("IsHearingImpaired")
 22954                        .HasColumnType("INTEGER");
 22955
 22956                    b.Property<bool?>("IsInterlaced")
 22957                        .HasColumnType("INTEGER");
 22958
 22959                    b.Property<string>("KeyFrames")
 22960                        .HasColumnType("TEXT");
 22961
 22962                    b.Property<string>("Language")
 22963                        .HasColumnType("TEXT");
 22964
 22965                    b.Property<float?>("Level")
 22966                        .HasColumnType("REAL");
 22967
 22968                    b.Property<string>("NalLengthSize")
 22969                        .HasColumnType("TEXT");
 22970
 22971                    b.Property<string>("Path")
 22972                        .HasColumnType("TEXT");
 22973
 22974                    b.Property<string>("PixelFormat")
 22975                        .HasColumnType("TEXT");
 22976
 22977                    b.Property<string>("Profile")
 22978                        .HasColumnType("TEXT");
 22979
 22980                    b.Property<float?>("RealFrameRate")
 22981                        .HasColumnType("REAL");
 22982
 22983                    b.Property<int?>("RefFrames")
 22984                        .HasColumnType("INTEGER");
 22985
 22986                    b.Property<int?>("Rotation")
 22987                        .HasColumnType("INTEGER");
 22988
 22989                    b.Property<int?>("RpuPresentFlag")
 22990                        .HasColumnType("INTEGER");
 22991
 22992                    b.Property<int?>("SampleRate")
 22993                        .HasColumnType("INTEGER");
 22994
 22995                    b.Property<int>("StreamType")
 22996                        .HasColumnType("INTEGER");
 22997
 22998                    b.Property<string>("TimeBase")
 22999                        .HasColumnType("TEXT");
 221000
 221001                    b.Property<string>("Title")
 221002                        .HasColumnType("TEXT");
 221003
 221004                    b.Property<int?>("Width")
 221005                        .HasColumnType("INTEGER");
 221006
 221007                    b.HasKey("ItemId", "StreamIndex");
 221008
 221009                    b.HasIndex("StreamIndex");
 221010
 221011                    b.HasIndex("StreamType");
 221012
 221013                    b.HasIndex("StreamIndex", "StreamType");
 221014
 221015                    b.HasIndex("StreamIndex", "StreamType", "Language");
 221016
 221017                    b.ToTable("MediaStreamInfos");
 221018
 221019                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221020                });
 1021
 221022            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221023                {
 221024                    b.Property<Guid>("Id")
 221025                        .ValueGeneratedOnAdd()
 221026                        .HasColumnType("TEXT");
 221027
 221028                    b.Property<string>("Name")
 221029                        .IsRequired()
 221030                        .HasColumnType("TEXT");
 221031
 221032                    b.Property<string>("PersonType")
 221033                        .HasColumnType("TEXT");
 221034
 221035                    b.HasKey("Id");
 221036
 221037                    b.HasIndex("Name");
 221038
 221039                    b.ToTable("Peoples");
 221040
 221041                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221042                });
 1043
 221044            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221045                {
 221046                    b.Property<Guid>("ItemId")
 221047                        .HasColumnType("TEXT");
 221048
 221049                    b.Property<Guid>("PeopleId")
 221050                        .HasColumnType("TEXT");
 221051
 221052                    b.Property<string>("Role")
 221053                        .HasColumnType("TEXT");
 221054
 221055                    b.Property<int?>("ListOrder")
 221056                        .HasColumnType("INTEGER");
 221057
 221058                    b.Property<int?>("SortOrder")
 221059                        .HasColumnType("INTEGER");
 221060
 221061                    b.HasKey("ItemId", "PeopleId", "Role");
 221062
 221063                    b.HasIndex("PeopleId");
 221064
 221065                    b.HasIndex("ItemId", "ListOrder");
 221066
 221067                    b.HasIndex("ItemId", "SortOrder");
 221068
 221069                    b.ToTable("PeopleBaseItemMap");
 221070
 221071                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221072                });
 1073
 221074            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221075                {
 221076                    b.Property<int>("Id")
 221077                        .ValueGeneratedOnAdd()
 221078                        .HasColumnType("INTEGER");
 221079
 221080                    b.Property<int>("Kind")
 221081                        .HasColumnType("INTEGER");
 221082
 221083                    b.Property<Guid?>("Permission_Permissions_Guid")
 221084                        .HasColumnType("TEXT");
 221085
 221086                    b.Property<uint>("RowVersion")
 221087                        .IsConcurrencyToken()
 221088                        .HasColumnType("INTEGER");
 221089
 221090                    b.Property<Guid?>("UserId")
 221091                        .HasColumnType("TEXT");
 221092
 221093                    b.Property<bool>("Value")
 221094                        .HasColumnType("INTEGER");
 221095
 221096                    b.HasKey("Id");
 221097
 221098                    b.HasIndex("UserId", "Kind")
 221099                        .IsUnique()
 221100                        .HasFilter("[UserId] IS NOT NULL");
 221101
 221102                    b.ToTable("Permissions");
 221103
 221104                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221105                });
 1106
 221107            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221108                {
 221109                    b.Property<int>("Id")
 221110                        .ValueGeneratedOnAdd()
 221111                        .HasColumnType("INTEGER");
 221112
 221113                    b.Property<int>("Kind")
 221114                        .HasColumnType("INTEGER");
 221115
 221116                    b.Property<Guid?>("Preference_Preferences_Guid")
 221117                        .HasColumnType("TEXT");
 221118
 221119                    b.Property<uint>("RowVersion")
 221120                        .IsConcurrencyToken()
 221121                        .HasColumnType("INTEGER");
 221122
 221123                    b.Property<Guid?>("UserId")
 221124                        .HasColumnType("TEXT");
 221125
 221126                    b.Property<string>("Value")
 221127                        .IsRequired()
 221128                        .HasMaxLength(65535)
 221129                        .HasColumnType("TEXT");
 221130
 221131                    b.HasKey("Id");
 221132
 221133                    b.HasIndex("UserId", "Kind")
 221134                        .IsUnique()
 221135                        .HasFilter("[UserId] IS NOT NULL");
 221136
 221137                    b.ToTable("Preferences");
 221138
 221139                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221140                });
 1141
 221142            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221143                {
 221144                    b.Property<int>("Id")
 221145                        .ValueGeneratedOnAdd()
 221146                        .HasColumnType("INTEGER");
 221147
 221148                    b.Property<string>("AccessToken")
 221149                        .IsRequired()
 221150                        .HasColumnType("TEXT");
 221151
 221152                    b.Property<DateTime>("DateCreated")
 221153                        .HasColumnType("TEXT");
 221154
 221155                    b.Property<DateTime>("DateLastActivity")
 221156                        .HasColumnType("TEXT");
 221157
 221158                    b.Property<string>("Name")
 221159                        .IsRequired()
 221160                        .HasMaxLength(64)
 221161                        .HasColumnType("TEXT");
 221162
 221163                    b.HasKey("Id");
 221164
 221165                    b.HasIndex("AccessToken")
 221166                        .IsUnique();
 221167
 221168                    b.ToTable("ApiKeys");
 221169
 221170                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221171                });
 1172
 221173            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221174                {
 221175                    b.Property<int>("Id")
 221176                        .ValueGeneratedOnAdd()
 221177                        .HasColumnType("INTEGER");
 221178
 221179                    b.Property<string>("AccessToken")
 221180                        .IsRequired()
 221181                        .HasColumnType("TEXT");
 221182
 221183                    b.Property<string>("AppName")
 221184                        .IsRequired()
 221185                        .HasMaxLength(64)
 221186                        .HasColumnType("TEXT");
 221187
 221188                    b.Property<string>("AppVersion")
 221189                        .IsRequired()
 221190                        .HasMaxLength(32)
 221191                        .HasColumnType("TEXT");
 221192
 221193                    b.Property<DateTime>("DateCreated")
 221194                        .HasColumnType("TEXT");
 221195
 221196                    b.Property<DateTime>("DateLastActivity")
 221197                        .HasColumnType("TEXT");
 221198
 221199                    b.Property<DateTime>("DateModified")
 221200                        .HasColumnType("TEXT");
 221201
 221202                    b.Property<string>("DeviceId")
 221203                        .IsRequired()
 221204                        .HasMaxLength(256)
 221205                        .HasColumnType("TEXT");
 221206
 221207                    b.Property<string>("DeviceName")
 221208                        .IsRequired()
 221209                        .HasMaxLength(64)
 221210                        .HasColumnType("TEXT");
 221211
 221212                    b.Property<bool>("IsActive")
 221213                        .HasColumnType("INTEGER");
 221214
 221215                    b.Property<Guid>("UserId")
 221216                        .HasColumnType("TEXT");
 221217
 221218                    b.HasKey("Id");
 221219
 221220                    b.HasIndex("DeviceId");
 221221
 221222                    b.HasIndex("AccessToken", "DateLastActivity");
 221223
 221224                    b.HasIndex("DeviceId", "DateLastActivity");
 221225
 221226                    b.HasIndex("UserId", "DeviceId");
 221227
 221228                    b.ToTable("Devices");
 221229
 221230                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221231                });
 1232
 221233            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221234                {
 221235                    b.Property<int>("Id")
 221236                        .ValueGeneratedOnAdd()
 221237                        .HasColumnType("INTEGER");
 221238
 221239                    b.Property<string>("CustomName")
 221240                        .HasColumnType("TEXT");
 221241
 221242                    b.Property<string>("DeviceId")
 221243                        .IsRequired()
 221244                        .HasColumnType("TEXT");
 221245
 221246                    b.HasKey("Id");
 221247
 221248                    b.HasIndex("DeviceId")
 221249                        .IsUnique();
 221250
 221251                    b.ToTable("DeviceOptions");
 221252
 221253                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221254                });
 1255
 221256            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221257                {
 221258                    b.Property<Guid>("ItemId")
 221259                        .HasColumnType("TEXT");
 221260
 221261                    b.Property<int>("Width")
 221262                        .HasColumnType("INTEGER");
 221263
 221264                    b.Property<int>("Bandwidth")
 221265                        .HasColumnType("INTEGER");
 221266
 221267                    b.Property<int>("Height")
 221268                        .HasColumnType("INTEGER");
 221269
 221270                    b.Property<int>("Interval")
 221271                        .HasColumnType("INTEGER");
 221272
 221273                    b.Property<int>("ThumbnailCount")
 221274                        .HasColumnType("INTEGER");
 221275
 221276                    b.Property<int>("TileHeight")
 221277                        .HasColumnType("INTEGER");
 221278
 221279                    b.Property<int>("TileWidth")
 221280                        .HasColumnType("INTEGER");
 221281
 221282                    b.HasKey("ItemId", "Width");
 221283
 221284                    b.ToTable("TrickplayInfos");
 221285
 221286                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221287                });
 1288
 221289            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221290                {
 221291                    b.Property<Guid>("Id")
 221292                        .ValueGeneratedOnAdd()
 221293                        .HasColumnType("TEXT");
 221294
 221295                    b.Property<string>("AudioLanguagePreference")
 221296                        .HasMaxLength(255)
 221297                        .HasColumnType("TEXT");
 221298
 221299                    b.Property<string>("AuthenticationProviderId")
 221300                        .IsRequired()
 221301                        .HasMaxLength(255)
 221302                        .HasColumnType("TEXT");
 221303
 221304                    b.Property<string>("CastReceiverId")
 221305                        .HasMaxLength(32)
 221306                        .HasColumnType("TEXT");
 221307
 221308                    b.Property<bool>("DisplayCollectionsView")
 221309                        .HasColumnType("INTEGER");
 221310
 221311                    b.Property<bool>("DisplayMissingEpisodes")
 221312                        .HasColumnType("INTEGER");
 221313
 221314                    b.Property<bool>("EnableAutoLogin")
 221315                        .HasColumnType("INTEGER");
 221316
 221317                    b.Property<bool>("EnableLocalPassword")
 221318                        .HasColumnType("INTEGER");
 221319
 221320                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221321                        .HasColumnType("INTEGER");
 221322
 221323                    b.Property<bool>("EnableUserPreferenceAccess")
 221324                        .HasColumnType("INTEGER");
 221325
 221326                    b.Property<bool>("HidePlayedInLatest")
 221327                        .HasColumnType("INTEGER");
 221328
 221329                    b.Property<long>("InternalId")
 221330                        .HasColumnType("INTEGER");
 221331
 221332                    b.Property<int>("InvalidLoginAttemptCount")
 221333                        .HasColumnType("INTEGER");
 221334
 221335                    b.Property<DateTime?>("LastActivityDate")
 221336                        .HasColumnType("TEXT");
 221337
 221338                    b.Property<DateTime?>("LastLoginDate")
 221339                        .HasColumnType("TEXT");
 221340
 221341                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221342                        .HasColumnType("INTEGER");
 221343
 221344                    b.Property<int>("MaxActiveSessions")
 221345                        .HasColumnType("INTEGER");
 221346
 221347                    b.Property<int?>("MaxParentalRatingScore")
 221348                        .HasColumnType("INTEGER");
 221349
 221350                    b.Property<int?>("MaxParentalRatingSubScore")
 221351                        .HasColumnType("INTEGER");
 221352
 221353                    b.Property<bool>("MustUpdatePassword")
 221354                        .HasColumnType("INTEGER");
 221355
 221356                    b.Property<string>("Password")
 221357                        .HasMaxLength(65535)
 221358                        .HasColumnType("TEXT");
 221359
 221360                    b.Property<string>("PasswordResetProviderId")
 221361                        .IsRequired()
 221362                        .HasMaxLength(255)
 221363                        .HasColumnType("TEXT");
 221364
 221365                    b.Property<bool>("PlayDefaultAudioTrack")
 221366                        .HasColumnType("INTEGER");
 221367
 221368                    b.Property<bool>("RememberAudioSelections")
 221369                        .HasColumnType("INTEGER");
 221370
 221371                    b.Property<bool>("RememberSubtitleSelections")
 221372                        .HasColumnType("INTEGER");
 221373
 221374                    b.Property<int?>("RemoteClientBitrateLimit")
 221375                        .HasColumnType("INTEGER");
 221376
 221377                    b.Property<uint>("RowVersion")
 221378                        .IsConcurrencyToken()
 221379                        .HasColumnType("INTEGER");
 221380
 221381                    b.Property<string>("SubtitleLanguagePreference")
 221382                        .HasMaxLength(255)
 221383                        .HasColumnType("TEXT");
 221384
 221385                    b.Property<int>("SubtitleMode")
 221386                        .HasColumnType("INTEGER");
 221387
 221388                    b.Property<int>("SyncPlayAccess")
 221389                        .HasColumnType("INTEGER");
 221390
 221391                    b.Property<string>("Username")
 221392                        .IsRequired()
 221393                        .HasMaxLength(255)
 221394                        .HasColumnType("TEXT");
 221395
 221396                    b.HasKey("Id");
 221397
 221398                    b.HasIndex("Username")
 221399                        .IsUnique();
 221400
 221401                    b.ToTable("Users");
 221402
 221403                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221404                });
 1405
 221406            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221407                {
 221408                    b.Property<Guid>("ItemId")
 221409                        .HasColumnType("TEXT");
 221410
 221411                    b.Property<Guid>("UserId")
 221412                        .HasColumnType("TEXT");
 221413
 221414                    b.Property<string>("CustomDataKey")
 221415                        .HasColumnType("TEXT");
 221416
 221417                    b.Property<int?>("AudioStreamIndex")
 221418                        .HasColumnType("INTEGER");
 221419
 221420                    b.Property<bool>("IsFavorite")
 221421                        .HasColumnType("INTEGER");
 221422
 221423                    b.Property<DateTime?>("LastPlayedDate")
 221424                        .HasColumnType("TEXT");
 221425
 221426                    b.Property<bool?>("Likes")
 221427                        .HasColumnType("INTEGER");
 221428
 221429                    b.Property<int>("PlayCount")
 221430                        .HasColumnType("INTEGER");
 221431
 221432                    b.Property<long>("PlaybackPositionTicks")
 221433                        .HasColumnType("INTEGER");
 221434
 221435                    b.Property<bool>("Played")
 221436                        .HasColumnType("INTEGER");
 221437
 221438                    b.Property<double?>("Rating")
 221439                        .HasColumnType("REAL");
 221440
 221441                    b.Property<DateTime?>("RetentionDate")
 221442                        .HasColumnType("TEXT");
 221443
 221444                    b.Property<int?>("SubtitleStreamIndex")
 221445                        .HasColumnType("INTEGER");
 221446
 221447                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221448
 221449                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221450
 221451                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221452
 221453                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221454
 221455                    b.HasIndex("ItemId", "UserId", "Played");
 221456
 221457                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 221458
 221459                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 221460
 221461                    b.HasIndex("UserId", "Played", "ItemId");
 221462
 221463                    b.ToTable("UserData");
 221464
 221465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221466                });
 1467
 221468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221469                {
 221470                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221471                        .WithMany("AccessSchedules")
 221472                        .HasForeignKey("UserId")
 221473                        .OnDelete(DeleteBehavior.Cascade)
 221474                        .IsRequired();
 221475                });
 1476
 221477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221478                {
 221479                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221480                        .WithMany("Parents")
 221481                        .HasForeignKey("ItemId")
 221482                        .OnDelete(DeleteBehavior.Cascade)
 221483                        .IsRequired();
 221484
 221485                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221486                        .WithMany("Children")
 221487                        .HasForeignKey("ParentItemId")
 221488                        .OnDelete(DeleteBehavior.Cascade)
 221489                        .IsRequired();
 221490
 221491                    b.Navigation("Item");
 221492
 221493                    b.Navigation("ParentItem");
 221494                });
 1495
 221496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221497                {
 221498                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221499                        .WithMany()
 221500                        .HasForeignKey("ItemId")
 221501                        .OnDelete(DeleteBehavior.Cascade)
 221502                        .IsRequired();
 221503
 221504                    b.Navigation("Item");
 221505                });
 1506
 221507            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221508                {
 221509                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221510                        .WithMany("Extras")
 221511                        .HasForeignKey("OwnerId")
 221512                        .OnDelete(DeleteBehavior.NoAction);
 221513
 221514                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221515                        .WithMany("DirectChildren")
 221516                        .HasForeignKey("ParentId")
 221517                        .OnDelete(DeleteBehavior.Cascade);
 221518
 221519                    b.Navigation("DirectParent");
 221520
 221521                    b.Navigation("Owner");
 221522                });
 1523
 221524            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221525                {
 221526                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221527                        .WithMany("Images")
 221528                        .HasForeignKey("ItemId")
 221529                        .OnDelete(DeleteBehavior.Cascade)
 221530                        .IsRequired();
 221531
 221532                    b.Navigation("Item");
 221533                });
 1534
 221535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221536                {
 221537                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221538                        .WithMany("LockedFields")
 221539                        .HasForeignKey("ItemId")
 221540                        .OnDelete(DeleteBehavior.Cascade)
 221541                        .IsRequired();
 221542
 221543                    b.Navigation("Item");
 221544                });
 1545
 221546            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221547                {
 221548                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221549                        .WithMany("Provider")
 221550                        .HasForeignKey("ItemId")
 221551                        .OnDelete(DeleteBehavior.Cascade)
 221552                        .IsRequired();
 221553
 221554                    b.Navigation("Item");
 221555                });
 1556
 221557            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221558                {
 221559                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221560                        .WithMany("TrailerTypes")
 221561                        .HasForeignKey("ItemId")
 221562                        .OnDelete(DeleteBehavior.Cascade)
 221563                        .IsRequired();
 221564
 221565                    b.Navigation("Item");
 221566                });
 1567
 221568            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221569                {
 221570                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221571                        .WithMany("Chapters")
 221572                        .HasForeignKey("ItemId")
 221573                        .OnDelete(DeleteBehavior.Cascade)
 221574                        .IsRequired();
 221575
 221576                    b.Navigation("Item");
 221577                });
 1578
 221579            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221580                {
 221581                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221582                        .WithMany("DisplayPreferences")
 221583                        .HasForeignKey("UserId")
 221584                        .OnDelete(DeleteBehavior.Cascade)
 221585                        .IsRequired();
 221586                });
 1587
 221588            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221589                {
 221590                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221591                        .WithMany("HomeSections")
 221592                        .HasForeignKey("DisplayPreferencesId")
 221593                        .OnDelete(DeleteBehavior.Cascade)
 221594                        .IsRequired();
 221595                });
 1596
 221597            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221598                {
 221599                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221600                        .WithOne("ProfileImage")
 221601                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221602                        .OnDelete(DeleteBehavior.Cascade);
 221603                });
 1604
 221605            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221606                {
 221607                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221608                        .WithMany("ItemDisplayPreferences")
 221609                        .HasForeignKey("UserId")
 221610                        .OnDelete(DeleteBehavior.Cascade)
 221611                        .IsRequired();
 221612                });
 1613
 221614            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221615                {
 221616                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221617                        .WithMany("ItemValues")
 221618                        .HasForeignKey("ItemId")
 221619                        .OnDelete(DeleteBehavior.Cascade)
 221620                        .IsRequired();
 221621
 221622                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221623                        .WithMany("BaseItemsMap")
 221624                        .HasForeignKey("ItemValueId")
 221625                        .OnDelete(DeleteBehavior.Cascade)
 221626                        .IsRequired();
 221627
 221628                    b.Navigation("Item");
 221629
 221630                    b.Navigation("ItemValue");
 221631                });
 1632
 221633            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221634                {
 221635                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221636                        .WithMany()
 221637                        .HasForeignKey("ItemId")
 221638                        .OnDelete(DeleteBehavior.Cascade)
 221639                        .IsRequired();
 221640
 221641                    b.Navigation("Item");
 221642                });
 1643
 221644            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221645                {
 221646                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221647                        .WithMany("LinkedChildOfEntities")
 221648                        .HasForeignKey("ChildId")
 221649                        .OnDelete(DeleteBehavior.NoAction)
 221650                        .IsRequired();
 221651
 221652                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221653                        .WithMany("LinkedChildEntities")
 221654                        .HasForeignKey("ParentId")
 221655                        .OnDelete(DeleteBehavior.NoAction)
 221656                        .IsRequired();
 221657
 221658                    b.Navigation("Child");
 221659
 221660                    b.Navigation("Parent");
 221661                });
 1662
 221663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221664                {
 221665                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221666                        .WithMany("MediaStreams")
 221667                        .HasForeignKey("ItemId")
 221668                        .OnDelete(DeleteBehavior.Cascade)
 221669                        .IsRequired();
 221670
 221671                    b.Navigation("Item");
 221672                });
 1673
 221674            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221675                {
 221676                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221677                        .WithMany("Peoples")
 221678                        .HasForeignKey("ItemId")
 221679                        .OnDelete(DeleteBehavior.Cascade)
 221680                        .IsRequired();
 221681
 221682                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221683                        .WithMany("BaseItems")
 221684                        .HasForeignKey("PeopleId")
 221685                        .OnDelete(DeleteBehavior.Cascade)
 221686                        .IsRequired();
 221687
 221688                    b.Navigation("Item");
 221689
 221690                    b.Navigation("People");
 221691                });
 1692
 221693            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221694                {
 221695                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221696                        .WithMany("Permissions")
 221697                        .HasForeignKey("UserId")
 221698                        .OnDelete(DeleteBehavior.Cascade);
 221699                });
 1700
 221701            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221702                {
 221703                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221704                        .WithMany("Preferences")
 221705                        .HasForeignKey("UserId")
 221706                        .OnDelete(DeleteBehavior.Cascade);
 221707                });
 1708
 221709            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221710                {
 221711                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221712                        .WithMany()
 221713                        .HasForeignKey("UserId")
 221714                        .OnDelete(DeleteBehavior.Cascade)
 221715                        .IsRequired();
 221716
 221717                    b.Navigation("User");
 221718                });
 1719
 221720            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221721                {
 221722                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221723                        .WithMany("UserData")
 221724                        .HasForeignKey("ItemId")
 221725                        .OnDelete(DeleteBehavior.Cascade)
 221726                        .IsRequired();
 221727
 221728                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221729                        .WithMany()
 221730                        .HasForeignKey("UserId")
 221731                        .OnDelete(DeleteBehavior.Cascade)
 221732                        .IsRequired();
 221733
 221734                    b.Navigation("Item");
 221735
 221736                    b.Navigation("User");
 221737                });
 1738
 221739            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221740                {
 221741                    b.Navigation("Chapters");
 221742
 221743                    b.Navigation("Children");
 221744
 221745                    b.Navigation("DirectChildren");
 221746
 221747                    b.Navigation("Extras");
 221748
 221749                    b.Navigation("Images");
 221750
 221751                    b.Navigation("ItemValues");
 221752
 221753                    b.Navigation("LinkedChildEntities");
 221754
 221755                    b.Navigation("LinkedChildOfEntities");
 221756
 221757                    b.Navigation("LockedFields");
 221758
 221759                    b.Navigation("MediaStreams");
 221760
 221761                    b.Navigation("Parents");
 221762
 221763                    b.Navigation("Peoples");
 221764
 221765                    b.Navigation("Provider");
 221766
 221767                    b.Navigation("TrailerTypes");
 221768
 221769                    b.Navigation("UserData");
 221770                });
 1771
 221772            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221773                {
 221774                    b.Navigation("HomeSections");
 221775                });
 1776
 221777            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221778                {
 221779                    b.Navigation("BaseItemsMap");
 221780                });
 1781
 221782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221783                {
 221784                    b.Navigation("BaseItems");
 221785                });
 1786
 221787            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221788                {
 221789                    b.Navigation("AccessSchedules");
 221790
 221791                    b.Navigation("DisplayPreferences");
 221792
 221793                    b.Navigation("ItemDisplayPreferences");
 221794
 221795                    b.Navigation("Permissions");
 221796
 221797                    b.Navigation("Preferences");
 221798
 221799                    b.Navigation("ProfileImage");
 221800                });
 1801#pragma warning restore 612, 618
 221802        }
 1803    }
 1804}