< Summary - Jellyfin

Line coverage
99%
Covered lines: 1947
Uncovered lines: 2
Coverable lines: 1949
Total lines: 2060
Line coverage: 99.8%
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 8/6/2026 - 12:17:15 AM Line coverage: 99.8% (1947/1949) Total lines: 2060

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/20260728170000_AddPeopleNameLowerIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddPeopleNameLowerIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 13            // Expression index, so it cannot be declared on the entity type. /Persons collapses the
 14            // one-row-per-(Name, PersonType) table to one row per lowercased name; without this index
 15            // that dedup scans and groups the whole table on every request.
 2216            migrationBuilder.Sql("CREATE INDEX IF NOT EXISTS \"IX_Peoples_NameLower\" ON \"Peoples\" (lower(\"Name\"));"
 2217        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.Sql("DROP INDEX IF EXISTS \"IX_Peoples_NameLower\";");
 023        }
 24    }
 25}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260728170000_AddPeopleNameLowerIndex.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.Server.Implementations.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260728170000_AddPeopleNameLowerIndex")]
 15    partial class AddPeopleNameLowerIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "10.0.10");
 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<Guid?>("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("Name");
 22370
 22371                    b.HasIndex("OwnerId");
 22372
 22373                    b.HasIndex("ParentId");
 22374
 22375                    b.HasIndex("Path");
 22376
 22377                    b.HasIndex("PresentationUniqueKey");
 22378
 22379                    b.HasIndex("PrimaryVersionId")
 22380                        .HasFilter("\"PrimaryVersionId\" IS NOT NULL");
 22381
 22382                    b.HasIndex("SeasonId");
 22383
 22384                    b.HasIndex("SeriesId");
 22385
 22386                    b.HasIndex("SeriesName");
 22387
 22388                    b.HasIndex("ExtraType", "OwnerId");
 22389
 22390                    b.HasIndex("TopParentId", "Id");
 22391
 22392                    b.HasIndex("Type", "CleanName");
 22393
 22394                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 22395                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 22396
 22397                    b.HasIndex("Type", "TopParentId", "Id");
 22398
 22399                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22400
 22401                    b.HasIndex("Type", "TopParentId", "SortName");
 22402
 22403                    b.HasIndex("Type", "TopParentId", "StartDate");
 22404
 22405                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22406
 22407                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22408
 22409                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22410
 22411                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22412
 22413                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22414
 22415                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 22416
 22417                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22418
 22419                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22420
 22421                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22422
 22423                    b.ToTable("BaseItems");
 22424
 22425                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22426
 22427                    b.HasData(
 22428                        new
 22429                        {
 22430                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22431                            IsFolder = false,
 22432                            IsInMixedFolder = false,
 22433                            IsLocked = false,
 22434                            IsMovie = false,
 22435                            IsRepeat = false,
 22436                            IsSeries = false,
 22437                            IsVirtualItem = false,
 22438                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22439                            Type = "PLACEHOLDER"
 22440                        });
 22441                });
 442
 22443            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22444                {
 22445                    b.Property<Guid>("Id")
 22446                        .ValueGeneratedOnAdd()
 22447                        .HasColumnType("TEXT");
 22448
 22449                    b.Property<byte[]>("Blurhash")
 22450                        .HasColumnType("BLOB");
 22451
 22452                    b.Property<DateTime?>("DateModified")
 22453                        .HasColumnType("TEXT");
 22454
 22455                    b.Property<int>("Height")
 22456                        .HasColumnType("INTEGER");
 22457
 22458                    b.Property<int>("ImageType")
 22459                        .HasColumnType("INTEGER");
 22460
 22461                    b.Property<Guid>("ItemId")
 22462                        .HasColumnType("TEXT");
 22463
 22464                    b.Property<string>("Path")
 22465                        .IsRequired()
 22466                        .HasColumnType("TEXT");
 22467
 22468                    b.Property<int>("Width")
 22469                        .HasColumnType("INTEGER");
 22470
 22471                    b.HasKey("Id");
 22472
 22473                    b.HasIndex("ItemId", "ImageType");
 22474
 22475                    b.ToTable("BaseItemImageInfos");
 22476
 22477                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22478                });
 479
 22480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22481                {
 22482                    b.Property<int>("Id")
 22483                        .HasColumnType("INTEGER");
 22484
 22485                    b.Property<Guid>("ItemId")
 22486                        .HasColumnType("TEXT");
 22487
 22488                    b.HasKey("Id", "ItemId");
 22489
 22490                    b.HasIndex("ItemId");
 22491
 22492                    b.ToTable("BaseItemMetadataFields");
 22493
 22494                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22495                });
 496
 22497            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22498                {
 22499                    b.Property<Guid>("ItemId")
 22500                        .HasColumnType("TEXT");
 22501
 22502                    b.Property<string>("ProviderId")
 22503                        .HasColumnType("TEXT");
 22504
 22505                    b.Property<string>("ProviderValue")
 22506                        .IsRequired()
 22507                        .HasColumnType("TEXT");
 22508
 22509                    b.HasKey("ItemId", "ProviderId");
 22510
 22511                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 22512
 22513                    b.ToTable("BaseItemProviders");
 22514
 22515                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22516                });
 517
 22518            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22519                {
 22520                    b.Property<int>("Id")
 22521                        .HasColumnType("INTEGER");
 22522
 22523                    b.Property<Guid>("ItemId")
 22524                        .HasColumnType("TEXT");
 22525
 22526                    b.HasKey("Id", "ItemId");
 22527
 22528                    b.HasIndex("ItemId");
 22529
 22530                    b.ToTable("BaseItemTrailerTypes");
 22531
 22532                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22533                });
 534
 22535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22536                {
 22537                    b.Property<Guid>("ItemId")
 22538                        .HasColumnType("TEXT");
 22539
 22540                    b.Property<int>("ChapterIndex")
 22541                        .HasColumnType("INTEGER");
 22542
 22543                    b.Property<DateTime?>("ImageDateModified")
 22544                        .HasColumnType("TEXT");
 22545
 22546                    b.Property<string>("ImagePath")
 22547                        .HasColumnType("TEXT");
 22548
 22549                    b.Property<string>("Name")
 22550                        .HasColumnType("TEXT");
 22551
 22552                    b.Property<long>("StartPositionTicks")
 22553                        .HasColumnType("INTEGER");
 22554
 22555                    b.HasKey("ItemId", "ChapterIndex");
 22556
 22557                    b.ToTable("Chapters");
 22558
 22559                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22560                });
 561
 22562            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22563                {
 22564                    b.Property<int>("Id")
 22565                        .ValueGeneratedOnAdd()
 22566                        .HasColumnType("INTEGER");
 22567
 22568                    b.Property<string>("Client")
 22569                        .IsRequired()
 22570                        .HasMaxLength(32)
 22571                        .HasColumnType("TEXT");
 22572
 22573                    b.Property<Guid>("ItemId")
 22574                        .HasColumnType("TEXT");
 22575
 22576                    b.Property<string>("Key")
 22577                        .IsRequired()
 22578                        .HasColumnType("TEXT");
 22579
 22580                    b.Property<Guid>("UserId")
 22581                        .HasColumnType("TEXT");
 22582
 22583                    b.Property<string>("Value")
 22584                        .HasColumnType("TEXT");
 22585
 22586                    b.HasKey("Id");
 22587
 22588                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22589                        .IsUnique();
 22590
 22591                    b.ToTable("CustomItemDisplayPreferences");
 22592
 22593                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22594                });
 595
 22596            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22597                {
 22598                    b.Property<int>("Id")
 22599                        .ValueGeneratedOnAdd()
 22600                        .HasColumnType("INTEGER");
 22601
 22602                    b.Property<int>("ChromecastVersion")
 22603                        .HasColumnType("INTEGER");
 22604
 22605                    b.Property<string>("Client")
 22606                        .IsRequired()
 22607                        .HasMaxLength(32)
 22608                        .HasColumnType("TEXT");
 22609
 22610                    b.Property<string>("DashboardTheme")
 22611                        .HasMaxLength(32)
 22612                        .HasColumnType("TEXT");
 22613
 22614                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22615                        .HasColumnType("INTEGER");
 22616
 22617                    b.Property<int?>("IndexBy")
 22618                        .HasColumnType("INTEGER");
 22619
 22620                    b.Property<Guid>("ItemId")
 22621                        .HasColumnType("TEXT");
 22622
 22623                    b.Property<int>("ScrollDirection")
 22624                        .HasColumnType("INTEGER");
 22625
 22626                    b.Property<bool>("ShowBackdrop")
 22627                        .HasColumnType("INTEGER");
 22628
 22629                    b.Property<bool>("ShowSidebar")
 22630                        .HasColumnType("INTEGER");
 22631
 22632                    b.Property<int>("SkipBackwardLength")
 22633                        .HasColumnType("INTEGER");
 22634
 22635                    b.Property<int>("SkipForwardLength")
 22636                        .HasColumnType("INTEGER");
 22637
 22638                    b.Property<string>("TvHome")
 22639                        .HasMaxLength(32)
 22640                        .HasColumnType("TEXT");
 22641
 22642                    b.Property<Guid>("UserId")
 22643                        .HasColumnType("TEXT");
 22644
 22645                    b.HasKey("Id");
 22646
 22647                    b.HasIndex("UserId", "ItemId", "Client")
 22648                        .IsUnique();
 22649
 22650                    b.ToTable("DisplayPreferences");
 22651
 22652                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22653                });
 654
 22655            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22656                {
 22657                    b.Property<int>("Id")
 22658                        .ValueGeneratedOnAdd()
 22659                        .HasColumnType("INTEGER");
 22660
 22661                    b.Property<int>("DisplayPreferencesId")
 22662                        .HasColumnType("INTEGER");
 22663
 22664                    b.Property<int>("Order")
 22665                        .HasColumnType("INTEGER");
 22666
 22667                    b.Property<int>("Type")
 22668                        .HasColumnType("INTEGER");
 22669
 22670                    b.HasKey("Id");
 22671
 22672                    b.HasIndex("DisplayPreferencesId");
 22673
 22674                    b.ToTable("HomeSection");
 22675
 22676                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22677                });
 678
 22679            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22680                {
 22681                    b.Property<int>("Id")
 22682                        .ValueGeneratedOnAdd()
 22683                        .HasColumnType("INTEGER");
 22684
 22685                    b.Property<DateTime>("LastModified")
 22686                        .HasColumnType("TEXT");
 22687
 22688                    b.Property<string>("Path")
 22689                        .IsRequired()
 22690                        .HasMaxLength(512)
 22691                        .HasColumnType("TEXT");
 22692
 22693                    b.Property<Guid?>("UserId")
 22694                        .HasColumnType("TEXT");
 22695
 22696                    b.HasKey("Id");
 22697
 22698                    b.HasIndex("UserId")
 22699                        .IsUnique();
 22700
 22701                    b.ToTable("ImageInfos");
 22702
 22703                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22704                });
 705
 22706            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22707                {
 22708                    b.Property<int>("Id")
 22709                        .ValueGeneratedOnAdd()
 22710                        .HasColumnType("INTEGER");
 22711
 22712                    b.Property<string>("Client")
 22713                        .IsRequired()
 22714                        .HasMaxLength(32)
 22715                        .HasColumnType("TEXT");
 22716
 22717                    b.Property<int?>("IndexBy")
 22718                        .HasColumnType("INTEGER");
 22719
 22720                    b.Property<Guid>("ItemId")
 22721                        .HasColumnType("TEXT");
 22722
 22723                    b.Property<bool>("RememberIndexing")
 22724                        .HasColumnType("INTEGER");
 22725
 22726                    b.Property<bool>("RememberSorting")
 22727                        .HasColumnType("INTEGER");
 22728
 22729                    b.Property<string>("SortBy")
 22730                        .IsRequired()
 22731                        .HasMaxLength(64)
 22732                        .HasColumnType("TEXT");
 22733
 22734                    b.Property<int>("SortOrder")
 22735                        .HasColumnType("INTEGER");
 22736
 22737                    b.Property<Guid>("UserId")
 22738                        .HasColumnType("TEXT");
 22739
 22740                    b.Property<int>("ViewType")
 22741                        .HasColumnType("INTEGER");
 22742
 22743                    b.HasKey("Id");
 22744
 22745                    b.HasIndex("UserId");
 22746
 22747                    b.ToTable("ItemDisplayPreferences");
 22748
 22749                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22750                });
 751
 22752            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22753                {
 22754                    b.Property<Guid>("ItemValueId")
 22755                        .ValueGeneratedOnAdd()
 22756                        .HasColumnType("TEXT");
 22757
 22758                    b.Property<string>("CleanValue")
 22759                        .IsRequired()
 22760                        .HasColumnType("TEXT");
 22761
 22762                    b.Property<int>("Type")
 22763                        .HasColumnType("INTEGER");
 22764
 22765                    b.Property<string>("Value")
 22766                        .IsRequired()
 22767                        .HasColumnType("TEXT");
 22768
 22769                    b.HasKey("ItemValueId");
 22770
 22771                    b.HasIndex("Type", "CleanValue");
 22772
 22773                    b.HasIndex("Type", "Value")
 22774                        .IsUnique();
 22775
 22776                    b.ToTable("ItemValues");
 22777
 22778                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22779                });
 780
 22781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22782                {
 22783                    b.Property<Guid>("ItemValueId")
 22784                        .HasColumnType("TEXT");
 22785
 22786                    b.Property<Guid>("ItemId")
 22787                        .HasColumnType("TEXT");
 22788
 22789                    b.HasKey("ItemValueId", "ItemId");
 22790
 22791                    b.HasIndex("ItemId");
 22792
 22793                    b.ToTable("ItemValuesMap");
 22794
 22795                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22796                });
 797
 22798            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22799                {
 22800                    b.Property<Guid>("ItemId")
 22801                        .HasColumnType("TEXT");
 22802
 22803                    b.PrimitiveCollection<string>("KeyframeTicks")
 22804                        .HasColumnType("TEXT");
 22805
 22806                    b.Property<long>("TotalDuration")
 22807                        .HasColumnType("INTEGER");
 22808
 22809                    b.HasKey("ItemId");
 22810
 22811                    b.ToTable("KeyframeData");
 22812
 22813                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22814                });
 815
 22816            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22817                {
 22818                    b.Property<Guid>("ParentId")
 22819                        .HasColumnType("TEXT");
 22820
 22821                    b.Property<Guid>("ChildId")
 22822                        .HasColumnType("TEXT");
 22823
 22824                    b.Property<int>("ChildType")
 22825                        .HasColumnType("INTEGER");
 22826
 22827                    b.Property<int?>("SortOrder")
 22828                        .HasColumnType("INTEGER");
 22829
 22830                    b.HasKey("ParentId", "ChildId");
 22831
 22832                    b.HasIndex("ChildId", "ChildType");
 22833
 22834                    b.HasIndex("ParentId", "ChildType");
 22835
 22836                    b.HasIndex("ParentId", "SortOrder");
 22837
 22838                    b.ToTable("LinkedChildren", (string)null);
 22839
 22840                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22841                });
 842
 22843            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22844                {
 22845                    b.Property<Guid>("Id")
 22846                        .ValueGeneratedOnAdd()
 22847                        .HasColumnType("TEXT");
 22848
 22849                    b.Property<long>("EndTicks")
 22850                        .HasColumnType("INTEGER");
 22851
 22852                    b.Property<Guid>("ItemId")
 22853                        .HasColumnType("TEXT");
 22854
 22855                    b.Property<string>("SegmentProviderId")
 22856                        .IsRequired()
 22857                        .HasColumnType("TEXT");
 22858
 22859                    b.Property<long>("StartTicks")
 22860                        .HasColumnType("INTEGER");
 22861
 22862                    b.Property<int>("Type")
 22863                        .HasColumnType("INTEGER");
 22864
 22865                    b.HasKey("Id");
 22866
 22867                    b.ToTable("MediaSegments");
 22868
 22869                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22870                });
 871
 22872            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22873                {
 22874                    b.Property<Guid>("ItemId")
 22875                        .HasColumnType("TEXT");
 22876
 22877                    b.Property<int>("StreamIndex")
 22878                        .HasColumnType("INTEGER");
 22879
 22880                    b.Property<string>("AspectRatio")
 22881                        .HasColumnType("TEXT");
 22882
 22883                    b.Property<float?>("AverageFrameRate")
 22884                        .HasColumnType("REAL");
 22885
 22886                    b.Property<int?>("BitDepth")
 22887                        .HasColumnType("INTEGER");
 22888
 22889                    b.Property<int?>("BitRate")
 22890                        .HasColumnType("INTEGER");
 22891
 22892                    b.Property<int?>("BlPresentFlag")
 22893                        .HasColumnType("INTEGER");
 22894
 22895                    b.Property<string>("ChannelLayout")
 22896                        .HasColumnType("TEXT");
 22897
 22898                    b.Property<int?>("Channels")
 22899                        .HasColumnType("INTEGER");
 22900
 22901                    b.Property<string>("Codec")
 22902                        .HasColumnType("TEXT");
 22903
 22904                    b.Property<string>("CodecTag")
 22905                        .HasColumnType("TEXT");
 22906
 22907                    b.Property<string>("CodecTimeBase")
 22908                        .HasColumnType("TEXT");
 22909
 22910                    b.Property<string>("ColorPrimaries")
 22911                        .HasColumnType("TEXT");
 22912
 22913                    b.Property<string>("ColorSpace")
 22914                        .HasColumnType("TEXT");
 22915
 22916                    b.Property<string>("ColorTransfer")
 22917                        .HasColumnType("TEXT");
 22918
 22919                    b.Property<string>("Comment")
 22920                        .HasColumnType("TEXT");
 22921
 22922                    b.Property<int?>("DvBlSignalCompatibilityId")
 22923                        .HasColumnType("INTEGER");
 22924
 22925                    b.Property<int?>("DvLevel")
 22926                        .HasColumnType("INTEGER");
 22927
 22928                    b.Property<int?>("DvProfile")
 22929                        .HasColumnType("INTEGER");
 22930
 22931                    b.Property<int?>("DvVersionMajor")
 22932                        .HasColumnType("INTEGER");
 22933
 22934                    b.Property<int?>("DvVersionMinor")
 22935                        .HasColumnType("INTEGER");
 22936
 22937                    b.Property<int?>("ElPresentFlag")
 22938                        .HasColumnType("INTEGER");
 22939
 22940                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22941                        .HasColumnType("INTEGER");
 22942
 22943                    b.Property<int?>("Height")
 22944                        .HasColumnType("INTEGER");
 22945
 22946                    b.Property<bool?>("IsAnamorphic")
 22947                        .HasColumnType("INTEGER");
 22948
 22949                    b.Property<bool?>("IsAvc")
 22950                        .HasColumnType("INTEGER");
 22951
 22952                    b.Property<bool>("IsDefault")
 22953                        .HasColumnType("INTEGER");
 22954
 22955                    b.Property<bool>("IsExternal")
 22956                        .HasColumnType("INTEGER");
 22957
 22958                    b.Property<bool>("IsForced")
 22959                        .HasColumnType("INTEGER");
 22960
 22961                    b.Property<bool?>("IsHearingImpaired")
 22962                        .HasColumnType("INTEGER");
 22963
 22964                    b.Property<bool?>("IsInterlaced")
 22965                        .HasColumnType("INTEGER");
 22966
 22967                    b.Property<bool>("IsOriginal")
 22968                        .HasColumnType("INTEGER");
 22969
 22970                    b.Property<string>("KeyFrames")
 22971                        .HasColumnType("TEXT");
 22972
 22973                    b.Property<string>("Language")
 22974                        .HasColumnType("TEXT");
 22975
 22976                    b.Property<float?>("Level")
 22977                        .HasColumnType("REAL");
 22978
 22979                    b.Property<string>("NalLengthSize")
 22980                        .HasColumnType("TEXT");
 22981
 22982                    b.Property<string>("Path")
 22983                        .HasColumnType("TEXT");
 22984
 22985                    b.Property<string>("PixelFormat")
 22986                        .HasColumnType("TEXT");
 22987
 22988                    b.Property<string>("Profile")
 22989                        .HasColumnType("TEXT");
 22990
 22991                    b.Property<float?>("RealFrameRate")
 22992                        .HasColumnType("REAL");
 22993
 22994                    b.Property<int?>("RefFrames")
 22995                        .HasColumnType("INTEGER");
 22996
 22997                    b.Property<int?>("Rotation")
 22998                        .HasColumnType("INTEGER");
 22999
 221000                    b.Property<int?>("RpuPresentFlag")
 221001                        .HasColumnType("INTEGER");
 221002
 221003                    b.Property<int?>("SampleRate")
 221004                        .HasColumnType("INTEGER");
 221005
 221006                    b.Property<int>("StreamType")
 221007                        .HasColumnType("INTEGER");
 221008
 221009                    b.Property<string>("TimeBase")
 221010                        .HasColumnType("TEXT");
 221011
 221012                    b.Property<string>("Title")
 221013                        .HasColumnType("TEXT");
 221014
 221015                    b.Property<int?>("Width")
 221016                        .HasColumnType("INTEGER");
 221017
 221018                    b.HasKey("ItemId", "StreamIndex");
 221019
 221020                    b.ToTable("MediaStreamInfos");
 221021
 221022                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221023                });
 1024
 221025            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221026                {
 221027                    b.Property<Guid>("Id")
 221028                        .ValueGeneratedOnAdd()
 221029                        .HasColumnType("TEXT");
 221030
 221031                    b.Property<string>("Name")
 221032                        .IsRequired()
 221033                        .HasColumnType("TEXT");
 221034
 221035                    b.Property<string>("PersonType")
 221036                        .HasColumnType("TEXT");
 221037
 221038                    b.HasKey("Id");
 221039
 221040                    b.HasIndex("Name");
 221041
 221042                    b.ToTable("Peoples");
 221043
 221044                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221045                });
 1046
 221047            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221048                {
 221049                    b.Property<Guid>("ItemId")
 221050                        .HasColumnType("TEXT");
 221051
 221052                    b.Property<Guid>("PeopleId")
 221053                        .HasColumnType("TEXT");
 221054
 221055                    b.Property<string>("Role")
 221056                        .HasColumnType("TEXT");
 221057
 221058                    b.Property<int?>("ListOrder")
 221059                        .HasColumnType("INTEGER");
 221060
 221061                    b.Property<int?>("SortOrder")
 221062                        .HasColumnType("INTEGER");
 221063
 221064                    b.HasKey("ItemId", "PeopleId", "Role");
 221065
 221066                    b.HasIndex("PeopleId");
 221067
 221068                    b.HasIndex("ItemId", "ListOrder");
 221069
 221070                    b.HasIndex("ItemId", "SortOrder");
 221071
 221072                    b.ToTable("PeopleBaseItemMap");
 221073
 221074                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221075                });
 1076
 221077            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221078                {
 221079                    b.Property<int>("Id")
 221080                        .ValueGeneratedOnAdd()
 221081                        .HasColumnType("INTEGER");
 221082
 221083                    b.Property<int>("Kind")
 221084                        .HasColumnType("INTEGER");
 221085
 221086                    b.Property<Guid?>("Permission_Permissions_Guid")
 221087                        .HasColumnType("TEXT");
 221088
 221089                    b.Property<uint>("RowVersion")
 221090                        .IsConcurrencyToken()
 221091                        .HasColumnType("INTEGER");
 221092
 221093                    b.Property<Guid?>("UserId")
 221094                        .HasColumnType("TEXT");
 221095
 221096                    b.Property<bool>("Value")
 221097                        .HasColumnType("INTEGER");
 221098
 221099                    b.HasKey("Id");
 221100
 221101                    b.HasIndex("UserId", "Kind")
 221102                        .IsUnique()
 221103                        .HasFilter("[UserId] IS NOT NULL");
 221104
 221105                    b.ToTable("Permissions");
 221106
 221107                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221108                });
 1109
 221110            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PlaybackItem", b =>
 221111                {
 221112                    b.Property<Guid>("Id")
 221113                        .ValueGeneratedOnAdd()
 221114                        .HasColumnType("TEXT");
 221115
 221116                    b.Property<DateTime>("DateCreated")
 221117                        .HasColumnType("TEXT");
 221118
 221119                    b.Property<Guid?>("ItemId")
 221120                        .HasColumnType("TEXT");
 221121
 221122                    b.Property<string>("MediaType")
 221123                        .HasColumnType("TEXT");
 221124
 221125                    b.Property<string>("Title")
 221126                        .HasColumnType("TEXT");
 221127
 221128                    b.HasKey("Id");
 221129
 221130                    b.HasIndex("ItemId");
 221131
 221132                    b.ToTable("PlaybackItems");
 221133
 221134                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221135                });
 1136
 221137            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PlaybackItemKey", b =>
 221138                {
 221139                    b.Property<Guid>("Id")
 221140                        .ValueGeneratedOnAdd()
 221141                        .HasColumnType("TEXT");
 221142
 221143                    b.Property<string>("Key")
 221144                        .IsRequired()
 221145                        .HasColumnType("TEXT");
 221146
 221147                    b.Property<Guid>("PlaybackItemId")
 221148                        .HasColumnType("TEXT");
 221149
 221150                    b.HasKey("Id");
 221151
 221152                    b.HasIndex("Key")
 221153                        .IsUnique();
 221154
 221155                    b.HasIndex("PlaybackItemId");
 221156
 221157                    b.ToTable("PlaybackItemKeys");
 221158
 221159                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221160                });
 1161
 221162            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221163                {
 221164                    b.Property<int>("Id")
 221165                        .ValueGeneratedOnAdd()
 221166                        .HasColumnType("INTEGER");
 221167
 221168                    b.Property<int>("Kind")
 221169                        .HasColumnType("INTEGER");
 221170
 221171                    b.Property<Guid?>("Preference_Preferences_Guid")
 221172                        .HasColumnType("TEXT");
 221173
 221174                    b.Property<uint>("RowVersion")
 221175                        .IsConcurrencyToken()
 221176                        .HasColumnType("INTEGER");
 221177
 221178                    b.Property<Guid?>("UserId")
 221179                        .HasColumnType("TEXT");
 221180
 221181                    b.Property<string>("Value")
 221182                        .IsRequired()
 221183                        .HasMaxLength(65535)
 221184                        .HasColumnType("TEXT");
 221185
 221186                    b.HasKey("Id");
 221187
 221188                    b.HasIndex("UserId", "Kind")
 221189                        .IsUnique()
 221190                        .HasFilter("[UserId] IS NOT NULL");
 221191
 221192                    b.ToTable("Preferences");
 221193
 221194                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221195                });
 1196
 221197            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221198                {
 221199                    b.Property<int>("Id")
 221200                        .ValueGeneratedOnAdd()
 221201                        .HasColumnType("INTEGER");
 221202
 221203                    b.Property<string>("AccessToken")
 221204                        .IsRequired()
 221205                        .HasColumnType("TEXT");
 221206
 221207                    b.Property<DateTime>("DateCreated")
 221208                        .HasColumnType("TEXT");
 221209
 221210                    b.Property<DateTime>("DateLastActivity")
 221211                        .HasColumnType("TEXT");
 221212
 221213                    b.Property<string>("Name")
 221214                        .IsRequired()
 221215                        .HasMaxLength(64)
 221216                        .HasColumnType("TEXT");
 221217
 221218                    b.HasKey("Id");
 221219
 221220                    b.HasIndex("AccessToken")
 221221                        .IsUnique();
 221222
 221223                    b.ToTable("ApiKeys");
 221224
 221225                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221226                });
 1227
 221228            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221229                {
 221230                    b.Property<int>("Id")
 221231                        .ValueGeneratedOnAdd()
 221232                        .HasColumnType("INTEGER");
 221233
 221234                    b.Property<string>("AccessToken")
 221235                        .IsRequired()
 221236                        .HasColumnType("TEXT");
 221237
 221238                    b.Property<string>("AppName")
 221239                        .IsRequired()
 221240                        .HasMaxLength(64)
 221241                        .HasColumnType("TEXT");
 221242
 221243                    b.Property<string>("AppVersion")
 221244                        .IsRequired()
 221245                        .HasMaxLength(32)
 221246                        .HasColumnType("TEXT");
 221247
 221248                    b.Property<DateTime>("DateCreated")
 221249                        .HasColumnType("TEXT");
 221250
 221251                    b.Property<DateTime>("DateLastActivity")
 221252                        .HasColumnType("TEXT");
 221253
 221254                    b.Property<DateTime>("DateModified")
 221255                        .HasColumnType("TEXT");
 221256
 221257                    b.Property<string>("DeviceId")
 221258                        .IsRequired()
 221259                        .HasMaxLength(256)
 221260                        .HasColumnType("TEXT");
 221261
 221262                    b.Property<string>("DeviceName")
 221263                        .IsRequired()
 221264                        .HasMaxLength(64)
 221265                        .HasColumnType("TEXT");
 221266
 221267                    b.Property<bool>("IsActive")
 221268                        .HasColumnType("INTEGER");
 221269
 221270                    b.Property<Guid>("UserId")
 221271                        .HasColumnType("TEXT");
 221272
 221273                    b.HasKey("Id");
 221274
 221275                    b.HasIndex("AccessToken", "DateLastActivity");
 221276
 221277                    b.HasIndex("DeviceId", "DateLastActivity");
 221278
 221279                    b.HasIndex("UserId", "DeviceId");
 221280
 221281                    b.ToTable("Devices");
 221282
 221283                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221284                });
 1285
 221286            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221287                {
 221288                    b.Property<int>("Id")
 221289                        .ValueGeneratedOnAdd()
 221290                        .HasColumnType("INTEGER");
 221291
 221292                    b.Property<string>("CustomName")
 221293                        .HasColumnType("TEXT");
 221294
 221295                    b.Property<string>("DeviceId")
 221296                        .IsRequired()
 221297                        .HasColumnType("TEXT");
 221298
 221299                    b.HasKey("Id");
 221300
 221301                    b.HasIndex("DeviceId")
 221302                        .IsUnique();
 221303
 221304                    b.ToTable("DeviceOptions");
 221305
 221306                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221307                });
 1308
 221309            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221310                {
 221311                    b.Property<Guid>("ItemId")
 221312                        .HasColumnType("TEXT");
 221313
 221314                    b.Property<int>("Width")
 221315                        .HasColumnType("INTEGER");
 221316
 221317                    b.Property<int>("Bandwidth")
 221318                        .HasColumnType("INTEGER");
 221319
 221320                    b.Property<int>("Height")
 221321                        .HasColumnType("INTEGER");
 221322
 221323                    b.Property<int>("Interval")
 221324                        .HasColumnType("INTEGER");
 221325
 221326                    b.Property<int>("ThumbnailCount")
 221327                        .HasColumnType("INTEGER");
 221328
 221329                    b.Property<int>("TileHeight")
 221330                        .HasColumnType("INTEGER");
 221331
 221332                    b.Property<int>("TileWidth")
 221333                        .HasColumnType("INTEGER");
 221334
 221335                    b.HasKey("ItemId", "Width");
 221336
 221337                    b.ToTable("TrickplayInfos");
 221338
 221339                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221340                });
 1341
 221342            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221343                {
 221344                    b.Property<Guid>("Id")
 221345                        .ValueGeneratedOnAdd()
 221346                        .HasColumnType("TEXT");
 221347
 221348                    b.Property<string>("AudioLanguagePreference")
 221349                        .HasMaxLength(255)
 221350                        .HasColumnType("TEXT");
 221351
 221352                    b.Property<string>("AuthenticationProviderId")
 221353                        .IsRequired()
 221354                        .HasMaxLength(255)
 221355                        .HasColumnType("TEXT");
 221356
 221357                    b.Property<string>("CastReceiverId")
 221358                        .HasMaxLength(32)
 221359                        .HasColumnType("TEXT");
 221360
 221361                    b.Property<bool>("DisplayCollectionsView")
 221362                        .HasColumnType("INTEGER");
 221363
 221364                    b.Property<bool>("DisplayMissingEpisodes")
 221365                        .HasColumnType("INTEGER");
 221366
 221367                    b.Property<bool>("EnableAutoLogin")
 221368                        .HasColumnType("INTEGER");
 221369
 221370                    b.Property<bool>("EnableLocalPassword")
 221371                        .HasColumnType("INTEGER");
 221372
 221373                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221374                        .HasColumnType("INTEGER");
 221375
 221376                    b.Property<bool>("EnableUserPreferenceAccess")
 221377                        .HasColumnType("INTEGER");
 221378
 221379                    b.Property<bool>("HidePlayedInLatest")
 221380                        .HasColumnType("INTEGER");
 221381
 221382                    b.Property<long>("InternalId")
 221383                        .HasColumnType("INTEGER");
 221384
 221385                    b.Property<int>("InvalidLoginAttemptCount")
 221386                        .HasColumnType("INTEGER");
 221387
 221388                    b.Property<DateTime?>("LastActivityDate")
 221389                        .HasColumnType("TEXT");
 221390
 221391                    b.Property<DateTime?>("LastLoginDate")
 221392                        .HasColumnType("TEXT");
 221393
 221394                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221395                        .HasColumnType("INTEGER");
 221396
 221397                    b.Property<int>("MaxActiveSessions")
 221398                        .HasColumnType("INTEGER");
 221399
 221400                    b.Property<int?>("MaxParentalRatingScore")
 221401                        .HasColumnType("INTEGER");
 221402
 221403                    b.Property<int?>("MaxParentalRatingSubScore")
 221404                        .HasColumnType("INTEGER");
 221405
 221406                    b.Property<bool>("MustUpdatePassword")
 221407                        .HasColumnType("INTEGER");
 221408
 221409                    b.Property<string>("NormalizedUsername")
 221410                        .IsRequired()
 221411                        .HasMaxLength(255)
 221412                        .HasColumnType("TEXT");
 221413
 221414                    b.Property<string>("Password")
 221415                        .HasMaxLength(65535)
 221416                        .HasColumnType("TEXT");
 221417
 221418                    b.Property<string>("PasswordResetProviderId")
 221419                        .IsRequired()
 221420                        .HasMaxLength(255)
 221421                        .HasColumnType("TEXT");
 221422
 221423                    b.Property<bool>("PlayDefaultAudioTrack")
 221424                        .HasColumnType("INTEGER");
 221425
 221426                    b.Property<bool>("RememberAudioSelections")
 221427                        .HasColumnType("INTEGER");
 221428
 221429                    b.Property<bool>("RememberSubtitleSelections")
 221430                        .HasColumnType("INTEGER");
 221431
 221432                    b.Property<int?>("RemoteClientBitrateLimit")
 221433                        .HasColumnType("INTEGER");
 221434
 221435                    b.Property<uint>("RowVersion")
 221436                        .IsConcurrencyToken()
 221437                        .HasColumnType("INTEGER");
 221438
 221439                    b.Property<string>("SubtitleLanguagePreference")
 221440                        .HasMaxLength(255)
 221441                        .HasColumnType("TEXT");
 221442
 221443                    b.Property<int>("SubtitleMode")
 221444                        .HasColumnType("INTEGER");
 221445
 221446                    b.Property<int>("SyncPlayAccess")
 221447                        .HasColumnType("INTEGER");
 221448
 221449                    b.Property<string>("Username")
 221450                        .IsRequired()
 221451                        .HasMaxLength(255)
 221452                        .HasColumnType("TEXT");
 221453
 221454                    b.HasKey("Id");
 221455
 221456                    b.HasIndex("NormalizedUsername")
 221457                        .IsUnique();
 221458
 221459                    b.HasIndex("Username")
 221460                        .IsUnique();
 221461
 221462                    b.ToTable("Users");
 221463
 221464                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221465                });
 1466
 221467            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221468                {
 221469                    b.Property<Guid>("ItemId")
 221470                        .HasColumnType("TEXT");
 221471
 221472                    b.Property<Guid>("UserId")
 221473                        .HasColumnType("TEXT");
 221474
 221475                    b.Property<string>("CustomDataKey")
 221476                        .HasColumnType("TEXT");
 221477
 221478                    b.Property<int?>("AudioStreamIndex")
 221479                        .HasColumnType("INTEGER");
 221480
 221481                    b.Property<bool>("IsFavorite")
 221482                        .HasColumnType("INTEGER");
 221483
 221484                    b.Property<DateTime?>("LastPlayedDate")
 221485                        .HasColumnType("TEXT");
 221486
 221487                    b.Property<bool?>("Likes")
 221488                        .HasColumnType("INTEGER");
 221489
 221490                    b.Property<int>("PlayCount")
 221491                        .HasColumnType("INTEGER");
 221492
 221493                    b.Property<long>("PlaybackPositionTicks")
 221494                        .HasColumnType("INTEGER");
 221495
 221496                    b.Property<bool>("Played")
 221497                        .HasColumnType("INTEGER");
 221498
 221499                    b.Property<double?>("Rating")
 221500                        .HasColumnType("REAL");
 221501
 221502                    b.Property<DateTime?>("RetentionDate")
 221503                        .HasColumnType("TEXT");
 221504
 221505                    b.Property<int?>("SubtitleStreamIndex")
 221506                        .HasColumnType("INTEGER");
 221507
 221508                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221509
 221510                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221511
 221512                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221513
 221514                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221515
 221516                    b.HasIndex("ItemId", "UserId", "Played");
 221517
 221518                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 221519
 221520                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 221521
 221522                    b.HasIndex("UserId", "Played", "ItemId");
 221523
 221524                    b.ToTable("UserData");
 221525
 221526                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221527                });
 1528
 221529            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserPlaybackHistory", b =>
 221530                {
 221531                    b.Property<Guid>("Id")
 221532                        .ValueGeneratedOnAdd()
 221533                        .HasColumnType("TEXT");
 221534
 221535                    b.Property<long?>("ActualBytesTransferred")
 221536                        .HasColumnType("INTEGER");
 221537
 221538                    b.Property<int?>("Bitrate")
 221539                        .HasColumnType("INTEGER");
 221540
 221541                    b.Property<string>("ClientName")
 221542                        .HasColumnType("TEXT");
 221543
 221544                    b.Property<DateTime>("DateStarted")
 221545                        .HasColumnType("TEXT");
 221546
 221547                    b.Property<DateTime>("DateStopped")
 221548                        .HasColumnType("TEXT");
 221549
 221550                    b.Property<string>("DeviceId")
 221551                        .HasColumnType("TEXT");
 221552
 221553                    b.Property<string>("DeviceName")
 221554                        .HasColumnType("TEXT");
 221555
 221556                    b.Property<string>("MediaSourceId")
 221557                        .HasColumnType("TEXT");
 221558
 221559                    b.Property<string>("PlaySessionId")
 221560                        .HasColumnType("TEXT");
 221561
 221562                    b.Property<Guid>("PlaybackItemId")
 221563                        .HasColumnType("TEXT");
 221564
 221565                    b.Property<long>("PlayedDurationTicks")
 221566                        .HasColumnType("INTEGER");
 221567
 221568                    b.Property<bool>("PlayedToCompletion")
 221569                        .HasColumnType("INTEGER");
 221570
 221571                    b.Property<long?>("RunTimeTicks")
 221572                        .HasColumnType("INTEGER");
 221573
 221574                    b.Property<long>("StartPositionTicks")
 221575                        .HasColumnType("INTEGER");
 221576
 221577                    b.Property<long>("StopPositionTicks")
 221578                        .HasColumnType("INTEGER");
 221579
 221580                    b.Property<bool>("Transcoded")
 221581                        .HasColumnType("INTEGER");
 221582
 221583                    b.Property<Guid>("UserId")
 221584                        .HasColumnType("TEXT");
 221585
 221586                    b.HasKey("Id");
 221587
 221588                    b.HasIndex("PlaybackItemId", "PlayedToCompletion");
 221589
 221590                    b.HasIndex("UserId", "DateStopped");
 221591
 221592                    b.HasIndex("UserId", "PlaybackItemId", "DateStopped");
 221593
 221594                    b.ToTable("UserPlaybackHistory");
 221595
 221596                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221597                });
 1598
 221599            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserPlaybackHistoryStream", b =>
 221600                {
 221601                    b.Property<Guid>("Id")
 221602                        .ValueGeneratedOnAdd()
 221603                        .HasColumnType("TEXT");
 221604
 221605                    b.Property<int?>("Bitrate")
 221606                        .HasColumnType("INTEGER");
 221607
 221608                    b.Property<int?>("Channels")
 221609                        .HasColumnType("INTEGER");
 221610
 221611                    b.Property<string>("Codec")
 221612                        .HasColumnType("TEXT");
 221613
 221614                    b.Property<int?>("Height")
 221615                        .HasColumnType("INTEGER");
 221616
 221617                    b.Property<Guid>("HistoryId")
 221618                        .HasColumnType("TEXT");
 221619
 221620                    b.Property<bool?>("IsForced")
 221621                        .HasColumnType("INTEGER");
 221622
 221623                    b.Property<bool?>("IsHearingImpaired")
 221624                        .HasColumnType("INTEGER");
 221625
 221626                    b.Property<string>("Language")
 221627                        .HasColumnType("TEXT");
 221628
 221629                    b.Property<int>("Origin")
 221630                        .HasColumnType("INTEGER");
 221631
 221632                    b.Property<int>("StreamType")
 221633                        .HasColumnType("INTEGER");
 221634
 221635                    b.Property<string>("VideoRange")
 221636                        .HasColumnType("TEXT");
 221637
 221638                    b.Property<int?>("Width")
 221639                        .HasColumnType("INTEGER");
 221640
 221641                    b.HasKey("Id");
 221642
 221643                    b.HasIndex("HistoryId");
 221644
 221645                    b.HasIndex("StreamType", "Origin", "Language");
 221646
 221647                    b.HasIndex("StreamType", "Origin", "VideoRange");
 221648
 221649                    b.ToTable("UserPlaybackHistoryStreams");
 221650
 221651                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221652                });
 1653
 221654            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221655                {
 221656                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221657                        .WithMany("AccessSchedules")
 221658                        .HasForeignKey("UserId")
 221659                        .OnDelete(DeleteBehavior.Cascade)
 221660                        .IsRequired();
 221661                });
 1662
 221663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221664                {
 221665                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221666                        .WithMany("Parents")
 221667                        .HasForeignKey("ItemId")
 221668                        .OnDelete(DeleteBehavior.Cascade)
 221669                        .IsRequired();
 221670
 221671                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221672                        .WithMany("Children")
 221673                        .HasForeignKey("ParentItemId")
 221674                        .OnDelete(DeleteBehavior.Cascade)
 221675                        .IsRequired();
 221676
 221677                    b.Navigation("Item");
 221678
 221679                    b.Navigation("ParentItem");
 221680                });
 1681
 221682            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221683                {
 221684                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221685                        .WithMany()
 221686                        .HasForeignKey("ItemId")
 221687                        .OnDelete(DeleteBehavior.Cascade)
 221688                        .IsRequired();
 221689
 221690                    b.Navigation("Item");
 221691                });
 1692
 221693            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221694                {
 221695                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221696                        .WithMany("Extras")
 221697                        .HasForeignKey("OwnerId")
 221698                        .OnDelete(DeleteBehavior.NoAction);
 221699
 221700                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221701                        .WithMany("DirectChildren")
 221702                        .HasForeignKey("ParentId")
 221703                        .OnDelete(DeleteBehavior.Cascade);
 221704
 221705                    b.Navigation("DirectParent");
 221706
 221707                    b.Navigation("Owner");
 221708                });
 1709
 221710            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221711                {
 221712                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221713                        .WithMany("Images")
 221714                        .HasForeignKey("ItemId")
 221715                        .OnDelete(DeleteBehavior.Cascade)
 221716                        .IsRequired();
 221717
 221718                    b.Navigation("Item");
 221719                });
 1720
 221721            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221722                {
 221723                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221724                        .WithMany("LockedFields")
 221725                        .HasForeignKey("ItemId")
 221726                        .OnDelete(DeleteBehavior.Cascade)
 221727                        .IsRequired();
 221728
 221729                    b.Navigation("Item");
 221730                });
 1731
 221732            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221733                {
 221734                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221735                        .WithMany("Provider")
 221736                        .HasForeignKey("ItemId")
 221737                        .OnDelete(DeleteBehavior.Cascade)
 221738                        .IsRequired();
 221739
 221740                    b.Navigation("Item");
 221741                });
 1742
 221743            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221744                {
 221745                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221746                        .WithMany("TrailerTypes")
 221747                        .HasForeignKey("ItemId")
 221748                        .OnDelete(DeleteBehavior.Cascade)
 221749                        .IsRequired();
 221750
 221751                    b.Navigation("Item");
 221752                });
 1753
 221754            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221755                {
 221756                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221757                        .WithMany("Chapters")
 221758                        .HasForeignKey("ItemId")
 221759                        .OnDelete(DeleteBehavior.Cascade)
 221760                        .IsRequired();
 221761
 221762                    b.Navigation("Item");
 221763                });
 1764
 221765            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221766                {
 221767                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221768                        .WithMany("DisplayPreferences")
 221769                        .HasForeignKey("UserId")
 221770                        .OnDelete(DeleteBehavior.Cascade)
 221771                        .IsRequired();
 221772                });
 1773
 221774            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221775                {
 221776                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221777                        .WithMany("HomeSections")
 221778                        .HasForeignKey("DisplayPreferencesId")
 221779                        .OnDelete(DeleteBehavior.Cascade)
 221780                        .IsRequired();
 221781                });
 1782
 221783            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221784                {
 221785                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221786                        .WithOne("ProfileImage")
 221787                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221788                        .OnDelete(DeleteBehavior.Cascade);
 221789                });
 1790
 221791            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221792                {
 221793                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221794                        .WithMany("ItemDisplayPreferences")
 221795                        .HasForeignKey("UserId")
 221796                        .OnDelete(DeleteBehavior.Cascade)
 221797                        .IsRequired();
 221798                });
 1799
 221800            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221801                {
 221802                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221803                        .WithMany("ItemValues")
 221804                        .HasForeignKey("ItemId")
 221805                        .OnDelete(DeleteBehavior.Cascade)
 221806                        .IsRequired();
 221807
 221808                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221809                        .WithMany("BaseItemsMap")
 221810                        .HasForeignKey("ItemValueId")
 221811                        .OnDelete(DeleteBehavior.Cascade)
 221812                        .IsRequired();
 221813
 221814                    b.Navigation("Item");
 221815
 221816                    b.Navigation("ItemValue");
 221817                });
 1818
 221819            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221820                {
 221821                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221822                        .WithMany()
 221823                        .HasForeignKey("ItemId")
 221824                        .OnDelete(DeleteBehavior.Cascade)
 221825                        .IsRequired();
 221826
 221827                    b.Navigation("Item");
 221828                });
 1829
 221830            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221831                {
 221832                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221833                        .WithMany("LinkedChildOfEntities")
 221834                        .HasForeignKey("ChildId")
 221835                        .OnDelete(DeleteBehavior.NoAction)
 221836                        .IsRequired();
 221837
 221838                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221839                        .WithMany("LinkedChildEntities")
 221840                        .HasForeignKey("ParentId")
 221841                        .OnDelete(DeleteBehavior.NoAction)
 221842                        .IsRequired();
 221843
 221844                    b.Navigation("Child");
 221845
 221846                    b.Navigation("Parent");
 221847                });
 1848
 221849            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221850                {
 221851                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221852                        .WithMany("MediaStreams")
 221853                        .HasForeignKey("ItemId")
 221854                        .OnDelete(DeleteBehavior.Cascade)
 221855                        .IsRequired();
 221856
 221857                    b.Navigation("Item");
 221858                });
 1859
 221860            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221861                {
 221862                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221863                        .WithMany("Peoples")
 221864                        .HasForeignKey("ItemId")
 221865                        .OnDelete(DeleteBehavior.Cascade)
 221866                        .IsRequired();
 221867
 221868                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221869                        .WithMany("BaseItems")
 221870                        .HasForeignKey("PeopleId")
 221871                        .OnDelete(DeleteBehavior.Cascade)
 221872                        .IsRequired();
 221873
 221874                    b.Navigation("Item");
 221875
 221876                    b.Navigation("People");
 221877                });
 1878
 221879            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221880                {
 221881                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221882                        .WithMany("Permissions")
 221883                        .HasForeignKey("UserId")
 221884                        .OnDelete(DeleteBehavior.Cascade);
 221885                });
 1886
 221887            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PlaybackItemKey", b =>
 221888                {
 221889                    b.HasOne("Jellyfin.Database.Implementations.Entities.PlaybackItem", "PlaybackItem")
 221890                        .WithMany("Keys")
 221891                        .HasForeignKey("PlaybackItemId")
 221892                        .OnDelete(DeleteBehavior.Restrict)
 221893                        .IsRequired();
 221894
 221895                    b.Navigation("PlaybackItem");
 221896                });
 1897
 221898            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221899                {
 221900                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221901                        .WithMany("Preferences")
 221902                        .HasForeignKey("UserId")
 221903                        .OnDelete(DeleteBehavior.Cascade);
 221904                });
 1905
 221906            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221907                {
 221908                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221909                        .WithMany()
 221910                        .HasForeignKey("UserId")
 221911                        .OnDelete(DeleteBehavior.Cascade)
 221912                        .IsRequired();
 221913
 221914                    b.Navigation("User");
 221915                });
 1916
 221917            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221918                {
 221919                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221920                        .WithMany("UserData")
 221921                        .HasForeignKey("ItemId")
 221922                        .OnDelete(DeleteBehavior.Cascade)
 221923                        .IsRequired();
 221924
 221925                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221926                        .WithMany()
 221927                        .HasForeignKey("UserId")
 221928                        .OnDelete(DeleteBehavior.Cascade)
 221929                        .IsRequired();
 221930
 221931                    b.Navigation("Item");
 221932
 221933                    b.Navigation("User");
 221934                });
 1935
 221936            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserPlaybackHistory", b =>
 221937                {
 221938                    b.HasOne("Jellyfin.Database.Implementations.Entities.PlaybackItem", "PlaybackItem")
 221939                        .WithMany("History")
 221940                        .HasForeignKey("PlaybackItemId")
 221941                        .OnDelete(DeleteBehavior.Restrict)
 221942                        .IsRequired();
 221943
 221944                    b.Navigation("PlaybackItem");
 221945                });
 1946
 221947            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserPlaybackHistoryStream", b =>
 221948                {
 221949                    b.HasOne("Jellyfin.Database.Implementations.Entities.UserPlaybackHistory", "History")
 221950                        .WithMany("Streams")
 221951                        .HasForeignKey("HistoryId")
 221952                        .OnDelete(DeleteBehavior.Restrict)
 221953                        .IsRequired();
 221954
 221955                    b.Navigation("History");
 221956                });
 1957
 221958            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221959                {
 221960                    b.Navigation("Chapters");
 221961
 221962                    b.Navigation("Children");
 221963
 221964                    b.Navigation("DirectChildren");
 221965
 221966                    b.Navigation("Extras");
 221967
 221968                    b.Navigation("Images");
 221969
 221970                    b.Navigation("ItemValues");
 221971
 221972                    b.Navigation("LinkedChildEntities");
 221973
 221974                    b.Navigation("LinkedChildOfEntities");
 221975
 221976                    b.Navigation("LockedFields");
 221977
 221978                    b.Navigation("MediaStreams");
 221979
 221980                    b.Navigation("Parents");
 221981
 221982                    b.Navigation("Peoples");
 221983
 221984                    b.Navigation("Provider");
 221985
 221986                    b.Navigation("TrailerTypes");
 221987
 221988                    b.Navigation("UserData");
 221989                });
 1990
 221991            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221992                {
 221993                    b.Navigation("HomeSections");
 221994                });
 1995
 221996            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221997                {
 221998                    b.Navigation("BaseItemsMap");
 221999                });
 2000
 222001            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 222002                {
 222003                    b.Navigation("BaseItems");
 222004                });
 2005
 222006            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PlaybackItem", b =>
 222007                {
 222008                    b.Navigation("History");
 222009
 222010                    b.Navigation("Keys");
 222011                });
 2012
 222013            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 222014                {
 222015                    b.Navigation("AccessSchedules");
 222016
 222017                    b.Navigation("DisplayPreferences");
 222018
 222019                    b.Navigation("ItemDisplayPreferences");
 222020
 222021                    b.Navigation("Permissions");
 222022
 222023                    b.Navigation("Preferences");
 222024
 222025                    b.Navigation("ProfileImage");
 222026                });
 2027
 222028            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserPlaybackHistory", b =>
 222029                {
 222030                    b.Navigation("Streams");
 222031                });
 2032#pragma warning restore 612, 618
 222033        }
 2034    }
 2035}