< Summary - Jellyfin

Line coverage
99%
Covered lines: 1633
Uncovered lines: 1
Coverable lines: 1634
Total lines: 1731
Line coverage: 99.9%
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 3/26/2026 - 12:14:14 AM Line coverage: 99.9% (1633/1634) Total lines: 1731

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/20250714044826_ResetJournalMode.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class ResetJournalMode : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 13            // Resets journal mode to WAL for users that have created their database during 10.11-RC1 or 2
 2214            migrationBuilder.Sql("PRAGMA journal_mode = 'WAL';", true);
 2215        }
 16
 17        /// <inheritdoc />
 18        protected override void Down(MigrationBuilder migrationBuilder)
 19        {
 020        }
 21    }
 22}

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