< Summary - Jellyfin

Line coverage
99%
Covered lines: 1737
Uncovered lines: 4
Coverable lines: 1741
Total lines: 1840
Line coverage: 99.7%
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 10/29/2026 - 12:17:11 AM Line coverage: 99.7% (1737/1741) Total lines: 1840

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/20260812050902_AddMediaStreamFilterIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddMediaStreamFilterIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.CreateIndex(
 2714                name: "IX_MediaStreamInfos_StreamType_ItemId_Language_IsExternal",
 2715                table: "MediaStreamInfos",
 2716                columns: new[] { "StreamType", "ItemId", "Language", "IsExternal" });
 2717        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_MediaStreamInfos_StreamType_ItemId_Language_IsExternal",
 024                table: "MediaStreamInfos");
 025        }
 26    }
 27}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260812050902_AddMediaStreamFilterIndex.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260812050902_AddMediaStreamFilterIndex")]
 15    partial class AddMediaStreamFilterIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2721            modelBuilder.HasAnnotation("ProductVersion", "10.0.10");
 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<int?>("ExtraType")
 27214                        .HasColumnType("INTEGER");
 27215
 27216                    b.Property<string>("ForcedSortName")
 27217                        .HasColumnType("TEXT");
 27218
 27219                    b.Property<string>("Genres")
 27220                        .HasColumnType("TEXT");
 27221
 27222                    b.Property<int?>("Height")
 27223                        .HasColumnType("INTEGER");
 27224
 27225                    b.Property<int?>("IndexNumber")
 27226                        .HasColumnType("INTEGER");
 27227
 27228                    b.Property<int?>("InheritedParentalRatingSubValue")
 27229                        .HasColumnType("INTEGER");
 27230
 27231                    b.Property<int?>("InheritedParentalRatingValue")
 27232                        .HasColumnType("INTEGER");
 27233
 27234                    b.Property<bool>("IsFolder")
 27235                        .HasColumnType("INTEGER");
 27236
 27237                    b.Property<bool>("IsInMixedFolder")
 27238                        .HasColumnType("INTEGER");
 27239
 27240                    b.Property<bool>("IsLocked")
 27241                        .HasColumnType("INTEGER");
 27242
 27243                    b.Property<bool>("IsMovie")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<bool>("IsRepeat")
 27247                        .HasColumnType("INTEGER");
 27248
 27249                    b.Property<bool>("IsSeries")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("IsVirtualItem")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<float?>("LUFS")
 27256                        .HasColumnType("REAL");
 27257
 27258                    b.Property<string>("MediaType")
 27259                        .HasColumnType("TEXT");
 27260
 27261                    b.Property<string>("Name")
 27262                        .HasColumnType("TEXT");
 27263
 27264                    b.Property<float?>("NormalizationGain")
 27265                        .HasColumnType("REAL");
 27266
 27267                    b.Property<string>("OfficialRating")
 27268                        .HasColumnType("TEXT");
 27269
 27270                    b.Property<string>("OriginalLanguage")
 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<Guid?>("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<Guid?>("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("Name");
 27370
 27371                    b.HasIndex("OwnerId");
 27372
 27373                    b.HasIndex("ParentId");
 27374
 27375                    b.HasIndex("Path");
 27376
 27377                    b.HasIndex("PresentationUniqueKey");
 27378
 27379                    b.HasIndex("PrimaryVersionId")
 27380                        .HasFilter("\"PrimaryVersionId\" IS NOT NULL");
 27381
 27382                    b.HasIndex("SeasonId");
 27383
 27384                    b.HasIndex("SeriesId");
 27385
 27386                    b.HasIndex("SeriesName");
 27387
 27388                    b.HasIndex("ExtraType", "OwnerId");
 27389
 27390                    b.HasIndex("TopParentId", "Id");
 27391
 27392                    b.HasIndex("Type", "CleanName");
 27393
 27394                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 27395                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 27396
 27397                    b.HasIndex("Type", "TopParentId", "Id");
 27398
 27399                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27400
 27401                    b.HasIndex("Type", "TopParentId", "SortName");
 27402
 27403                    b.HasIndex("Type", "TopParentId", "StartDate");
 27404
 27405                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27406
 27407                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 27408
 27409                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 27410
 27411                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 27412
 27413                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27414
 27415                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 27416
 27417                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27418
 27419                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27420
 27421                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27422
 27423                    b.ToTable("BaseItems");
 27424
 27425                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27426
 27427                    b.HasData(
 27428                        new
 27429                        {
 27430                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27431                            IsFolder = false,
 27432                            IsInMixedFolder = false,
 27433                            IsLocked = false,
 27434                            IsMovie = false,
 27435                            IsRepeat = false,
 27436                            IsSeries = false,
 27437                            IsVirtualItem = false,
 27438                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 27439                            Type = "PLACEHOLDER"
 27440                        });
 27441                });
 442
 27443            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27444                {
 27445                    b.Property<Guid>("Id")
 27446                        .ValueGeneratedOnAdd()
 27447                        .HasColumnType("TEXT");
 27448
 27449                    b.Property<byte[]>("Blurhash")
 27450                        .HasColumnType("BLOB");
 27451
 27452                    b.Property<DateTime?>("DateModified")
 27453                        .HasColumnType("TEXT");
 27454
 27455                    b.Property<int>("Height")
 27456                        .HasColumnType("INTEGER");
 27457
 27458                    b.Property<int>("ImageType")
 27459                        .HasColumnType("INTEGER");
 27460
 27461                    b.Property<Guid>("ItemId")
 27462                        .HasColumnType("TEXT");
 27463
 27464                    b.Property<string>("Path")
 27465                        .IsRequired()
 27466                        .HasColumnType("TEXT");
 27467
 27468                    b.Property<int>("Width")
 27469                        .HasColumnType("INTEGER");
 27470
 27471                    b.HasKey("Id");
 27472
 27473                    b.HasIndex("ItemId", "ImageType");
 27474
 27475                    b.ToTable("BaseItemImageInfos");
 27476
 27477                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27478                });
 479
 27480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27481                {
 27482                    b.Property<int>("Id")
 27483                        .HasColumnType("INTEGER");
 27484
 27485                    b.Property<Guid>("ItemId")
 27486                        .HasColumnType("TEXT");
 27487
 27488                    b.HasKey("Id", "ItemId");
 27489
 27490                    b.HasIndex("ItemId");
 27491
 27492                    b.ToTable("BaseItemMetadataFields");
 27493
 27494                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27495                });
 496
 27497            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27498                {
 27499                    b.Property<Guid>("ItemId")
 27500                        .HasColumnType("TEXT");
 27501
 27502                    b.Property<string>("ProviderId")
 27503                        .HasColumnType("TEXT");
 27504
 27505                    b.Property<string>("ProviderValue")
 27506                        .IsRequired()
 27507                        .HasColumnType("TEXT");
 27508
 27509                    b.HasKey("ItemId", "ProviderId");
 27510
 27511                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 27512
 27513                    b.ToTable("BaseItemProviders");
 27514
 27515                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27516                });
 517
 27518            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27519                {
 27520                    b.Property<int>("Id")
 27521                        .HasColumnType("INTEGER");
 27522
 27523                    b.Property<Guid>("ItemId")
 27524                        .HasColumnType("TEXT");
 27525
 27526                    b.HasKey("Id", "ItemId");
 27527
 27528                    b.HasIndex("ItemId");
 27529
 27530                    b.ToTable("BaseItemTrailerTypes");
 27531
 27532                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27533                });
 534
 27535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27536                {
 27537                    b.Property<Guid>("ItemId")
 27538                        .HasColumnType("TEXT");
 27539
 27540                    b.Property<int>("ChapterIndex")
 27541                        .HasColumnType("INTEGER");
 27542
 27543                    b.Property<DateTime?>("ImageDateModified")
 27544                        .HasColumnType("TEXT");
 27545
 27546                    b.Property<string>("ImagePath")
 27547                        .HasColumnType("TEXT");
 27548
 27549                    b.Property<string>("Name")
 27550                        .HasColumnType("TEXT");
 27551
 27552                    b.Property<long>("StartPositionTicks")
 27553                        .HasColumnType("INTEGER");
 27554
 27555                    b.HasKey("ItemId", "ChapterIndex");
 27556
 27557                    b.ToTable("Chapters");
 27558
 27559                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27560                });
 561
 27562            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27563                {
 27564                    b.Property<int>("Id")
 27565                        .ValueGeneratedOnAdd()
 27566                        .HasColumnType("INTEGER");
 27567
 27568                    b.Property<string>("Client")
 27569                        .IsRequired()
 27570                        .HasMaxLength(32)
 27571                        .HasColumnType("TEXT");
 27572
 27573                    b.Property<Guid>("ItemId")
 27574                        .HasColumnType("TEXT");
 27575
 27576                    b.Property<string>("Key")
 27577                        .IsRequired()
 27578                        .HasColumnType("TEXT");
 27579
 27580                    b.Property<Guid>("UserId")
 27581                        .HasColumnType("TEXT");
 27582
 27583                    b.Property<string>("Value")
 27584                        .HasColumnType("TEXT");
 27585
 27586                    b.HasKey("Id");
 27587
 27588                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27589                        .IsUnique();
 27590
 27591                    b.ToTable("CustomItemDisplayPreferences");
 27592
 27593                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27594                });
 595
 27596            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27597                {
 27598                    b.Property<int>("Id")
 27599                        .ValueGeneratedOnAdd()
 27600                        .HasColumnType("INTEGER");
 27601
 27602                    b.Property<int>("ChromecastVersion")
 27603                        .HasColumnType("INTEGER");
 27604
 27605                    b.Property<string>("Client")
 27606                        .IsRequired()
 27607                        .HasMaxLength(32)
 27608                        .HasColumnType("TEXT");
 27609
 27610                    b.Property<string>("DashboardTheme")
 27611                        .HasMaxLength(32)
 27612                        .HasColumnType("TEXT");
 27613
 27614                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27615                        .HasColumnType("INTEGER");
 27616
 27617                    b.Property<int?>("IndexBy")
 27618                        .HasColumnType("INTEGER");
 27619
 27620                    b.Property<Guid>("ItemId")
 27621                        .HasColumnType("TEXT");
 27622
 27623                    b.Property<int>("ScrollDirection")
 27624                        .HasColumnType("INTEGER");
 27625
 27626                    b.Property<bool>("ShowBackdrop")
 27627                        .HasColumnType("INTEGER");
 27628
 27629                    b.Property<bool>("ShowSidebar")
 27630                        .HasColumnType("INTEGER");
 27631
 27632                    b.Property<int>("SkipBackwardLength")
 27633                        .HasColumnType("INTEGER");
 27634
 27635                    b.Property<int>("SkipForwardLength")
 27636                        .HasColumnType("INTEGER");
 27637
 27638                    b.Property<string>("TvHome")
 27639                        .HasMaxLength(32)
 27640                        .HasColumnType("TEXT");
 27641
 27642                    b.Property<Guid>("UserId")
 27643                        .HasColumnType("TEXT");
 27644
 27645                    b.HasKey("Id");
 27646
 27647                    b.HasIndex("UserId", "ItemId", "Client")
 27648                        .IsUnique();
 27649
 27650                    b.ToTable("DisplayPreferences");
 27651
 27652                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27653                });
 654
 27655            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27656                {
 27657                    b.Property<int>("Id")
 27658                        .ValueGeneratedOnAdd()
 27659                        .HasColumnType("INTEGER");
 27660
 27661                    b.Property<int>("DisplayPreferencesId")
 27662                        .HasColumnType("INTEGER");
 27663
 27664                    b.Property<int>("Order")
 27665                        .HasColumnType("INTEGER");
 27666
 27667                    b.Property<int>("Type")
 27668                        .HasColumnType("INTEGER");
 27669
 27670                    b.HasKey("Id");
 27671
 27672                    b.HasIndex("DisplayPreferencesId");
 27673
 27674                    b.ToTable("HomeSection");
 27675
 27676                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27677                });
 678
 27679            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27680                {
 27681                    b.Property<int>("Id")
 27682                        .ValueGeneratedOnAdd()
 27683                        .HasColumnType("INTEGER");
 27684
 27685                    b.Property<DateTime>("LastModified")
 27686                        .HasColumnType("TEXT");
 27687
 27688                    b.Property<string>("Path")
 27689                        .IsRequired()
 27690                        .HasMaxLength(512)
 27691                        .HasColumnType("TEXT");
 27692
 27693                    b.Property<Guid?>("UserId")
 27694                        .HasColumnType("TEXT");
 27695
 27696                    b.HasKey("Id");
 27697
 27698                    b.HasIndex("UserId")
 27699                        .IsUnique();
 27700
 27701                    b.ToTable("ImageInfos");
 27702
 27703                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27704                });
 705
 27706            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27707                {
 27708                    b.Property<int>("Id")
 27709                        .ValueGeneratedOnAdd()
 27710                        .HasColumnType("INTEGER");
 27711
 27712                    b.Property<string>("Client")
 27713                        .IsRequired()
 27714                        .HasMaxLength(32)
 27715                        .HasColumnType("TEXT");
 27716
 27717                    b.Property<int?>("IndexBy")
 27718                        .HasColumnType("INTEGER");
 27719
 27720                    b.Property<Guid>("ItemId")
 27721                        .HasColumnType("TEXT");
 27722
 27723                    b.Property<bool>("RememberIndexing")
 27724                        .HasColumnType("INTEGER");
 27725
 27726                    b.Property<bool>("RememberSorting")
 27727                        .HasColumnType("INTEGER");
 27728
 27729                    b.Property<string>("SortBy")
 27730                        .IsRequired()
 27731                        .HasMaxLength(64)
 27732                        .HasColumnType("TEXT");
 27733
 27734                    b.Property<int>("SortOrder")
 27735                        .HasColumnType("INTEGER");
 27736
 27737                    b.Property<Guid>("UserId")
 27738                        .HasColumnType("TEXT");
 27739
 27740                    b.Property<int>("ViewType")
 27741                        .HasColumnType("INTEGER");
 27742
 27743                    b.HasKey("Id");
 27744
 27745                    b.HasIndex("UserId");
 27746
 27747                    b.ToTable("ItemDisplayPreferences");
 27748
 27749                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27750                });
 751
 27752            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27753                {
 27754                    b.Property<Guid>("ItemValueId")
 27755                        .ValueGeneratedOnAdd()
 27756                        .HasColumnType("TEXT");
 27757
 27758                    b.Property<string>("CleanValue")
 27759                        .IsRequired()
 27760                        .HasColumnType("TEXT");
 27761
 27762                    b.Property<int>("Type")
 27763                        .HasColumnType("INTEGER");
 27764
 27765                    b.Property<string>("Value")
 27766                        .IsRequired()
 27767                        .HasColumnType("TEXT");
 27768
 27769                    b.HasKey("ItemValueId");
 27770
 27771                    b.HasIndex("Type", "CleanValue");
 27772
 27773                    b.HasIndex("Type", "Value")
 27774                        .IsUnique();
 27775
 27776                    b.ToTable("ItemValues");
 27777
 27778                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27779                });
 780
 27781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27782                {
 27783                    b.Property<Guid>("ItemValueId")
 27784                        .HasColumnType("TEXT");
 27785
 27786                    b.Property<Guid>("ItemId")
 27787                        .HasColumnType("TEXT");
 27788
 27789                    b.HasKey("ItemValueId", "ItemId");
 27790
 27791                    b.HasIndex("ItemId");
 27792
 27793                    b.ToTable("ItemValuesMap");
 27794
 27795                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27796                });
 797
 27798            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27799                {
 27800                    b.Property<Guid>("ItemId")
 27801                        .HasColumnType("TEXT");
 27802
 27803                    b.PrimitiveCollection<string>("KeyframeTicks")
 27804                        .HasColumnType("TEXT");
 27805
 27806                    b.Property<long>("TotalDuration")
 27807                        .HasColumnType("INTEGER");
 27808
 27809                    b.HasKey("ItemId");
 27810
 27811                    b.ToTable("KeyframeData");
 27812
 27813                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27814                });
 815
 27816            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 27817                {
 27818                    b.Property<Guid>("ParentId")
 27819                        .HasColumnType("TEXT");
 27820
 27821                    b.Property<int>("SortOrder")
 27822                        .HasColumnType("INTEGER");
 27823
 27824                    b.Property<Guid>("ChildId")
 27825                        .HasColumnType("TEXT");
 27826
 27827                    b.Property<int>("ChildType")
 27828                        .HasColumnType("INTEGER");
 27829
 27830                    b.HasKey("ParentId", "SortOrder");
 27831
 27832                    b.HasIndex("ChildId", "ChildType");
 27833
 27834                    b.HasIndex("ParentId", "ChildType");
 27835
 27836                    b.ToTable("LinkedChildren", (string)null);
 27837
 27838                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27839                });
 840
 27841            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27842                {
 27843                    b.Property<Guid>("Id")
 27844                        .ValueGeneratedOnAdd()
 27845                        .HasColumnType("TEXT");
 27846
 27847                    b.Property<long>("EndTicks")
 27848                        .HasColumnType("INTEGER");
 27849
 27850                    b.Property<Guid>("ItemId")
 27851                        .HasColumnType("TEXT");
 27852
 27853                    b.Property<string>("SegmentProviderId")
 27854                        .IsRequired()
 27855                        .HasColumnType("TEXT");
 27856
 27857                    b.Property<long>("StartTicks")
 27858                        .HasColumnType("INTEGER");
 27859
 27860                    b.Property<int>("Type")
 27861                        .HasColumnType("INTEGER");
 27862
 27863                    b.HasKey("Id");
 27864
 27865                    b.ToTable("MediaSegments");
 27866
 27867                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27868                });
 869
 27870            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27871                {
 27872                    b.Property<Guid>("ItemId")
 27873                        .HasColumnType("TEXT");
 27874
 27875                    b.Property<int>("StreamIndex")
 27876                        .HasColumnType("INTEGER");
 27877
 27878                    b.Property<string>("AspectRatio")
 27879                        .HasColumnType("TEXT");
 27880
 27881                    b.Property<float?>("AverageFrameRate")
 27882                        .HasColumnType("REAL");
 27883
 27884                    b.Property<int?>("BitDepth")
 27885                        .HasColumnType("INTEGER");
 27886
 27887                    b.Property<int?>("BitRate")
 27888                        .HasColumnType("INTEGER");
 27889
 27890                    b.Property<int?>("BlPresentFlag")
 27891                        .HasColumnType("INTEGER");
 27892
 27893                    b.Property<string>("ChannelLayout")
 27894                        .HasColumnType("TEXT");
 27895
 27896                    b.Property<int?>("Channels")
 27897                        .HasColumnType("INTEGER");
 27898
 27899                    b.Property<string>("Codec")
 27900                        .HasColumnType("TEXT");
 27901
 27902                    b.Property<string>("CodecTag")
 27903                        .HasColumnType("TEXT");
 27904
 27905                    b.Property<string>("CodecTimeBase")
 27906                        .HasColumnType("TEXT");
 27907
 27908                    b.Property<string>("ColorPrimaries")
 27909                        .HasColumnType("TEXT");
 27910
 27911                    b.Property<string>("ColorSpace")
 27912                        .HasColumnType("TEXT");
 27913
 27914                    b.Property<string>("ColorTransfer")
 27915                        .HasColumnType("TEXT");
 27916
 27917                    b.Property<string>("Comment")
 27918                        .HasColumnType("TEXT");
 27919
 27920                    b.Property<int?>("DvBlSignalCompatibilityId")
 27921                        .HasColumnType("INTEGER");
 27922
 27923                    b.Property<int?>("DvLevel")
 27924                        .HasColumnType("INTEGER");
 27925
 27926                    b.Property<int?>("DvProfile")
 27927                        .HasColumnType("INTEGER");
 27928
 27929                    b.Property<int?>("DvVersionMajor")
 27930                        .HasColumnType("INTEGER");
 27931
 27932                    b.Property<int?>("DvVersionMinor")
 27933                        .HasColumnType("INTEGER");
 27934
 27935                    b.Property<int?>("ElPresentFlag")
 27936                        .HasColumnType("INTEGER");
 27937
 27938                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27939                        .HasColumnType("INTEGER");
 27940
 27941                    b.Property<int?>("Height")
 27942                        .HasColumnType("INTEGER");
 27943
 27944                    b.Property<bool?>("IsAnamorphic")
 27945                        .HasColumnType("INTEGER");
 27946
 27947                    b.Property<bool?>("IsAvc")
 27948                        .HasColumnType("INTEGER");
 27949
 27950                    b.Property<bool>("IsDefault")
 27951                        .HasColumnType("INTEGER");
 27952
 27953                    b.Property<bool>("IsExternal")
 27954                        .HasColumnType("INTEGER");
 27955
 27956                    b.Property<bool>("IsForced")
 27957                        .HasColumnType("INTEGER");
 27958
 27959                    b.Property<bool?>("IsHearingImpaired")
 27960                        .HasColumnType("INTEGER");
 27961
 27962                    b.Property<bool?>("IsInterlaced")
 27963                        .HasColumnType("INTEGER");
 27964
 27965                    b.Property<bool>("IsOriginal")
 27966                        .HasColumnType("INTEGER");
 27967
 27968                    b.Property<string>("KeyFrames")
 27969                        .HasColumnType("TEXT");
 27970
 27971                    b.Property<string>("Language")
 27972                        .HasColumnType("TEXT");
 27973
 27974                    b.Property<float?>("Level")
 27975                        .HasColumnType("REAL");
 27976
 27977                    b.Property<string>("NalLengthSize")
 27978                        .HasColumnType("TEXT");
 27979
 27980                    b.Property<string>("Path")
 27981                        .HasColumnType("TEXT");
 27982
 27983                    b.Property<string>("PixelFormat")
 27984                        .HasColumnType("TEXT");
 27985
 27986                    b.Property<string>("Profile")
 27987                        .HasColumnType("TEXT");
 27988
 27989                    b.Property<float?>("RealFrameRate")
 27990                        .HasColumnType("REAL");
 27991
 27992                    b.Property<int?>("RefFrames")
 27993                        .HasColumnType("INTEGER");
 27994
 27995                    b.Property<int?>("Rotation")
 27996                        .HasColumnType("INTEGER");
 27997
 27998                    b.Property<int?>("RpuPresentFlag")
 27999                        .HasColumnType("INTEGER");
 271000
 271001                    b.Property<int?>("SampleRate")
 271002                        .HasColumnType("INTEGER");
 271003
 271004                    b.Property<int>("StreamType")
 271005                        .HasColumnType("INTEGER");
 271006
 271007                    b.Property<string>("TimeBase")
 271008                        .HasColumnType("TEXT");
 271009
 271010                    b.Property<string>("Title")
 271011                        .HasColumnType("TEXT");
 271012
 271013                    b.Property<int?>("Width")
 271014                        .HasColumnType("INTEGER");
 271015
 271016                    b.HasKey("ItemId", "StreamIndex");
 271017
 271018                    b.HasIndex("StreamType", "ItemId", "Language", "IsExternal");
 271019
 271020                    b.ToTable("MediaStreamInfos");
 271021
 271022                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271023                });
 1024
 271025            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271026                {
 271027                    b.Property<Guid>("Id")
 271028                        .ValueGeneratedOnAdd()
 271029                        .HasColumnType("TEXT");
 271030
 271031                    b.Property<string>("Name")
 271032                        .IsRequired()
 271033                        .HasColumnType("TEXT");
 271034
 271035                    b.Property<string>("PersonType")
 271036                        .HasColumnType("TEXT");
 271037
 271038                    b.HasKey("Id");
 271039
 271040                    b.HasIndex("Name");
 271041
 271042                    b.ToTable("Peoples");
 271043
 271044                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271045                });
 1046
 271047            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271048                {
 271049                    b.Property<Guid>("ItemId")
 271050                        .HasColumnType("TEXT");
 271051
 271052                    b.Property<Guid>("PeopleId")
 271053                        .HasColumnType("TEXT");
 271054
 271055                    b.Property<string>("Role")
 271056                        .HasColumnType("TEXT");
 271057
 271058                    b.Property<int?>("ListOrder")
 271059                        .HasColumnType("INTEGER");
 271060
 271061                    b.Property<int?>("SortOrder")
 271062                        .HasColumnType("INTEGER");
 271063
 271064                    b.HasKey("ItemId", "PeopleId", "Role");
 271065
 271066                    b.HasIndex("ItemId", "ListOrder");
 271067
 271068                    b.HasIndex("ItemId", "SortOrder");
 271069
 271070                    b.HasIndex("PeopleId", "ItemId");
 271071
 271072                    b.ToTable("PeopleBaseItemMap");
 271073
 271074                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271075                });
 1076
 271077            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271078                {
 271079                    b.Property<int>("Id")
 271080                        .ValueGeneratedOnAdd()
 271081                        .HasColumnType("INTEGER");
 271082
 271083                    b.Property<int>("Kind")
 271084                        .HasColumnType("INTEGER");
 271085
 271086                    b.Property<Guid?>("Permission_Permissions_Guid")
 271087                        .HasColumnType("TEXT");
 271088
 271089                    b.Property<uint>("RowVersion")
 271090                        .IsConcurrencyToken()
 271091                        .HasColumnType("INTEGER");
 271092
 271093                    b.Property<Guid?>("UserId")
 271094                        .HasColumnType("TEXT");
 271095
 271096                    b.Property<bool>("Value")
 271097                        .HasColumnType("INTEGER");
 271098
 271099                    b.HasKey("Id");
 271100
 271101                    b.HasIndex("UserId", "Kind")
 271102                        .IsUnique()
 271103                        .HasFilter("[UserId] IS NOT NULL");
 271104
 271105                    b.ToTable("Permissions");
 271106
 271107                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271108                });
 1109
 271110            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271111                {
 271112                    b.Property<int>("Id")
 271113                        .ValueGeneratedOnAdd()
 271114                        .HasColumnType("INTEGER");
 271115
 271116                    b.Property<int>("Kind")
 271117                        .HasColumnType("INTEGER");
 271118
 271119                    b.Property<Guid?>("Preference_Preferences_Guid")
 271120                        .HasColumnType("TEXT");
 271121
 271122                    b.Property<uint>("RowVersion")
 271123                        .IsConcurrencyToken()
 271124                        .HasColumnType("INTEGER");
 271125
 271126                    b.Property<Guid?>("UserId")
 271127                        .HasColumnType("TEXT");
 271128
 271129                    b.Property<string>("Value")
 271130                        .IsRequired()
 271131                        .HasMaxLength(65535)
 271132                        .HasColumnType("TEXT");
 271133
 271134                    b.HasKey("Id");
 271135
 271136                    b.HasIndex("UserId", "Kind")
 271137                        .IsUnique()
 271138                        .HasFilter("[UserId] IS NOT NULL");
 271139
 271140                    b.ToTable("Preferences");
 271141
 271142                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271143                });
 1144
 271145            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271146                {
 271147                    b.Property<int>("Id")
 271148                        .ValueGeneratedOnAdd()
 271149                        .HasColumnType("INTEGER");
 271150
 271151                    b.Property<string>("AccessToken")
 271152                        .IsRequired()
 271153                        .HasColumnType("TEXT");
 271154
 271155                    b.Property<DateTime>("DateCreated")
 271156                        .HasColumnType("TEXT");
 271157
 271158                    b.Property<DateTime>("DateLastActivity")
 271159                        .HasColumnType("TEXT");
 271160
 271161                    b.Property<string>("Name")
 271162                        .IsRequired()
 271163                        .HasMaxLength(64)
 271164                        .HasColumnType("TEXT");
 271165
 271166                    b.HasKey("Id");
 271167
 271168                    b.HasIndex("AccessToken")
 271169                        .IsUnique();
 271170
 271171                    b.ToTable("ApiKeys");
 271172
 271173                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271174                });
 1175
 271176            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271177                {
 271178                    b.Property<int>("Id")
 271179                        .ValueGeneratedOnAdd()
 271180                        .HasColumnType("INTEGER");
 271181
 271182                    b.Property<string>("AccessToken")
 271183                        .IsRequired()
 271184                        .HasColumnType("TEXT");
 271185
 271186                    b.Property<string>("AppName")
 271187                        .IsRequired()
 271188                        .HasMaxLength(64)
 271189                        .HasColumnType("TEXT");
 271190
 271191                    b.Property<string>("AppVersion")
 271192                        .IsRequired()
 271193                        .HasMaxLength(32)
 271194                        .HasColumnType("TEXT");
 271195
 271196                    b.Property<DateTime>("DateCreated")
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.Property<DateTime>("DateLastActivity")
 271200                        .HasColumnType("TEXT");
 271201
 271202                    b.Property<DateTime>("DateModified")
 271203                        .HasColumnType("TEXT");
 271204
 271205                    b.Property<string>("DeviceId")
 271206                        .IsRequired()
 271207                        .HasMaxLength(256)
 271208                        .HasColumnType("TEXT");
 271209
 271210                    b.Property<string>("DeviceName")
 271211                        .IsRequired()
 271212                        .HasMaxLength(64)
 271213                        .HasColumnType("TEXT");
 271214
 271215                    b.Property<bool>("IsActive")
 271216                        .HasColumnType("INTEGER");
 271217
 271218                    b.Property<Guid>("UserId")
 271219                        .HasColumnType("TEXT");
 271220
 271221                    b.HasKey("Id");
 271222
 271223                    b.HasIndex("AccessToken", "DateLastActivity");
 271224
 271225                    b.HasIndex("DeviceId", "DateLastActivity");
 271226
 271227                    b.HasIndex("UserId", "DeviceId");
 271228
 271229                    b.ToTable("Devices");
 271230
 271231                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271232                });
 1233
 271234            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271235                {
 271236                    b.Property<int>("Id")
 271237                        .ValueGeneratedOnAdd()
 271238                        .HasColumnType("INTEGER");
 271239
 271240                    b.Property<string>("CustomName")
 271241                        .HasColumnType("TEXT");
 271242
 271243                    b.Property<string>("DeviceId")
 271244                        .IsRequired()
 271245                        .HasColumnType("TEXT");
 271246
 271247                    b.HasKey("Id");
 271248
 271249                    b.HasIndex("DeviceId")
 271250                        .IsUnique();
 271251
 271252                    b.ToTable("DeviceOptions");
 271253
 271254                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271255                });
 1256
 271257            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271258                {
 271259                    b.Property<Guid>("ItemId")
 271260                        .HasColumnType("TEXT");
 271261
 271262                    b.Property<int>("Width")
 271263                        .HasColumnType("INTEGER");
 271264
 271265                    b.Property<int>("Bandwidth")
 271266                        .HasColumnType("INTEGER");
 271267
 271268                    b.Property<int>("Height")
 271269                        .HasColumnType("INTEGER");
 271270
 271271                    b.Property<int>("Interval")
 271272                        .HasColumnType("INTEGER");
 271273
 271274                    b.Property<int>("ThumbnailCount")
 271275                        .HasColumnType("INTEGER");
 271276
 271277                    b.Property<int>("TileHeight")
 271278                        .HasColumnType("INTEGER");
 271279
 271280                    b.Property<int>("TileWidth")
 271281                        .HasColumnType("INTEGER");
 271282
 271283                    b.HasKey("ItemId", "Width");
 271284
 271285                    b.ToTable("TrickplayInfos");
 271286
 271287                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271288                });
 1289
 271290            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271291                {
 271292                    b.Property<Guid>("Id")
 271293                        .ValueGeneratedOnAdd()
 271294                        .HasColumnType("TEXT");
 271295
 271296                    b.Property<string>("AudioLanguagePreference")
 271297                        .HasMaxLength(255)
 271298                        .HasColumnType("TEXT");
 271299
 271300                    b.Property<string>("AuthenticationProviderId")
 271301                        .IsRequired()
 271302                        .HasMaxLength(255)
 271303                        .HasColumnType("TEXT");
 271304
 271305                    b.Property<string>("CastReceiverId")
 271306                        .HasMaxLength(32)
 271307                        .HasColumnType("TEXT");
 271308
 271309                    b.Property<bool>("DisplayCollectionsView")
 271310                        .HasColumnType("INTEGER");
 271311
 271312                    b.Property<bool>("DisplayMissingEpisodes")
 271313                        .HasColumnType("INTEGER");
 271314
 271315                    b.Property<bool>("EnableAutoLogin")
 271316                        .HasColumnType("INTEGER");
 271317
 271318                    b.Property<bool>("EnableLocalPassword")
 271319                        .HasColumnType("INTEGER");
 271320
 271321                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<bool>("EnableUserPreferenceAccess")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<bool>("HidePlayedInLatest")
 271328                        .HasColumnType("INTEGER");
 271329
 271330                    b.Property<long>("InternalId")
 271331                        .HasColumnType("INTEGER");
 271332
 271333                    b.Property<int>("InvalidLoginAttemptCount")
 271334                        .HasColumnType("INTEGER");
 271335
 271336                    b.Property<DateTime?>("LastActivityDate")
 271337                        .HasColumnType("TEXT");
 271338
 271339                    b.Property<DateTime?>("LastLoginDate")
 271340                        .HasColumnType("TEXT");
 271341
 271342                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271343                        .HasColumnType("INTEGER");
 271344
 271345                    b.Property<int>("MaxActiveSessions")
 271346                        .HasColumnType("INTEGER");
 271347
 271348                    b.Property<int?>("MaxParentalRatingScore")
 271349                        .HasColumnType("INTEGER");
 271350
 271351                    b.Property<int?>("MaxParentalRatingSubScore")
 271352                        .HasColumnType("INTEGER");
 271353
 271354                    b.Property<bool>("MustUpdatePassword")
 271355                        .HasColumnType("INTEGER");
 271356
 271357                    b.Property<string>("NormalizedUsername")
 271358                        .IsRequired()
 271359                        .HasMaxLength(255)
 271360                        .HasColumnType("TEXT");
 271361
 271362                    b.Property<string>("Password")
 271363                        .HasMaxLength(65535)
 271364                        .HasColumnType("TEXT");
 271365
 271366                    b.Property<string>("PasswordResetProviderId")
 271367                        .IsRequired()
 271368                        .HasMaxLength(255)
 271369                        .HasColumnType("TEXT");
 271370
 271371                    b.Property<bool>("PlayDefaultAudioTrack")
 271372                        .HasColumnType("INTEGER");
 271373
 271374                    b.Property<bool>("RememberAudioSelections")
 271375                        .HasColumnType("INTEGER");
 271376
 271377                    b.Property<bool>("RememberSubtitleSelections")
 271378                        .HasColumnType("INTEGER");
 271379
 271380                    b.Property<int?>("RemoteClientBitrateLimit")
 271381                        .HasColumnType("INTEGER");
 271382
 271383                    b.Property<uint>("RowVersion")
 271384                        .IsConcurrencyToken()
 271385                        .HasColumnType("INTEGER");
 271386
 271387                    b.Property<string>("SubtitleLanguagePreference")
 271388                        .HasMaxLength(255)
 271389                        .HasColumnType("TEXT");
 271390
 271391                    b.Property<int>("SubtitleMode")
 271392                        .HasColumnType("INTEGER");
 271393
 271394                    b.Property<int>("SyncPlayAccess")
 271395                        .HasColumnType("INTEGER");
 271396
 271397                    b.Property<string>("Username")
 271398                        .IsRequired()
 271399                        .HasMaxLength(255)
 271400                        .HasColumnType("TEXT");
 271401
 271402                    b.HasKey("Id");
 271403
 271404                    b.HasIndex("NormalizedUsername")
 271405                        .IsUnique();
 271406
 271407                    b.HasIndex("Username")
 271408                        .IsUnique();
 271409
 271410                    b.ToTable("Users");
 271411
 271412                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271413                });
 1414
 271415            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271416                {
 271417                    b.Property<Guid>("ItemId")
 271418                        .HasColumnType("TEXT");
 271419
 271420                    b.Property<Guid>("UserId")
 271421                        .HasColumnType("TEXT");
 271422
 271423                    b.Property<string>("CustomDataKey")
 271424                        .HasColumnType("TEXT");
 271425
 271426                    b.Property<int?>("AudioStreamIndex")
 271427                        .HasColumnType("INTEGER");
 271428
 271429                    b.Property<bool>("IsFavorite")
 271430                        .HasColumnType("INTEGER");
 271431
 271432                    b.Property<DateTime?>("LastPlayedDate")
 271433                        .HasColumnType("TEXT");
 271434
 271435                    b.Property<bool?>("Likes")
 271436                        .HasColumnType("INTEGER");
 271437
 271438                    b.Property<int>("PlayCount")
 271439                        .HasColumnType("INTEGER");
 271440
 271441                    b.Property<long>("PlaybackPositionTicks")
 271442                        .HasColumnType("INTEGER");
 271443
 271444                    b.Property<bool>("Played")
 271445                        .HasColumnType("INTEGER");
 271446
 271447                    b.Property<double?>("Rating")
 271448                        .HasColumnType("REAL");
 271449
 271450                    b.Property<DateTime?>("RetentionDate")
 271451                        .HasColumnType("TEXT");
 271452
 271453                    b.Property<int?>("SubtitleStreamIndex")
 271454                        .HasColumnType("INTEGER");
 271455
 271456                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271457
 271458                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271459
 271460                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271461
 271462                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271463
 271464                    b.HasIndex("ItemId", "UserId", "Played");
 271465
 271466                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 271467
 271468                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 271469
 271470                    b.HasIndex("UserId", "Played", "ItemId");
 271471
 271472                    b.ToTable("UserData");
 271473
 271474                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271475                });
 1476
 271477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271478                {
 271479                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271480                        .WithMany("AccessSchedules")
 271481                        .HasForeignKey("UserId")
 271482                        .OnDelete(DeleteBehavior.Cascade)
 271483                        .IsRequired();
 271484                });
 1485
 271486            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271487                {
 271488                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271489                        .WithMany("Parents")
 271490                        .HasForeignKey("ItemId")
 271491                        .OnDelete(DeleteBehavior.Cascade)
 271492                        .IsRequired();
 271493
 271494                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271495                        .WithMany("Children")
 271496                        .HasForeignKey("ParentItemId")
 271497                        .OnDelete(DeleteBehavior.Cascade)
 271498                        .IsRequired();
 271499
 271500                    b.Navigation("Item");
 271501
 271502                    b.Navigation("ParentItem");
 271503                });
 1504
 271505            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271506                {
 271507                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271508                        .WithMany()
 271509                        .HasForeignKey("ItemId")
 271510                        .OnDelete(DeleteBehavior.Cascade)
 271511                        .IsRequired();
 271512
 271513                    b.Navigation("Item");
 271514                });
 1515
 271516            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271517                {
 271518                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 271519                        .WithMany("Extras")
 271520                        .HasForeignKey("OwnerId")
 271521                        .OnDelete(DeleteBehavior.NoAction);
 271522
 271523                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 271524                        .WithMany("DirectChildren")
 271525                        .HasForeignKey("ParentId")
 271526                        .OnDelete(DeleteBehavior.Cascade);
 271527
 271528                    b.Navigation("DirectParent");
 271529
 271530                    b.Navigation("Owner");
 271531                });
 1532
 271533            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271534                {
 271535                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271536                        .WithMany("Images")
 271537                        .HasForeignKey("ItemId")
 271538                        .OnDelete(DeleteBehavior.Cascade)
 271539                        .IsRequired();
 271540
 271541                    b.Navigation("Item");
 271542                });
 1543
 271544            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271545                {
 271546                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271547                        .WithMany("LockedFields")
 271548                        .HasForeignKey("ItemId")
 271549                        .OnDelete(DeleteBehavior.Cascade)
 271550                        .IsRequired();
 271551
 271552                    b.Navigation("Item");
 271553                });
 1554
 271555            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271556                {
 271557                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271558                        .WithMany("Provider")
 271559                        .HasForeignKey("ItemId")
 271560                        .OnDelete(DeleteBehavior.Cascade)
 271561                        .IsRequired();
 271562
 271563                    b.Navigation("Item");
 271564                });
 1565
 271566            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271567                {
 271568                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271569                        .WithMany("TrailerTypes")
 271570                        .HasForeignKey("ItemId")
 271571                        .OnDelete(DeleteBehavior.Cascade)
 271572                        .IsRequired();
 271573
 271574                    b.Navigation("Item");
 271575                });
 1576
 271577            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271578                {
 271579                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271580                        .WithMany("Chapters")
 271581                        .HasForeignKey("ItemId")
 271582                        .OnDelete(DeleteBehavior.Cascade)
 271583                        .IsRequired();
 271584
 271585                    b.Navigation("Item");
 271586                });
 1587
 271588            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271589                {
 271590                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271591                        .WithMany("DisplayPreferences")
 271592                        .HasForeignKey("UserId")
 271593                        .OnDelete(DeleteBehavior.Cascade)
 271594                        .IsRequired();
 271595                });
 1596
 271597            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271598                {
 271599                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271600                        .WithMany("HomeSections")
 271601                        .HasForeignKey("DisplayPreferencesId")
 271602                        .OnDelete(DeleteBehavior.Cascade)
 271603                        .IsRequired();
 271604                });
 1605
 271606            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271607                {
 271608                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271609                        .WithOne("ProfileImage")
 271610                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271611                        .OnDelete(DeleteBehavior.Cascade);
 271612                });
 1613
 271614            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271615                {
 271616                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271617                        .WithMany("ItemDisplayPreferences")
 271618                        .HasForeignKey("UserId")
 271619                        .OnDelete(DeleteBehavior.Cascade)
 271620                        .IsRequired();
 271621                });
 1622
 271623            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271624                {
 271625                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271626                        .WithMany("ItemValues")
 271627                        .HasForeignKey("ItemId")
 271628                        .OnDelete(DeleteBehavior.Cascade)
 271629                        .IsRequired();
 271630
 271631                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271632                        .WithMany("BaseItemsMap")
 271633                        .HasForeignKey("ItemValueId")
 271634                        .OnDelete(DeleteBehavior.Cascade)
 271635                        .IsRequired();
 271636
 271637                    b.Navigation("Item");
 271638
 271639                    b.Navigation("ItemValue");
 271640                });
 1641
 271642            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271643                {
 271644                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271645                        .WithMany()
 271646                        .HasForeignKey("ItemId")
 271647                        .OnDelete(DeleteBehavior.Cascade)
 271648                        .IsRequired();
 271649
 271650                    b.Navigation("Item");
 271651                });
 1652
 271653            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 271654                {
 271655                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 271656                        .WithMany("LinkedChildOfEntities")
 271657                        .HasForeignKey("ChildId")
 271658                        .OnDelete(DeleteBehavior.NoAction)
 271659                        .IsRequired();
 271660
 271661                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 271662                        .WithMany("LinkedChildEntities")
 271663                        .HasForeignKey("ParentId")
 271664                        .OnDelete(DeleteBehavior.NoAction)
 271665                        .IsRequired();
 271666
 271667                    b.Navigation("Child");
 271668
 271669                    b.Navigation("Parent");
 271670                });
 1671
 271672            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271673                {
 271674                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271675                        .WithMany("MediaStreams")
 271676                        .HasForeignKey("ItemId")
 271677                        .OnDelete(DeleteBehavior.Cascade)
 271678                        .IsRequired();
 271679
 271680                    b.Navigation("Item");
 271681                });
 1682
 271683            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271684                {
 271685                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271686                        .WithMany("Peoples")
 271687                        .HasForeignKey("ItemId")
 271688                        .OnDelete(DeleteBehavior.Cascade)
 271689                        .IsRequired();
 271690
 271691                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271692                        .WithMany("BaseItems")
 271693                        .HasForeignKey("PeopleId")
 271694                        .OnDelete(DeleteBehavior.Cascade)
 271695                        .IsRequired();
 271696
 271697                    b.Navigation("Item");
 271698
 271699                    b.Navigation("People");
 271700                });
 1701
 271702            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271703                {
 271704                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271705                        .WithMany("Permissions")
 271706                        .HasForeignKey("UserId")
 271707                        .OnDelete(DeleteBehavior.Cascade);
 271708                });
 1709
 271710            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271711                {
 271712                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271713                        .WithMany("Preferences")
 271714                        .HasForeignKey("UserId")
 271715                        .OnDelete(DeleteBehavior.Cascade);
 271716                });
 1717
 271718            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271719                {
 271720                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271721                        .WithMany()
 271722                        .HasForeignKey("UserId")
 271723                        .OnDelete(DeleteBehavior.Cascade)
 271724                        .IsRequired();
 271725
 271726                    b.Navigation("User");
 271727                });
 1728
 271729            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271730                {
 271731                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271732                        .WithMany("UserData")
 271733                        .HasForeignKey("ItemId")
 271734                        .OnDelete(DeleteBehavior.Cascade)
 271735                        .IsRequired();
 271736
 271737                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271738                        .WithMany()
 271739                        .HasForeignKey("UserId")
 271740                        .OnDelete(DeleteBehavior.Cascade)
 271741                        .IsRequired();
 271742
 271743                    b.Navigation("Item");
 271744
 271745                    b.Navigation("User");
 271746                });
 1747
 271748            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271749                {
 271750                    b.Navigation("Chapters");
 271751
 271752                    b.Navigation("Children");
 271753
 271754                    b.Navigation("DirectChildren");
 271755
 271756                    b.Navigation("Extras");
 271757
 271758                    b.Navigation("Images");
 271759
 271760                    b.Navigation("ItemValues");
 271761
 271762                    b.Navigation("LinkedChildEntities");
 271763
 271764                    b.Navigation("LinkedChildOfEntities");
 271765
 271766                    b.Navigation("LockedFields");
 271767
 271768                    b.Navigation("MediaStreams");
 271769
 271770                    b.Navigation("Parents");
 271771
 271772                    b.Navigation("Peoples");
 271773
 271774                    b.Navigation("Provider");
 271775
 271776                    b.Navigation("TrailerTypes");
 271777
 271778                    b.Navigation("UserData");
 271779                });
 1780
 271781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271782                {
 271783                    b.Navigation("HomeSections");
 271784                });
 1785
 271786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271787                {
 271788                    b.Navigation("BaseItemsMap");
 271789                });
 1790
 271791            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271792                {
 271793                    b.Navigation("BaseItems");
 271794                });
 1795
 271796            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271797                {
 271798                    b.Navigation("AccessSchedules");
 271799
 271800                    b.Navigation("DisplayPreferences");
 271801
 271802                    b.Navigation("ItemDisplayPreferences");
 271803
 271804                    b.Navigation("Permissions");
 271805
 271806                    b.Navigation("Preferences");
 271807
 271808                    b.Navigation("ProfileImage");
 271809                });
 1810#pragma warning restore 612, 618
 271811        }
 1812    }
 1813}