< 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 5/16/2026 - 12:15:55 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
 2714            migrationBuilder.Sql("PRAGMA journal_mode = 'WAL';", true);
 2715        }
 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
 2721            modelBuilder.HasAnnotation("ProductVersion", "9.0.7");
 22
 2723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2724                {
 2725                    b.Property<int>("Id")
 2726                        .ValueGeneratedOnAdd()
 2727                        .HasColumnType("INTEGER");
 2728
 2729                    b.Property<int>("DayOfWeek")
 2730                        .HasColumnType("INTEGER");
 2731
 2732                    b.Property<double>("EndHour")
 2733                        .HasColumnType("REAL");
 2734
 2735                    b.Property<double>("StartHour")
 2736                        .HasColumnType("REAL");
 2737
 2738                    b.Property<Guid>("UserId")
 2739                        .HasColumnType("TEXT");
 2740
 2741                    b.HasKey("Id");
 2742
 2743                    b.HasIndex("UserId");
 2744
 2745                    b.ToTable("AccessSchedules");
 2746
 2747                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2748                });
 49
 2750            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2751                {
 2752                    b.Property<int>("Id")
 2753                        .ValueGeneratedOnAdd()
 2754                        .HasColumnType("INTEGER");
 2755
 2756                    b.Property<DateTime>("DateCreated")
 2757                        .HasColumnType("TEXT");
 2758
 2759                    b.Property<string>("ItemId")
 2760                        .HasMaxLength(256)
 2761                        .HasColumnType("TEXT");
 2762
 2763                    b.Property<int>("LogSeverity")
 2764                        .HasColumnType("INTEGER");
 2765
 2766                    b.Property<string>("Name")
 2767                        .IsRequired()
 2768                        .HasMaxLength(512)
 2769                        .HasColumnType("TEXT");
 2770
 2771                    b.Property<string>("Overview")
 2772                        .HasMaxLength(512)
 2773                        .HasColumnType("TEXT");
 2774
 2775                    b.Property<uint>("RowVersion")
 2776                        .IsConcurrencyToken()
 2777                        .HasColumnType("INTEGER");
 2778
 2779                    b.Property<string>("ShortOverview")
 2780                        .HasMaxLength(512)
 2781                        .HasColumnType("TEXT");
 2782
 2783                    b.Property<string>("Type")
 2784                        .IsRequired()
 2785                        .HasMaxLength(256)
 2786                        .HasColumnType("TEXT");
 2787
 2788                    b.Property<Guid>("UserId")
 2789                        .HasColumnType("TEXT");
 2790
 2791                    b.HasKey("Id");
 2792
 2793                    b.HasIndex("DateCreated");
 2794
 2795                    b.ToTable("ActivityLogs");
 2796
 2797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2798                });
 99
 27100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 27101                {
 27102                    b.Property<Guid>("ItemId")
 27103                        .HasColumnType("TEXT");
 27104
 27105                    b.Property<Guid>("ParentItemId")
 27106                        .HasColumnType("TEXT");
 27107
 27108                    b.HasKey("ItemId", "ParentItemId");
 27109
 27110                    b.HasIndex("ParentItemId");
 27111
 27112                    b.ToTable("AncestorIds");
 27113
 27114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27115                });
 116
 27117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 27118                {
 27119                    b.Property<Guid>("ItemId")
 27120                        .HasColumnType("TEXT");
 27121
 27122                    b.Property<int>("Index")
 27123                        .HasColumnType("INTEGER");
 27124
 27125                    b.Property<string>("Codec")
 27126                        .HasColumnType("TEXT");
 27127
 27128                    b.Property<string>("CodecTag")
 27129                        .HasColumnType("TEXT");
 27130
 27131                    b.Property<string>("Comment")
 27132                        .HasColumnType("TEXT");
 27133
 27134                    b.Property<string>("Filename")
 27135                        .HasColumnType("TEXT");
 27136
 27137                    b.Property<string>("MimeType")
 27138                        .HasColumnType("TEXT");
 27139
 27140                    b.HasKey("ItemId", "Index");
 27141
 27142                    b.ToTable("AttachmentStreamInfos");
 27143
 27144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27145                });
 146
 27147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 27148                {
 27149                    b.Property<Guid>("Id")
 27150                        .ValueGeneratedOnAdd()
 27151                        .HasColumnType("TEXT");
 27152
 27153                    b.Property<string>("Album")
 27154                        .HasColumnType("TEXT");
 27155
 27156                    b.Property<string>("AlbumArtists")
 27157                        .HasColumnType("TEXT");
 27158
 27159                    b.Property<string>("Artists")
 27160                        .HasColumnType("TEXT");
 27161
 27162                    b.Property<int?>("Audio")
 27163                        .HasColumnType("INTEGER");
 27164
 27165                    b.Property<Guid?>("ChannelId")
 27166                        .HasColumnType("TEXT");
 27167
 27168                    b.Property<string>("CleanName")
 27169                        .HasColumnType("TEXT");
 27170
 27171                    b.Property<float?>("CommunityRating")
 27172                        .HasColumnType("REAL");
 27173
 27174                    b.Property<float?>("CriticRating")
 27175                        .HasColumnType("REAL");
 27176
 27177                    b.Property<string>("CustomRating")
 27178                        .HasColumnType("TEXT");
 27179
 27180                    b.Property<string>("Data")
 27181                        .HasColumnType("TEXT");
 27182
 27183                    b.Property<DateTime?>("DateCreated")
 27184                        .HasColumnType("TEXT");
 27185
 27186                    b.Property<DateTime?>("DateLastMediaAdded")
 27187                        .HasColumnType("TEXT");
 27188
 27189                    b.Property<DateTime?>("DateLastRefreshed")
 27190                        .HasColumnType("TEXT");
 27191
 27192                    b.Property<DateTime?>("DateLastSaved")
 27193                        .HasColumnType("TEXT");
 27194
 27195                    b.Property<DateTime?>("DateModified")
 27196                        .HasColumnType("TEXT");
 27197
 27198                    b.Property<DateTime?>("EndDate")
 27199                        .HasColumnType("TEXT");
 27200
 27201                    b.Property<string>("EpisodeTitle")
 27202                        .HasColumnType("TEXT");
 27203
 27204                    b.Property<string>("ExternalId")
 27205                        .HasColumnType("TEXT");
 27206
 27207                    b.Property<string>("ExternalSeriesId")
 27208                        .HasColumnType("TEXT");
 27209
 27210                    b.Property<string>("ExternalServiceId")
 27211                        .HasColumnType("TEXT");
 27212
 27213                    b.Property<string>("ExtraIds")
 27214                        .HasColumnType("TEXT");
 27215
 27216                    b.Property<int?>("ExtraType")
 27217                        .HasColumnType("INTEGER");
 27218
 27219                    b.Property<string>("ForcedSortName")
 27220                        .HasColumnType("TEXT");
 27221
 27222                    b.Property<string>("Genres")
 27223                        .HasColumnType("TEXT");
 27224
 27225                    b.Property<int?>("Height")
 27226                        .HasColumnType("INTEGER");
 27227
 27228                    b.Property<int?>("IndexNumber")
 27229                        .HasColumnType("INTEGER");
 27230
 27231                    b.Property<int?>("InheritedParentalRatingSubValue")
 27232                        .HasColumnType("INTEGER");
 27233
 27234                    b.Property<int?>("InheritedParentalRatingValue")
 27235                        .HasColumnType("INTEGER");
 27236
 27237                    b.Property<bool>("IsFolder")
 27238                        .HasColumnType("INTEGER");
 27239
 27240                    b.Property<bool>("IsInMixedFolder")
 27241                        .HasColumnType("INTEGER");
 27242
 27243                    b.Property<bool>("IsLocked")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<bool>("IsMovie")
 27247                        .HasColumnType("INTEGER");
 27248
 27249                    b.Property<bool>("IsRepeat")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("IsSeries")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<bool>("IsVirtualItem")
 27256                        .HasColumnType("INTEGER");
 27257
 27258                    b.Property<float?>("LUFS")
 27259                        .HasColumnType("REAL");
 27260
 27261                    b.Property<string>("MediaType")
 27262                        .HasColumnType("TEXT");
 27263
 27264                    b.Property<string>("Name")
 27265                        .HasColumnType("TEXT");
 27266
 27267                    b.Property<float?>("NormalizationGain")
 27268                        .HasColumnType("REAL");
 27269
 27270                    b.Property<string>("OfficialRating")
 27271                        .HasColumnType("TEXT");
 27272
 27273                    b.Property<string>("OriginalTitle")
 27274                        .HasColumnType("TEXT");
 27275
 27276                    b.Property<string>("Overview")
 27277                        .HasColumnType("TEXT");
 27278
 27279                    b.Property<string>("OwnerId")
 27280                        .HasColumnType("TEXT");
 27281
 27282                    b.Property<Guid?>("ParentId")
 27283                        .HasColumnType("TEXT");
 27284
 27285                    b.Property<int?>("ParentIndexNumber")
 27286                        .HasColumnType("INTEGER");
 27287
 27288                    b.Property<string>("Path")
 27289                        .HasColumnType("TEXT");
 27290
 27291                    b.Property<string>("PreferredMetadataCountryCode")
 27292                        .HasColumnType("TEXT");
 27293
 27294                    b.Property<string>("PreferredMetadataLanguage")
 27295                        .HasColumnType("TEXT");
 27296
 27297                    b.Property<DateTime?>("PremiereDate")
 27298                        .HasColumnType("TEXT");
 27299
 27300                    b.Property<string>("PresentationUniqueKey")
 27301                        .HasColumnType("TEXT");
 27302
 27303                    b.Property<string>("PrimaryVersionId")
 27304                        .HasColumnType("TEXT");
 27305
 27306                    b.Property<string>("ProductionLocations")
 27307                        .HasColumnType("TEXT");
 27308
 27309                    b.Property<int?>("ProductionYear")
 27310                        .HasColumnType("INTEGER");
 27311
 27312                    b.Property<long?>("RunTimeTicks")
 27313                        .HasColumnType("INTEGER");
 27314
 27315                    b.Property<Guid?>("SeasonId")
 27316                        .HasColumnType("TEXT");
 27317
 27318                    b.Property<string>("SeasonName")
 27319                        .HasColumnType("TEXT");
 27320
 27321                    b.Property<Guid?>("SeriesId")
 27322                        .HasColumnType("TEXT");
 27323
 27324                    b.Property<string>("SeriesName")
 27325                        .HasColumnType("TEXT");
 27326
 27327                    b.Property<string>("SeriesPresentationUniqueKey")
 27328                        .HasColumnType("TEXT");
 27329
 27330                    b.Property<string>("ShowId")
 27331                        .HasColumnType("TEXT");
 27332
 27333                    b.Property<long?>("Size")
 27334                        .HasColumnType("INTEGER");
 27335
 27336                    b.Property<string>("SortName")
 27337                        .HasColumnType("TEXT");
 27338
 27339                    b.Property<DateTime?>("StartDate")
 27340                        .HasColumnType("TEXT");
 27341
 27342                    b.Property<string>("Studios")
 27343                        .HasColumnType("TEXT");
 27344
 27345                    b.Property<string>("Tagline")
 27346                        .HasColumnType("TEXT");
 27347
 27348                    b.Property<string>("Tags")
 27349                        .HasColumnType("TEXT");
 27350
 27351                    b.Property<Guid?>("TopParentId")
 27352                        .HasColumnType("TEXT");
 27353
 27354                    b.Property<int?>("TotalBitrate")
 27355                        .HasColumnType("INTEGER");
 27356
 27357                    b.Property<string>("Type")
 27358                        .IsRequired()
 27359                        .HasColumnType("TEXT");
 27360
 27361                    b.Property<string>("UnratedType")
 27362                        .HasColumnType("TEXT");
 27363
 27364                    b.Property<int?>("Width")
 27365                        .HasColumnType("INTEGER");
 27366
 27367                    b.HasKey("Id");
 27368
 27369                    b.HasIndex("ParentId");
 27370
 27371                    b.HasIndex("Path");
 27372
 27373                    b.HasIndex("PresentationUniqueKey");
 27374
 27375                    b.HasIndex("TopParentId", "Id");
 27376
 27377                    b.HasIndex("Type", "TopParentId", "Id");
 27378
 27379                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27380
 27381                    b.HasIndex("Type", "TopParentId", "StartDate");
 27382
 27383                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 27384
 27385                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27386
 27387                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27388
 27389                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27390
 27391                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27392
 27393                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27394
 27395                    b.ToTable("BaseItems");
 27396
 27397                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27398
 27399                    b.HasData(
 27400                        new
 27401                        {
 27402                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27403                            IsFolder = false,
 27404                            IsInMixedFolder = false,
 27405                            IsLocked = false,
 27406                            IsMovie = false,
 27407                            IsRepeat = false,
 27408                            IsSeries = false,
 27409                            IsVirtualItem = false,
 27410                            Name = "This is a placeholder item for UserData that has been detacted from its original ite
 27411                            Type = "PLACEHOLDER"
 27412                        });
 27413                });
 414
 27415            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27416                {
 27417                    b.Property<Guid>("Id")
 27418                        .ValueGeneratedOnAdd()
 27419                        .HasColumnType("TEXT");
 27420
 27421                    b.Property<byte[]>("Blurhash")
 27422                        .HasColumnType("BLOB");
 27423
 27424                    b.Property<DateTime?>("DateModified")
 27425                        .HasColumnType("TEXT");
 27426
 27427                    b.Property<int>("Height")
 27428                        .HasColumnType("INTEGER");
 27429
 27430                    b.Property<int>("ImageType")
 27431                        .HasColumnType("INTEGER");
 27432
 27433                    b.Property<Guid>("ItemId")
 27434                        .HasColumnType("TEXT");
 27435
 27436                    b.Property<string>("Path")
 27437                        .IsRequired()
 27438                        .HasColumnType("TEXT");
 27439
 27440                    b.Property<int>("Width")
 27441                        .HasColumnType("INTEGER");
 27442
 27443                    b.HasKey("Id");
 27444
 27445                    b.HasIndex("ItemId");
 27446
 27447                    b.ToTable("BaseItemImageInfos");
 27448
 27449                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27450                });
 451
 27452            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27453                {
 27454                    b.Property<int>("Id")
 27455                        .HasColumnType("INTEGER");
 27456
 27457                    b.Property<Guid>("ItemId")
 27458                        .HasColumnType("TEXT");
 27459
 27460                    b.HasKey("Id", "ItemId");
 27461
 27462                    b.HasIndex("ItemId");
 27463
 27464                    b.ToTable("BaseItemMetadataFields");
 27465
 27466                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27467                });
 468
 27469            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27470                {
 27471                    b.Property<Guid>("ItemId")
 27472                        .HasColumnType("TEXT");
 27473
 27474                    b.Property<string>("ProviderId")
 27475                        .HasColumnType("TEXT");
 27476
 27477                    b.Property<string>("ProviderValue")
 27478                        .IsRequired()
 27479                        .HasColumnType("TEXT");
 27480
 27481                    b.HasKey("ItemId", "ProviderId");
 27482
 27483                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 27484
 27485                    b.ToTable("BaseItemProviders");
 27486
 27487                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27488                });
 489
 27490            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27491                {
 27492                    b.Property<int>("Id")
 27493                        .HasColumnType("INTEGER");
 27494
 27495                    b.Property<Guid>("ItemId")
 27496                        .HasColumnType("TEXT");
 27497
 27498                    b.HasKey("Id", "ItemId");
 27499
 27500                    b.HasIndex("ItemId");
 27501
 27502                    b.ToTable("BaseItemTrailerTypes");
 27503
 27504                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27505                });
 506
 27507            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27508                {
 27509                    b.Property<Guid>("ItemId")
 27510                        .HasColumnType("TEXT");
 27511
 27512                    b.Property<int>("ChapterIndex")
 27513                        .HasColumnType("INTEGER");
 27514
 27515                    b.Property<DateTime?>("ImageDateModified")
 27516                        .HasColumnType("TEXT");
 27517
 27518                    b.Property<string>("ImagePath")
 27519                        .HasColumnType("TEXT");
 27520
 27521                    b.Property<string>("Name")
 27522                        .HasColumnType("TEXT");
 27523
 27524                    b.Property<long>("StartPositionTicks")
 27525                        .HasColumnType("INTEGER");
 27526
 27527                    b.HasKey("ItemId", "ChapterIndex");
 27528
 27529                    b.ToTable("Chapters");
 27530
 27531                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27532                });
 533
 27534            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27535                {
 27536                    b.Property<int>("Id")
 27537                        .ValueGeneratedOnAdd()
 27538                        .HasColumnType("INTEGER");
 27539
 27540                    b.Property<string>("Client")
 27541                        .IsRequired()
 27542                        .HasMaxLength(32)
 27543                        .HasColumnType("TEXT");
 27544
 27545                    b.Property<Guid>("ItemId")
 27546                        .HasColumnType("TEXT");
 27547
 27548                    b.Property<string>("Key")
 27549                        .IsRequired()
 27550                        .HasColumnType("TEXT");
 27551
 27552                    b.Property<Guid>("UserId")
 27553                        .HasColumnType("TEXT");
 27554
 27555                    b.Property<string>("Value")
 27556                        .HasColumnType("TEXT");
 27557
 27558                    b.HasKey("Id");
 27559
 27560                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27561                        .IsUnique();
 27562
 27563                    b.ToTable("CustomItemDisplayPreferences");
 27564
 27565                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27566                });
 567
 27568            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27569                {
 27570                    b.Property<int>("Id")
 27571                        .ValueGeneratedOnAdd()
 27572                        .HasColumnType("INTEGER");
 27573
 27574                    b.Property<int>("ChromecastVersion")
 27575                        .HasColumnType("INTEGER");
 27576
 27577                    b.Property<string>("Client")
 27578                        .IsRequired()
 27579                        .HasMaxLength(32)
 27580                        .HasColumnType("TEXT");
 27581
 27582                    b.Property<string>("DashboardTheme")
 27583                        .HasMaxLength(32)
 27584                        .HasColumnType("TEXT");
 27585
 27586                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27587                        .HasColumnType("INTEGER");
 27588
 27589                    b.Property<int?>("IndexBy")
 27590                        .HasColumnType("INTEGER");
 27591
 27592                    b.Property<Guid>("ItemId")
 27593                        .HasColumnType("TEXT");
 27594
 27595                    b.Property<int>("ScrollDirection")
 27596                        .HasColumnType("INTEGER");
 27597
 27598                    b.Property<bool>("ShowBackdrop")
 27599                        .HasColumnType("INTEGER");
 27600
 27601                    b.Property<bool>("ShowSidebar")
 27602                        .HasColumnType("INTEGER");
 27603
 27604                    b.Property<int>("SkipBackwardLength")
 27605                        .HasColumnType("INTEGER");
 27606
 27607                    b.Property<int>("SkipForwardLength")
 27608                        .HasColumnType("INTEGER");
 27609
 27610                    b.Property<string>("TvHome")
 27611                        .HasMaxLength(32)
 27612                        .HasColumnType("TEXT");
 27613
 27614                    b.Property<Guid>("UserId")
 27615                        .HasColumnType("TEXT");
 27616
 27617                    b.HasKey("Id");
 27618
 27619                    b.HasIndex("UserId", "ItemId", "Client")
 27620                        .IsUnique();
 27621
 27622                    b.ToTable("DisplayPreferences");
 27623
 27624                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27625                });
 626
 27627            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27628                {
 27629                    b.Property<int>("Id")
 27630                        .ValueGeneratedOnAdd()
 27631                        .HasColumnType("INTEGER");
 27632
 27633                    b.Property<int>("DisplayPreferencesId")
 27634                        .HasColumnType("INTEGER");
 27635
 27636                    b.Property<int>("Order")
 27637                        .HasColumnType("INTEGER");
 27638
 27639                    b.Property<int>("Type")
 27640                        .HasColumnType("INTEGER");
 27641
 27642                    b.HasKey("Id");
 27643
 27644                    b.HasIndex("DisplayPreferencesId");
 27645
 27646                    b.ToTable("HomeSection");
 27647
 27648                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27649                });
 650
 27651            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27652                {
 27653                    b.Property<int>("Id")
 27654                        .ValueGeneratedOnAdd()
 27655                        .HasColumnType("INTEGER");
 27656
 27657                    b.Property<DateTime>("LastModified")
 27658                        .HasColumnType("TEXT");
 27659
 27660                    b.Property<string>("Path")
 27661                        .IsRequired()
 27662                        .HasMaxLength(512)
 27663                        .HasColumnType("TEXT");
 27664
 27665                    b.Property<Guid?>("UserId")
 27666                        .HasColumnType("TEXT");
 27667
 27668                    b.HasKey("Id");
 27669
 27670                    b.HasIndex("UserId")
 27671                        .IsUnique();
 27672
 27673                    b.ToTable("ImageInfos");
 27674
 27675                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27676                });
 677
 27678            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27679                {
 27680                    b.Property<int>("Id")
 27681                        .ValueGeneratedOnAdd()
 27682                        .HasColumnType("INTEGER");
 27683
 27684                    b.Property<string>("Client")
 27685                        .IsRequired()
 27686                        .HasMaxLength(32)
 27687                        .HasColumnType("TEXT");
 27688
 27689                    b.Property<int?>("IndexBy")
 27690                        .HasColumnType("INTEGER");
 27691
 27692                    b.Property<Guid>("ItemId")
 27693                        .HasColumnType("TEXT");
 27694
 27695                    b.Property<bool>("RememberIndexing")
 27696                        .HasColumnType("INTEGER");
 27697
 27698                    b.Property<bool>("RememberSorting")
 27699                        .HasColumnType("INTEGER");
 27700
 27701                    b.Property<string>("SortBy")
 27702                        .IsRequired()
 27703                        .HasMaxLength(64)
 27704                        .HasColumnType("TEXT");
 27705
 27706                    b.Property<int>("SortOrder")
 27707                        .HasColumnType("INTEGER");
 27708
 27709                    b.Property<Guid>("UserId")
 27710                        .HasColumnType("TEXT");
 27711
 27712                    b.Property<int>("ViewType")
 27713                        .HasColumnType("INTEGER");
 27714
 27715                    b.HasKey("Id");
 27716
 27717                    b.HasIndex("UserId");
 27718
 27719                    b.ToTable("ItemDisplayPreferences");
 27720
 27721                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27722                });
 723
 27724            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27725                {
 27726                    b.Property<Guid>("ItemValueId")
 27727                        .ValueGeneratedOnAdd()
 27728                        .HasColumnType("TEXT");
 27729
 27730                    b.Property<string>("CleanValue")
 27731                        .IsRequired()
 27732                        .HasColumnType("TEXT");
 27733
 27734                    b.Property<int>("Type")
 27735                        .HasColumnType("INTEGER");
 27736
 27737                    b.Property<string>("Value")
 27738                        .IsRequired()
 27739                        .HasColumnType("TEXT");
 27740
 27741                    b.HasKey("ItemValueId");
 27742
 27743                    b.HasIndex("Type", "CleanValue");
 27744
 27745                    b.HasIndex("Type", "Value")
 27746                        .IsUnique();
 27747
 27748                    b.ToTable("ItemValues");
 27749
 27750                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27751                });
 752
 27753            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27754                {
 27755                    b.Property<Guid>("ItemValueId")
 27756                        .HasColumnType("TEXT");
 27757
 27758                    b.Property<Guid>("ItemId")
 27759                        .HasColumnType("TEXT");
 27760
 27761                    b.HasKey("ItemValueId", "ItemId");
 27762
 27763                    b.HasIndex("ItemId");
 27764
 27765                    b.ToTable("ItemValuesMap");
 27766
 27767                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27768                });
 769
 27770            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27771                {
 27772                    b.Property<Guid>("ItemId")
 27773                        .HasColumnType("TEXT");
 27774
 27775                    b.PrimitiveCollection<string>("KeyframeTicks")
 27776                        .HasColumnType("TEXT");
 27777
 27778                    b.Property<long>("TotalDuration")
 27779                        .HasColumnType("INTEGER");
 27780
 27781                    b.HasKey("ItemId");
 27782
 27783                    b.ToTable("KeyframeData");
 27784
 27785                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27786                });
 787
 27788            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27789                {
 27790                    b.Property<Guid>("Id")
 27791                        .ValueGeneratedOnAdd()
 27792                        .HasColumnType("TEXT");
 27793
 27794                    b.Property<long>("EndTicks")
 27795                        .HasColumnType("INTEGER");
 27796
 27797                    b.Property<Guid>("ItemId")
 27798                        .HasColumnType("TEXT");
 27799
 27800                    b.Property<string>("SegmentProviderId")
 27801                        .IsRequired()
 27802                        .HasColumnType("TEXT");
 27803
 27804                    b.Property<long>("StartTicks")
 27805                        .HasColumnType("INTEGER");
 27806
 27807                    b.Property<int>("Type")
 27808                        .HasColumnType("INTEGER");
 27809
 27810                    b.HasKey("Id");
 27811
 27812                    b.ToTable("MediaSegments");
 27813
 27814                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27815                });
 816
 27817            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27818                {
 27819                    b.Property<Guid>("ItemId")
 27820                        .HasColumnType("TEXT");
 27821
 27822                    b.Property<int>("StreamIndex")
 27823                        .HasColumnType("INTEGER");
 27824
 27825                    b.Property<string>("AspectRatio")
 27826                        .HasColumnType("TEXT");
 27827
 27828                    b.Property<float?>("AverageFrameRate")
 27829                        .HasColumnType("REAL");
 27830
 27831                    b.Property<int?>("BitDepth")
 27832                        .HasColumnType("INTEGER");
 27833
 27834                    b.Property<int?>("BitRate")
 27835                        .HasColumnType("INTEGER");
 27836
 27837                    b.Property<int?>("BlPresentFlag")
 27838                        .HasColumnType("INTEGER");
 27839
 27840                    b.Property<string>("ChannelLayout")
 27841                        .HasColumnType("TEXT");
 27842
 27843                    b.Property<int?>("Channels")
 27844                        .HasColumnType("INTEGER");
 27845
 27846                    b.Property<string>("Codec")
 27847                        .HasColumnType("TEXT");
 27848
 27849                    b.Property<string>("CodecTag")
 27850                        .HasColumnType("TEXT");
 27851
 27852                    b.Property<string>("CodecTimeBase")
 27853                        .HasColumnType("TEXT");
 27854
 27855                    b.Property<string>("ColorPrimaries")
 27856                        .HasColumnType("TEXT");
 27857
 27858                    b.Property<string>("ColorSpace")
 27859                        .HasColumnType("TEXT");
 27860
 27861                    b.Property<string>("ColorTransfer")
 27862                        .HasColumnType("TEXT");
 27863
 27864                    b.Property<string>("Comment")
 27865                        .HasColumnType("TEXT");
 27866
 27867                    b.Property<int?>("DvBlSignalCompatibilityId")
 27868                        .HasColumnType("INTEGER");
 27869
 27870                    b.Property<int?>("DvLevel")
 27871                        .HasColumnType("INTEGER");
 27872
 27873                    b.Property<int?>("DvProfile")
 27874                        .HasColumnType("INTEGER");
 27875
 27876                    b.Property<int?>("DvVersionMajor")
 27877                        .HasColumnType("INTEGER");
 27878
 27879                    b.Property<int?>("DvVersionMinor")
 27880                        .HasColumnType("INTEGER");
 27881
 27882                    b.Property<int?>("ElPresentFlag")
 27883                        .HasColumnType("INTEGER");
 27884
 27885                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27886                        .HasColumnType("INTEGER");
 27887
 27888                    b.Property<int?>("Height")
 27889                        .HasColumnType("INTEGER");
 27890
 27891                    b.Property<bool?>("IsAnamorphic")
 27892                        .HasColumnType("INTEGER");
 27893
 27894                    b.Property<bool?>("IsAvc")
 27895                        .HasColumnType("INTEGER");
 27896
 27897                    b.Property<bool>("IsDefault")
 27898                        .HasColumnType("INTEGER");
 27899
 27900                    b.Property<bool>("IsExternal")
 27901                        .HasColumnType("INTEGER");
 27902
 27903                    b.Property<bool>("IsForced")
 27904                        .HasColumnType("INTEGER");
 27905
 27906                    b.Property<bool?>("IsHearingImpaired")
 27907                        .HasColumnType("INTEGER");
 27908
 27909                    b.Property<bool?>("IsInterlaced")
 27910                        .HasColumnType("INTEGER");
 27911
 27912                    b.Property<string>("KeyFrames")
 27913                        .HasColumnType("TEXT");
 27914
 27915                    b.Property<string>("Language")
 27916                        .HasColumnType("TEXT");
 27917
 27918                    b.Property<float?>("Level")
 27919                        .HasColumnType("REAL");
 27920
 27921                    b.Property<string>("NalLengthSize")
 27922                        .HasColumnType("TEXT");
 27923
 27924                    b.Property<string>("Path")
 27925                        .HasColumnType("TEXT");
 27926
 27927                    b.Property<string>("PixelFormat")
 27928                        .HasColumnType("TEXT");
 27929
 27930                    b.Property<string>("Profile")
 27931                        .HasColumnType("TEXT");
 27932
 27933                    b.Property<float?>("RealFrameRate")
 27934                        .HasColumnType("REAL");
 27935
 27936                    b.Property<int?>("RefFrames")
 27937                        .HasColumnType("INTEGER");
 27938
 27939                    b.Property<int?>("Rotation")
 27940                        .HasColumnType("INTEGER");
 27941
 27942                    b.Property<int?>("RpuPresentFlag")
 27943                        .HasColumnType("INTEGER");
 27944
 27945                    b.Property<int?>("SampleRate")
 27946                        .HasColumnType("INTEGER");
 27947
 27948                    b.Property<int>("StreamType")
 27949                        .HasColumnType("INTEGER");
 27950
 27951                    b.Property<string>("TimeBase")
 27952                        .HasColumnType("TEXT");
 27953
 27954                    b.Property<string>("Title")
 27955                        .HasColumnType("TEXT");
 27956
 27957                    b.Property<int?>("Width")
 27958                        .HasColumnType("INTEGER");
 27959
 27960                    b.HasKey("ItemId", "StreamIndex");
 27961
 27962                    b.HasIndex("StreamIndex");
 27963
 27964                    b.HasIndex("StreamType");
 27965
 27966                    b.HasIndex("StreamIndex", "StreamType");
 27967
 27968                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27969
 27970                    b.ToTable("MediaStreamInfos");
 27971
 27972                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27973                });
 974
 27975            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 27976                {
 27977                    b.Property<Guid>("Id")
 27978                        .ValueGeneratedOnAdd()
 27979                        .HasColumnType("TEXT");
 27980
 27981                    b.Property<string>("Name")
 27982                        .IsRequired()
 27983                        .HasColumnType("TEXT");
 27984
 27985                    b.Property<string>("PersonType")
 27986                        .HasColumnType("TEXT");
 27987
 27988                    b.HasKey("Id");
 27989
 27990                    b.HasIndex("Name");
 27991
 27992                    b.ToTable("Peoples");
 27993
 27994                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27995                });
 996
 27997            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 27998                {
 27999                    b.Property<Guid>("ItemId")
 271000                        .HasColumnType("TEXT");
 271001
 271002                    b.Property<Guid>("PeopleId")
 271003                        .HasColumnType("TEXT");
 271004
 271005                    b.Property<int?>("ListOrder")
 271006                        .HasColumnType("INTEGER");
 271007
 271008                    b.Property<string>("Role")
 271009                        .HasColumnType("TEXT");
 271010
 271011                    b.Property<int?>("SortOrder")
 271012                        .HasColumnType("INTEGER");
 271013
 271014                    b.HasKey("ItemId", "PeopleId");
 271015
 271016                    b.HasIndex("PeopleId");
 271017
 271018                    b.HasIndex("ItemId", "ListOrder");
 271019
 271020                    b.HasIndex("ItemId", "SortOrder");
 271021
 271022                    b.ToTable("PeopleBaseItemMap");
 271023
 271024                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271025                });
 1026
 271027            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271028                {
 271029                    b.Property<int>("Id")
 271030                        .ValueGeneratedOnAdd()
 271031                        .HasColumnType("INTEGER");
 271032
 271033                    b.Property<int>("Kind")
 271034                        .HasColumnType("INTEGER");
 271035
 271036                    b.Property<Guid?>("Permission_Permissions_Guid")
 271037                        .HasColumnType("TEXT");
 271038
 271039                    b.Property<uint>("RowVersion")
 271040                        .IsConcurrencyToken()
 271041                        .HasColumnType("INTEGER");
 271042
 271043                    b.Property<Guid?>("UserId")
 271044                        .HasColumnType("TEXT");
 271045
 271046                    b.Property<bool>("Value")
 271047                        .HasColumnType("INTEGER");
 271048
 271049                    b.HasKey("Id");
 271050
 271051                    b.HasIndex("UserId", "Kind")
 271052                        .IsUnique()
 271053                        .HasFilter("[UserId] IS NOT NULL");
 271054
 271055                    b.ToTable("Permissions");
 271056
 271057                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271058                });
 1059
 271060            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271061                {
 271062                    b.Property<int>("Id")
 271063                        .ValueGeneratedOnAdd()
 271064                        .HasColumnType("INTEGER");
 271065
 271066                    b.Property<int>("Kind")
 271067                        .HasColumnType("INTEGER");
 271068
 271069                    b.Property<Guid?>("Preference_Preferences_Guid")
 271070                        .HasColumnType("TEXT");
 271071
 271072                    b.Property<uint>("RowVersion")
 271073                        .IsConcurrencyToken()
 271074                        .HasColumnType("INTEGER");
 271075
 271076                    b.Property<Guid?>("UserId")
 271077                        .HasColumnType("TEXT");
 271078
 271079                    b.Property<string>("Value")
 271080                        .IsRequired()
 271081                        .HasMaxLength(65535)
 271082                        .HasColumnType("TEXT");
 271083
 271084                    b.HasKey("Id");
 271085
 271086                    b.HasIndex("UserId", "Kind")
 271087                        .IsUnique()
 271088                        .HasFilter("[UserId] IS NOT NULL");
 271089
 271090                    b.ToTable("Preferences");
 271091
 271092                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271093                });
 1094
 271095            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271096                {
 271097                    b.Property<int>("Id")
 271098                        .ValueGeneratedOnAdd()
 271099                        .HasColumnType("INTEGER");
 271100
 271101                    b.Property<string>("AccessToken")
 271102                        .IsRequired()
 271103                        .HasColumnType("TEXT");
 271104
 271105                    b.Property<DateTime>("DateCreated")
 271106                        .HasColumnType("TEXT");
 271107
 271108                    b.Property<DateTime>("DateLastActivity")
 271109                        .HasColumnType("TEXT");
 271110
 271111                    b.Property<string>("Name")
 271112                        .IsRequired()
 271113                        .HasMaxLength(64)
 271114                        .HasColumnType("TEXT");
 271115
 271116                    b.HasKey("Id");
 271117
 271118                    b.HasIndex("AccessToken")
 271119                        .IsUnique();
 271120
 271121                    b.ToTable("ApiKeys");
 271122
 271123                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271124                });
 1125
 271126            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271127                {
 271128                    b.Property<int>("Id")
 271129                        .ValueGeneratedOnAdd()
 271130                        .HasColumnType("INTEGER");
 271131
 271132                    b.Property<string>("AccessToken")
 271133                        .IsRequired()
 271134                        .HasColumnType("TEXT");
 271135
 271136                    b.Property<string>("AppName")
 271137                        .IsRequired()
 271138                        .HasMaxLength(64)
 271139                        .HasColumnType("TEXT");
 271140
 271141                    b.Property<string>("AppVersion")
 271142                        .IsRequired()
 271143                        .HasMaxLength(32)
 271144                        .HasColumnType("TEXT");
 271145
 271146                    b.Property<DateTime>("DateCreated")
 271147                        .HasColumnType("TEXT");
 271148
 271149                    b.Property<DateTime>("DateLastActivity")
 271150                        .HasColumnType("TEXT");
 271151
 271152                    b.Property<DateTime>("DateModified")
 271153                        .HasColumnType("TEXT");
 271154
 271155                    b.Property<string>("DeviceId")
 271156                        .IsRequired()
 271157                        .HasMaxLength(256)
 271158                        .HasColumnType("TEXT");
 271159
 271160                    b.Property<string>("DeviceName")
 271161                        .IsRequired()
 271162                        .HasMaxLength(64)
 271163                        .HasColumnType("TEXT");
 271164
 271165                    b.Property<bool>("IsActive")
 271166                        .HasColumnType("INTEGER");
 271167
 271168                    b.Property<Guid>("UserId")
 271169                        .HasColumnType("TEXT");
 271170
 271171                    b.HasKey("Id");
 271172
 271173                    b.HasIndex("DeviceId");
 271174
 271175                    b.HasIndex("AccessToken", "DateLastActivity");
 271176
 271177                    b.HasIndex("DeviceId", "DateLastActivity");
 271178
 271179                    b.HasIndex("UserId", "DeviceId");
 271180
 271181                    b.ToTable("Devices");
 271182
 271183                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271184                });
 1185
 271186            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271187                {
 271188                    b.Property<int>("Id")
 271189                        .ValueGeneratedOnAdd()
 271190                        .HasColumnType("INTEGER");
 271191
 271192                    b.Property<string>("CustomName")
 271193                        .HasColumnType("TEXT");
 271194
 271195                    b.Property<string>("DeviceId")
 271196                        .IsRequired()
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.HasKey("Id");
 271200
 271201                    b.HasIndex("DeviceId")
 271202                        .IsUnique();
 271203
 271204                    b.ToTable("DeviceOptions");
 271205
 271206                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271207                });
 1208
 271209            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271210                {
 271211                    b.Property<Guid>("ItemId")
 271212                        .HasColumnType("TEXT");
 271213
 271214                    b.Property<int>("Width")
 271215                        .HasColumnType("INTEGER");
 271216
 271217                    b.Property<int>("Bandwidth")
 271218                        .HasColumnType("INTEGER");
 271219
 271220                    b.Property<int>("Height")
 271221                        .HasColumnType("INTEGER");
 271222
 271223                    b.Property<int>("Interval")
 271224                        .HasColumnType("INTEGER");
 271225
 271226                    b.Property<int>("ThumbnailCount")
 271227                        .HasColumnType("INTEGER");
 271228
 271229                    b.Property<int>("TileHeight")
 271230                        .HasColumnType("INTEGER");
 271231
 271232                    b.Property<int>("TileWidth")
 271233                        .HasColumnType("INTEGER");
 271234
 271235                    b.HasKey("ItemId", "Width");
 271236
 271237                    b.ToTable("TrickplayInfos");
 271238
 271239                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271240                });
 1241
 271242            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271243                {
 271244                    b.Property<Guid>("Id")
 271245                        .ValueGeneratedOnAdd()
 271246                        .HasColumnType("TEXT");
 271247
 271248                    b.Property<string>("AudioLanguagePreference")
 271249                        .HasMaxLength(255)
 271250                        .HasColumnType("TEXT");
 271251
 271252                    b.Property<string>("AuthenticationProviderId")
 271253                        .IsRequired()
 271254                        .HasMaxLength(255)
 271255                        .HasColumnType("TEXT");
 271256
 271257                    b.Property<string>("CastReceiverId")
 271258                        .HasMaxLength(32)
 271259                        .HasColumnType("TEXT");
 271260
 271261                    b.Property<bool>("DisplayCollectionsView")
 271262                        .HasColumnType("INTEGER");
 271263
 271264                    b.Property<bool>("DisplayMissingEpisodes")
 271265                        .HasColumnType("INTEGER");
 271266
 271267                    b.Property<bool>("EnableAutoLogin")
 271268                        .HasColumnType("INTEGER");
 271269
 271270                    b.Property<bool>("EnableLocalPassword")
 271271                        .HasColumnType("INTEGER");
 271272
 271273                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271274                        .HasColumnType("INTEGER");
 271275
 271276                    b.Property<bool>("EnableUserPreferenceAccess")
 271277                        .HasColumnType("INTEGER");
 271278
 271279                    b.Property<bool>("HidePlayedInLatest")
 271280                        .HasColumnType("INTEGER");
 271281
 271282                    b.Property<long>("InternalId")
 271283                        .HasColumnType("INTEGER");
 271284
 271285                    b.Property<int>("InvalidLoginAttemptCount")
 271286                        .HasColumnType("INTEGER");
 271287
 271288                    b.Property<DateTime?>("LastActivityDate")
 271289                        .HasColumnType("TEXT");
 271290
 271291                    b.Property<DateTime?>("LastLoginDate")
 271292                        .HasColumnType("TEXT");
 271293
 271294                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271295                        .HasColumnType("INTEGER");
 271296
 271297                    b.Property<int>("MaxActiveSessions")
 271298                        .HasColumnType("INTEGER");
 271299
 271300                    b.Property<int?>("MaxParentalRatingScore")
 271301                        .HasColumnType("INTEGER");
 271302
 271303                    b.Property<int?>("MaxParentalRatingSubScore")
 271304                        .HasColumnType("INTEGER");
 271305
 271306                    b.Property<bool>("MustUpdatePassword")
 271307                        .HasColumnType("INTEGER");
 271308
 271309                    b.Property<string>("Password")
 271310                        .HasMaxLength(65535)
 271311                        .HasColumnType("TEXT");
 271312
 271313                    b.Property<string>("PasswordResetProviderId")
 271314                        .IsRequired()
 271315                        .HasMaxLength(255)
 271316                        .HasColumnType("TEXT");
 271317
 271318                    b.Property<bool>("PlayDefaultAudioTrack")
 271319                        .HasColumnType("INTEGER");
 271320
 271321                    b.Property<bool>("RememberAudioSelections")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<bool>("RememberSubtitleSelections")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<int?>("RemoteClientBitrateLimit")
 271328                        .HasColumnType("INTEGER");
 271329
 271330                    b.Property<uint>("RowVersion")
 271331                        .IsConcurrencyToken()
 271332                        .HasColumnType("INTEGER");
 271333
 271334                    b.Property<string>("SubtitleLanguagePreference")
 271335                        .HasMaxLength(255)
 271336                        .HasColumnType("TEXT");
 271337
 271338                    b.Property<int>("SubtitleMode")
 271339                        .HasColumnType("INTEGER");
 271340
 271341                    b.Property<int>("SyncPlayAccess")
 271342                        .HasColumnType("INTEGER");
 271343
 271344                    b.Property<string>("Username")
 271345                        .IsRequired()
 271346                        .HasMaxLength(255)
 271347                        .HasColumnType("TEXT");
 271348
 271349                    b.HasKey("Id");
 271350
 271351                    b.HasIndex("Username")
 271352                        .IsUnique();
 271353
 271354                    b.ToTable("Users");
 271355
 271356                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271357                });
 1358
 271359            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271360                {
 271361                    b.Property<Guid>("ItemId")
 271362                        .HasColumnType("TEXT");
 271363
 271364                    b.Property<Guid>("UserId")
 271365                        .HasColumnType("TEXT");
 271366
 271367                    b.Property<string>("CustomDataKey")
 271368                        .HasColumnType("TEXT");
 271369
 271370                    b.Property<int?>("AudioStreamIndex")
 271371                        .HasColumnType("INTEGER");
 271372
 271373                    b.Property<bool>("IsFavorite")
 271374                        .HasColumnType("INTEGER");
 271375
 271376                    b.Property<DateTime?>("LastPlayedDate")
 271377                        .HasColumnType("TEXT");
 271378
 271379                    b.Property<bool?>("Likes")
 271380                        .HasColumnType("INTEGER");
 271381
 271382                    b.Property<int>("PlayCount")
 271383                        .HasColumnType("INTEGER");
 271384
 271385                    b.Property<long>("PlaybackPositionTicks")
 271386                        .HasColumnType("INTEGER");
 271387
 271388                    b.Property<bool>("Played")
 271389                        .HasColumnType("INTEGER");
 271390
 271391                    b.Property<double?>("Rating")
 271392                        .HasColumnType("REAL");
 271393
 271394                    b.Property<DateTime?>("RetentionDate")
 271395                        .HasColumnType("TEXT");
 271396
 271397                    b.Property<int?>("SubtitleStreamIndex")
 271398                        .HasColumnType("INTEGER");
 271399
 271400                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271401
 271402                    b.HasIndex("UserId");
 271403
 271404                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271405
 271406                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271407
 271408                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271409
 271410                    b.HasIndex("ItemId", "UserId", "Played");
 271411
 271412                    b.ToTable("UserData");
 271413
 271414                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271415                });
 1416
 271417            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271418                {
 271419                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271420                        .WithMany("AccessSchedules")
 271421                        .HasForeignKey("UserId")
 271422                        .OnDelete(DeleteBehavior.Cascade)
 271423                        .IsRequired();
 271424                });
 1425
 271426            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271427                {
 271428                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271429                        .WithMany("Parents")
 271430                        .HasForeignKey("ItemId")
 271431                        .OnDelete(DeleteBehavior.Cascade)
 271432                        .IsRequired();
 271433
 271434                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271435                        .WithMany("Children")
 271436                        .HasForeignKey("ParentItemId")
 271437                        .OnDelete(DeleteBehavior.Cascade)
 271438                        .IsRequired();
 271439
 271440                    b.Navigation("Item");
 271441
 271442                    b.Navigation("ParentItem");
 271443                });
 1444
 271445            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271446                {
 271447                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271448                        .WithMany()
 271449                        .HasForeignKey("ItemId")
 271450                        .OnDelete(DeleteBehavior.Cascade)
 271451                        .IsRequired();
 271452
 271453                    b.Navigation("Item");
 271454                });
 1455
 271456            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271457                {
 271458                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271459                        .WithMany("Images")
 271460                        .HasForeignKey("ItemId")
 271461                        .OnDelete(DeleteBehavior.Cascade)
 271462                        .IsRequired();
 271463
 271464                    b.Navigation("Item");
 271465                });
 1466
 271467            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271468                {
 271469                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271470                        .WithMany("LockedFields")
 271471                        .HasForeignKey("ItemId")
 271472                        .OnDelete(DeleteBehavior.Cascade)
 271473                        .IsRequired();
 271474
 271475                    b.Navigation("Item");
 271476                });
 1477
 271478            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271479                {
 271480                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271481                        .WithMany("Provider")
 271482                        .HasForeignKey("ItemId")
 271483                        .OnDelete(DeleteBehavior.Cascade)
 271484                        .IsRequired();
 271485
 271486                    b.Navigation("Item");
 271487                });
 1488
 271489            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271490                {
 271491                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271492                        .WithMany("TrailerTypes")
 271493                        .HasForeignKey("ItemId")
 271494                        .OnDelete(DeleteBehavior.Cascade)
 271495                        .IsRequired();
 271496
 271497                    b.Navigation("Item");
 271498                });
 1499
 271500            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271501                {
 271502                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271503                        .WithMany("Chapters")
 271504                        .HasForeignKey("ItemId")
 271505                        .OnDelete(DeleteBehavior.Cascade)
 271506                        .IsRequired();
 271507
 271508                    b.Navigation("Item");
 271509                });
 1510
 271511            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271512                {
 271513                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271514                        .WithMany("DisplayPreferences")
 271515                        .HasForeignKey("UserId")
 271516                        .OnDelete(DeleteBehavior.Cascade)
 271517                        .IsRequired();
 271518                });
 1519
 271520            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271521                {
 271522                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271523                        .WithMany("HomeSections")
 271524                        .HasForeignKey("DisplayPreferencesId")
 271525                        .OnDelete(DeleteBehavior.Cascade)
 271526                        .IsRequired();
 271527                });
 1528
 271529            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271530                {
 271531                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271532                        .WithOne("ProfileImage")
 271533                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271534                        .OnDelete(DeleteBehavior.Cascade);
 271535                });
 1536
 271537            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271538                {
 271539                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271540                        .WithMany("ItemDisplayPreferences")
 271541                        .HasForeignKey("UserId")
 271542                        .OnDelete(DeleteBehavior.Cascade)
 271543                        .IsRequired();
 271544                });
 1545
 271546            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271547                {
 271548                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271549                        .WithMany("ItemValues")
 271550                        .HasForeignKey("ItemId")
 271551                        .OnDelete(DeleteBehavior.Cascade)
 271552                        .IsRequired();
 271553
 271554                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271555                        .WithMany("BaseItemsMap")
 271556                        .HasForeignKey("ItemValueId")
 271557                        .OnDelete(DeleteBehavior.Cascade)
 271558                        .IsRequired();
 271559
 271560                    b.Navigation("Item");
 271561
 271562                    b.Navigation("ItemValue");
 271563                });
 1564
 271565            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271566                {
 271567                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271568                        .WithMany()
 271569                        .HasForeignKey("ItemId")
 271570                        .OnDelete(DeleteBehavior.Cascade)
 271571                        .IsRequired();
 271572
 271573                    b.Navigation("Item");
 271574                });
 1575
 271576            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271577                {
 271578                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271579                        .WithMany("MediaStreams")
 271580                        .HasForeignKey("ItemId")
 271581                        .OnDelete(DeleteBehavior.Cascade)
 271582                        .IsRequired();
 271583
 271584                    b.Navigation("Item");
 271585                });
 1586
 271587            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271588                {
 271589                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271590                        .WithMany("Peoples")
 271591                        .HasForeignKey("ItemId")
 271592                        .OnDelete(DeleteBehavior.Cascade)
 271593                        .IsRequired();
 271594
 271595                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271596                        .WithMany("BaseItems")
 271597                        .HasForeignKey("PeopleId")
 271598                        .OnDelete(DeleteBehavior.Cascade)
 271599                        .IsRequired();
 271600
 271601                    b.Navigation("Item");
 271602
 271603                    b.Navigation("People");
 271604                });
 1605
 271606            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271607                {
 271608                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271609                        .WithMany("Permissions")
 271610                        .HasForeignKey("UserId")
 271611                        .OnDelete(DeleteBehavior.Cascade);
 271612                });
 1613
 271614            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271615                {
 271616                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271617                        .WithMany("Preferences")
 271618                        .HasForeignKey("UserId")
 271619                        .OnDelete(DeleteBehavior.Cascade);
 271620                });
 1621
 271622            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271623                {
 271624                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271625                        .WithMany()
 271626                        .HasForeignKey("UserId")
 271627                        .OnDelete(DeleteBehavior.Cascade)
 271628                        .IsRequired();
 271629
 271630                    b.Navigation("User");
 271631                });
 1632
 271633            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271634                {
 271635                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271636                        .WithMany("UserData")
 271637                        .HasForeignKey("ItemId")
 271638                        .OnDelete(DeleteBehavior.Cascade)
 271639                        .IsRequired();
 271640
 271641                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271642                        .WithMany()
 271643                        .HasForeignKey("UserId")
 271644                        .OnDelete(DeleteBehavior.Cascade)
 271645                        .IsRequired();
 271646
 271647                    b.Navigation("Item");
 271648
 271649                    b.Navigation("User");
 271650                });
 1651
 271652            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271653                {
 271654                    b.Navigation("Chapters");
 271655
 271656                    b.Navigation("Children");
 271657
 271658                    b.Navigation("Images");
 271659
 271660                    b.Navigation("ItemValues");
 271661
 271662                    b.Navigation("LockedFields");
 271663
 271664                    b.Navigation("MediaStreams");
 271665
 271666                    b.Navigation("Parents");
 271667
 271668                    b.Navigation("Peoples");
 271669
 271670                    b.Navigation("Provider");
 271671
 271672                    b.Navigation("TrailerTypes");
 271673
 271674                    b.Navigation("UserData");
 271675                });
 1676
 271677            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271678                {
 271679                    b.Navigation("HomeSections");
 271680                });
 1681
 271682            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271683                {
 271684                    b.Navigation("BaseItemsMap");
 271685                });
 1686
 271687            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271688                {
 271689                    b.Navigation("BaseItems");
 271690                });
 1691
 271692            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271693                {
 271694                    b.Navigation("AccessSchedules");
 271695
 271696                    b.Navigation("DisplayPreferences");
 271697
 271698                    b.Navigation("ItemDisplayPreferences");
 271699
 271700                    b.Navigation("Permissions");
 271701
 271702                    b.Navigation("Preferences");
 271703
 271704                    b.Navigation("ProfileImage");
 271705                });
 1706#pragma warning restore 612, 618
 271707        }
 1708    }
 1709}