< Summary - Jellyfin

Line coverage
99%
Covered lines: 1739
Uncovered lines: 10
Coverable lines: 1749
Total lines: 1852
Line coverage: 99.4%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/16/2026 - 12:15:55 AM Line coverage: 99.4% (1733/1743) Total lines: 18465/22/2026 - 12:15:17 AM Line coverage: 99.4% (1736/1746) Total lines: 18498/11/2026 - 12:17:00 AM Line coverage: 99.4% (1739/1749) Total lines: 1852

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddBaseItemNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.CreateIndex(
 2714                name: "IX_UserData_UserId_IsFavorite_ItemId",
 2715                table: "UserData",
 2716                columns: new[] { "UserId", "IsFavorite", "ItemId" });
 17
 2718            migrationBuilder.CreateIndex(
 2719                name: "IX_UserData_UserId_Played_ItemId",
 2720                table: "UserData",
 2721                columns: new[] { "UserId", "Played", "ItemId" });
 22
 2723            migrationBuilder.CreateIndex(
 2724                name: "IX_BaseItems_Name",
 2725                table: "BaseItems",
 2726                column: "Name");
 2727        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_UserData_UserId_IsFavorite_ItemId",
 034                table: "UserData");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_UserData_UserId_Played_ItemId",
 038                table: "UserData");
 39
 040            migrationBuilder.DropIndex(
 041                name: "IX_BaseItems_Name",
 042                table: "BaseItems");
 043        }
 44    }
 45}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260130232147_AddBaseItemNameIndex")]
 15    partial class AddBaseItemNameIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2721            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 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<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("ExtraType");
 27370
 27371                    b.HasIndex("Name");
 27372
 27373                    b.HasIndex("OwnerId");
 27374
 27375                    b.HasIndex("ParentId");
 27376
 27377                    b.HasIndex("Path");
 27378
 27379                    b.HasIndex("PresentationUniqueKey");
 27380
 27381                    b.HasIndex("ExtraType", "OwnerId");
 27382
 27383                    b.HasIndex("TopParentId", "Id");
 27384
 27385                    b.HasIndex("Type", "TopParentId", "Id");
 27386
 27387                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27388
 27389                    b.HasIndex("Type", "TopParentId", "StartDate");
 27390
 27391                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 27392
 27393                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27394
 27395                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 27396
 27397                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 27398
 27399                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 27400
 27401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27402
 27403                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27404
 27405                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27406
 27407                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27408
 27409                    b.ToTable("BaseItems");
 27410
 27411                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27412
 27413                    b.HasData(
 27414                        new
 27415                        {
 27416                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27417                            IsFolder = false,
 27418                            IsInMixedFolder = false,
 27419                            IsLocked = false,
 27420                            IsMovie = false,
 27421                            IsRepeat = false,
 27422                            IsSeries = false,
 27423                            IsVirtualItem = false,
 27424                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 27425                            Type = "PLACEHOLDER"
 27426                        });
 27427                });
 428
 27429            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27430                {
 27431                    b.Property<Guid>("Id")
 27432                        .ValueGeneratedOnAdd()
 27433                        .HasColumnType("TEXT");
 27434
 27435                    b.Property<byte[]>("Blurhash")
 27436                        .HasColumnType("BLOB");
 27437
 27438                    b.Property<DateTime?>("DateModified")
 27439                        .HasColumnType("TEXT");
 27440
 27441                    b.Property<int>("Height")
 27442                        .HasColumnType("INTEGER");
 27443
 27444                    b.Property<int>("ImageType")
 27445                        .HasColumnType("INTEGER");
 27446
 27447                    b.Property<Guid>("ItemId")
 27448                        .HasColumnType("TEXT");
 27449
 27450                    b.Property<string>("Path")
 27451                        .IsRequired()
 27452                        .HasColumnType("TEXT");
 27453
 27454                    b.Property<int>("Width")
 27455                        .HasColumnType("INTEGER");
 27456
 27457                    b.HasKey("Id");
 27458
 27459                    b.HasIndex("ItemId");
 27460
 27461                    b.HasIndex("ItemId", "ImageType");
 27462
 27463                    b.ToTable("BaseItemImageInfos");
 27464
 27465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27466                });
 467
 27468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27469                {
 27470                    b.Property<int>("Id")
 27471                        .HasColumnType("INTEGER");
 27472
 27473                    b.Property<Guid>("ItemId")
 27474                        .HasColumnType("TEXT");
 27475
 27476                    b.HasKey("Id", "ItemId");
 27477
 27478                    b.HasIndex("ItemId");
 27479
 27480                    b.ToTable("BaseItemMetadataFields");
 27481
 27482                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27483                });
 484
 27485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27486                {
 27487                    b.Property<Guid>("ItemId")
 27488                        .HasColumnType("TEXT");
 27489
 27490                    b.Property<string>("ProviderId")
 27491                        .HasColumnType("TEXT");
 27492
 27493                    b.Property<string>("ProviderValue")
 27494                        .IsRequired()
 27495                        .HasColumnType("TEXT");
 27496
 27497                    b.HasKey("ItemId", "ProviderId");
 27498
 27499                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 27500
 27501                    b.ToTable("BaseItemProviders");
 27502
 27503                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27504                });
 505
 27506            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27507                {
 27508                    b.Property<int>("Id")
 27509                        .HasColumnType("INTEGER");
 27510
 27511                    b.Property<Guid>("ItemId")
 27512                        .HasColumnType("TEXT");
 27513
 27514                    b.HasKey("Id", "ItemId");
 27515
 27516                    b.HasIndex("ItemId");
 27517
 27518                    b.ToTable("BaseItemTrailerTypes");
 27519
 27520                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27521                });
 522
 27523            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27524                {
 27525                    b.Property<Guid>("ItemId")
 27526                        .HasColumnType("TEXT");
 27527
 27528                    b.Property<int>("ChapterIndex")
 27529                        .HasColumnType("INTEGER");
 27530
 27531                    b.Property<DateTime?>("ImageDateModified")
 27532                        .HasColumnType("TEXT");
 27533
 27534                    b.Property<string>("ImagePath")
 27535                        .HasColumnType("TEXT");
 27536
 27537                    b.Property<string>("Name")
 27538                        .HasColumnType("TEXT");
 27539
 27540                    b.Property<long>("StartPositionTicks")
 27541                        .HasColumnType("INTEGER");
 27542
 27543                    b.HasKey("ItemId", "ChapterIndex");
 27544
 27545                    b.ToTable("Chapters");
 27546
 27547                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27548                });
 549
 27550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27551                {
 27552                    b.Property<int>("Id")
 27553                        .ValueGeneratedOnAdd()
 27554                        .HasColumnType("INTEGER");
 27555
 27556                    b.Property<string>("Client")
 27557                        .IsRequired()
 27558                        .HasMaxLength(32)
 27559                        .HasColumnType("TEXT");
 27560
 27561                    b.Property<Guid>("ItemId")
 27562                        .HasColumnType("TEXT");
 27563
 27564                    b.Property<string>("Key")
 27565                        .IsRequired()
 27566                        .HasColumnType("TEXT");
 27567
 27568                    b.Property<Guid>("UserId")
 27569                        .HasColumnType("TEXT");
 27570
 27571                    b.Property<string>("Value")
 27572                        .HasColumnType("TEXT");
 27573
 27574                    b.HasKey("Id");
 27575
 27576                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27577                        .IsUnique();
 27578
 27579                    b.ToTable("CustomItemDisplayPreferences");
 27580
 27581                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27582                });
 583
 27584            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27585                {
 27586                    b.Property<int>("Id")
 27587                        .ValueGeneratedOnAdd()
 27588                        .HasColumnType("INTEGER");
 27589
 27590                    b.Property<int>("ChromecastVersion")
 27591                        .HasColumnType("INTEGER");
 27592
 27593                    b.Property<string>("Client")
 27594                        .IsRequired()
 27595                        .HasMaxLength(32)
 27596                        .HasColumnType("TEXT");
 27597
 27598                    b.Property<string>("DashboardTheme")
 27599                        .HasMaxLength(32)
 27600                        .HasColumnType("TEXT");
 27601
 27602                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27603                        .HasColumnType("INTEGER");
 27604
 27605                    b.Property<int?>("IndexBy")
 27606                        .HasColumnType("INTEGER");
 27607
 27608                    b.Property<Guid>("ItemId")
 27609                        .HasColumnType("TEXT");
 27610
 27611                    b.Property<int>("ScrollDirection")
 27612                        .HasColumnType("INTEGER");
 27613
 27614                    b.Property<bool>("ShowBackdrop")
 27615                        .HasColumnType("INTEGER");
 27616
 27617                    b.Property<bool>("ShowSidebar")
 27618                        .HasColumnType("INTEGER");
 27619
 27620                    b.Property<int>("SkipBackwardLength")
 27621                        .HasColumnType("INTEGER");
 27622
 27623                    b.Property<int>("SkipForwardLength")
 27624                        .HasColumnType("INTEGER");
 27625
 27626                    b.Property<string>("TvHome")
 27627                        .HasMaxLength(32)
 27628                        .HasColumnType("TEXT");
 27629
 27630                    b.Property<Guid>("UserId")
 27631                        .HasColumnType("TEXT");
 27632
 27633                    b.HasKey("Id");
 27634
 27635                    b.HasIndex("UserId", "ItemId", "Client")
 27636                        .IsUnique();
 27637
 27638                    b.ToTable("DisplayPreferences");
 27639
 27640                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27641                });
 642
 27643            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27644                {
 27645                    b.Property<int>("Id")
 27646                        .ValueGeneratedOnAdd()
 27647                        .HasColumnType("INTEGER");
 27648
 27649                    b.Property<int>("DisplayPreferencesId")
 27650                        .HasColumnType("INTEGER");
 27651
 27652                    b.Property<int>("Order")
 27653                        .HasColumnType("INTEGER");
 27654
 27655                    b.Property<int>("Type")
 27656                        .HasColumnType("INTEGER");
 27657
 27658                    b.HasKey("Id");
 27659
 27660                    b.HasIndex("DisplayPreferencesId");
 27661
 27662                    b.ToTable("HomeSection");
 27663
 27664                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27665                });
 666
 27667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27668                {
 27669                    b.Property<int>("Id")
 27670                        .ValueGeneratedOnAdd()
 27671                        .HasColumnType("INTEGER");
 27672
 27673                    b.Property<DateTime>("LastModified")
 27674                        .HasColumnType("TEXT");
 27675
 27676                    b.Property<string>("Path")
 27677                        .IsRequired()
 27678                        .HasMaxLength(512)
 27679                        .HasColumnType("TEXT");
 27680
 27681                    b.Property<Guid?>("UserId")
 27682                        .HasColumnType("TEXT");
 27683
 27684                    b.HasKey("Id");
 27685
 27686                    b.HasIndex("UserId")
 27687                        .IsUnique();
 27688
 27689                    b.ToTable("ImageInfos");
 27690
 27691                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27692                });
 693
 27694            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27695                {
 27696                    b.Property<int>("Id")
 27697                        .ValueGeneratedOnAdd()
 27698                        .HasColumnType("INTEGER");
 27699
 27700                    b.Property<string>("Client")
 27701                        .IsRequired()
 27702                        .HasMaxLength(32)
 27703                        .HasColumnType("TEXT");
 27704
 27705                    b.Property<int?>("IndexBy")
 27706                        .HasColumnType("INTEGER");
 27707
 27708                    b.Property<Guid>("ItemId")
 27709                        .HasColumnType("TEXT");
 27710
 27711                    b.Property<bool>("RememberIndexing")
 27712                        .HasColumnType("INTEGER");
 27713
 27714                    b.Property<bool>("RememberSorting")
 27715                        .HasColumnType("INTEGER");
 27716
 27717                    b.Property<string>("SortBy")
 27718                        .IsRequired()
 27719                        .HasMaxLength(64)
 27720                        .HasColumnType("TEXT");
 27721
 27722                    b.Property<int>("SortOrder")
 27723                        .HasColumnType("INTEGER");
 27724
 27725                    b.Property<Guid>("UserId")
 27726                        .HasColumnType("TEXT");
 27727
 27728                    b.Property<int>("ViewType")
 27729                        .HasColumnType("INTEGER");
 27730
 27731                    b.HasKey("Id");
 27732
 27733                    b.HasIndex("UserId");
 27734
 27735                    b.ToTable("ItemDisplayPreferences");
 27736
 27737                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27738                });
 739
 27740            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27741                {
 27742                    b.Property<Guid>("ItemValueId")
 27743                        .ValueGeneratedOnAdd()
 27744                        .HasColumnType("TEXT");
 27745
 27746                    b.Property<string>("CleanValue")
 27747                        .IsRequired()
 27748                        .HasColumnType("TEXT");
 27749
 27750                    b.Property<int>("Type")
 27751                        .HasColumnType("INTEGER");
 27752
 27753                    b.Property<string>("Value")
 27754                        .IsRequired()
 27755                        .HasColumnType("TEXT");
 27756
 27757                    b.HasKey("ItemValueId");
 27758
 27759                    b.HasIndex("Type", "CleanValue");
 27760
 27761                    b.HasIndex("Type", "Value")
 27762                        .IsUnique();
 27763
 27764                    b.ToTable("ItemValues");
 27765
 27766                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27767                });
 768
 27769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27770                {
 27771                    b.Property<Guid>("ItemValueId")
 27772                        .HasColumnType("TEXT");
 27773
 27774                    b.Property<Guid>("ItemId")
 27775                        .HasColumnType("TEXT");
 27776
 27777                    b.HasKey("ItemValueId", "ItemId");
 27778
 27779                    b.HasIndex("ItemId");
 27780
 27781                    b.ToTable("ItemValuesMap");
 27782
 27783                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27784                });
 785
 27786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27787                {
 27788                    b.Property<Guid>("ItemId")
 27789                        .HasColumnType("TEXT");
 27790
 27791                    b.PrimitiveCollection<string>("KeyframeTicks")
 27792                        .HasColumnType("TEXT");
 27793
 27794                    b.Property<long>("TotalDuration")
 27795                        .HasColumnType("INTEGER");
 27796
 27797                    b.HasKey("ItemId");
 27798
 27799                    b.ToTable("KeyframeData");
 27800
 27801                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27802                });
 803
 27804            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 27805                {
 27806                    b.Property<Guid>("ParentId")
 27807                        .HasColumnType("TEXT");
 27808
 27809                    b.Property<Guid>("ChildId")
 27810                        .HasColumnType("TEXT");
 27811
 27812                    b.Property<int>("ChildType")
 27813                        .HasColumnType("INTEGER");
 27814
 27815                    b.Property<int?>("SortOrder")
 27816                        .HasColumnType("INTEGER");
 27817
 27818                    b.HasKey("ParentId", "ChildId");
 27819
 27820                    b.HasIndex("ChildId");
 27821
 27822                    b.HasIndex("ParentId");
 27823
 27824                    b.HasIndex("ChildId", "ChildType");
 27825
 27826                    b.HasIndex("ParentId", "ChildType");
 27827
 27828                    b.HasIndex("ParentId", "SortOrder");
 27829
 27830                    b.ToTable("LinkedChildren", (string)null);
 27831
 27832                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27833                });
 834
 27835            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27836                {
 27837                    b.Property<Guid>("Id")
 27838                        .ValueGeneratedOnAdd()
 27839                        .HasColumnType("TEXT");
 27840
 27841                    b.Property<long>("EndTicks")
 27842                        .HasColumnType("INTEGER");
 27843
 27844                    b.Property<Guid>("ItemId")
 27845                        .HasColumnType("TEXT");
 27846
 27847                    b.Property<string>("SegmentProviderId")
 27848                        .IsRequired()
 27849                        .HasColumnType("TEXT");
 27850
 27851                    b.Property<long>("StartTicks")
 27852                        .HasColumnType("INTEGER");
 27853
 27854                    b.Property<int>("Type")
 27855                        .HasColumnType("INTEGER");
 27856
 27857                    b.HasKey("Id");
 27858
 27859                    b.ToTable("MediaSegments");
 27860
 27861                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27862                });
 863
 27864            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27865                {
 27866                    b.Property<Guid>("ItemId")
 27867                        .HasColumnType("TEXT");
 27868
 27869                    b.Property<int>("StreamIndex")
 27870                        .HasColumnType("INTEGER");
 27871
 27872                    b.Property<string>("AspectRatio")
 27873                        .HasColumnType("TEXT");
 27874
 27875                    b.Property<float?>("AverageFrameRate")
 27876                        .HasColumnType("REAL");
 27877
 27878                    b.Property<int?>("BitDepth")
 27879                        .HasColumnType("INTEGER");
 27880
 27881                    b.Property<int?>("BitRate")
 27882                        .HasColumnType("INTEGER");
 27883
 27884                    b.Property<int?>("BlPresentFlag")
 27885                        .HasColumnType("INTEGER");
 27886
 27887                    b.Property<string>("ChannelLayout")
 27888                        .HasColumnType("TEXT");
 27889
 27890                    b.Property<int?>("Channels")
 27891                        .HasColumnType("INTEGER");
 27892
 27893                    b.Property<string>("Codec")
 27894                        .HasColumnType("TEXT");
 27895
 27896                    b.Property<string>("CodecTag")
 27897                        .HasColumnType("TEXT");
 27898
 27899                    b.Property<string>("CodecTimeBase")
 27900                        .HasColumnType("TEXT");
 27901
 27902                    b.Property<string>("ColorPrimaries")
 27903                        .HasColumnType("TEXT");
 27904
 27905                    b.Property<string>("ColorSpace")
 27906                        .HasColumnType("TEXT");
 27907
 27908                    b.Property<string>("ColorTransfer")
 27909                        .HasColumnType("TEXT");
 27910
 27911                    b.Property<string>("Comment")
 27912                        .HasColumnType("TEXT");
 27913
 27914                    b.Property<int?>("DvBlSignalCompatibilityId")
 27915                        .HasColumnType("INTEGER");
 27916
 27917                    b.Property<int?>("DvLevel")
 27918                        .HasColumnType("INTEGER");
 27919
 27920                    b.Property<int?>("DvProfile")
 27921                        .HasColumnType("INTEGER");
 27922
 27923                    b.Property<int?>("DvVersionMajor")
 27924                        .HasColumnType("INTEGER");
 27925
 27926                    b.Property<int?>("DvVersionMinor")
 27927                        .HasColumnType("INTEGER");
 27928
 27929                    b.Property<int?>("ElPresentFlag")
 27930                        .HasColumnType("INTEGER");
 27931
 27932                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27933                        .HasColumnType("INTEGER");
 27934
 27935                    b.Property<int?>("Height")
 27936                        .HasColumnType("INTEGER");
 27937
 27938                    b.Property<bool?>("IsAnamorphic")
 27939                        .HasColumnType("INTEGER");
 27940
 27941                    b.Property<bool?>("IsAvc")
 27942                        .HasColumnType("INTEGER");
 27943
 27944                    b.Property<bool>("IsDefault")
 27945                        .HasColumnType("INTEGER");
 27946
 27947                    b.Property<bool>("IsExternal")
 27948                        .HasColumnType("INTEGER");
 27949
 27950                    b.Property<bool>("IsForced")
 27951                        .HasColumnType("INTEGER");
 27952
 27953                    b.Property<bool?>("IsHearingImpaired")
 27954                        .HasColumnType("INTEGER");
 27955
 27956                    b.Property<bool?>("IsInterlaced")
 27957                        .HasColumnType("INTEGER");
 27958
 27959                    b.Property<bool>("IsOriginal")
 27960                        .HasColumnType("INTEGER");
 27961
 27962                    b.Property<string>("KeyFrames")
 27963                        .HasColumnType("TEXT");
 27964
 27965                    b.Property<string>("Language")
 27966                        .HasColumnType("TEXT");
 27967
 27968                    b.Property<float?>("Level")
 27969                        .HasColumnType("REAL");
 27970
 27971                    b.Property<string>("NalLengthSize")
 27972                        .HasColumnType("TEXT");
 27973
 27974                    b.Property<string>("Path")
 27975                        .HasColumnType("TEXT");
 27976
 27977                    b.Property<string>("PixelFormat")
 27978                        .HasColumnType("TEXT");
 27979
 27980                    b.Property<string>("Profile")
 27981                        .HasColumnType("TEXT");
 27982
 27983                    b.Property<float?>("RealFrameRate")
 27984                        .HasColumnType("REAL");
 27985
 27986                    b.Property<int?>("RefFrames")
 27987                        .HasColumnType("INTEGER");
 27988
 27989                    b.Property<int?>("Rotation")
 27990                        .HasColumnType("INTEGER");
 27991
 27992                    b.Property<int?>("RpuPresentFlag")
 27993                        .HasColumnType("INTEGER");
 27994
 27995                    b.Property<int?>("SampleRate")
 27996                        .HasColumnType("INTEGER");
 27997
 27998                    b.Property<int>("StreamType")
 27999                        .HasColumnType("INTEGER");
 271000
 271001                    b.Property<string>("TimeBase")
 271002                        .HasColumnType("TEXT");
 271003
 271004                    b.Property<string>("Title")
 271005                        .HasColumnType("TEXT");
 271006
 271007                    b.Property<int?>("Width")
 271008                        .HasColumnType("INTEGER");
 271009
 271010                    b.HasKey("ItemId", "StreamIndex");
 271011
 271012                    b.HasIndex("StreamIndex");
 271013
 271014                    b.HasIndex("StreamType");
 271015
 271016                    b.HasIndex("StreamIndex", "StreamType");
 271017
 271018                    b.HasIndex("StreamIndex", "StreamType", "Language");
 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("PeopleId");
 271067
 271068                    b.HasIndex("ItemId", "ListOrder");
 271069
 271070                    b.HasIndex("ItemId", "SortOrder");
 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("DeviceId");
 271224
 271225                    b.HasIndex("AccessToken", "DateLastActivity");
 271226
 271227                    b.HasIndex("DeviceId", "DateLastActivity");
 271228
 271229                    b.HasIndex("UserId", "DeviceId");
 271230
 271231                    b.ToTable("Devices");
 271232
 271233                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271234                });
 1235
 271236            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271237                {
 271238                    b.Property<int>("Id")
 271239                        .ValueGeneratedOnAdd()
 271240                        .HasColumnType("INTEGER");
 271241
 271242                    b.Property<string>("CustomName")
 271243                        .HasColumnType("TEXT");
 271244
 271245                    b.Property<string>("DeviceId")
 271246                        .IsRequired()
 271247                        .HasColumnType("TEXT");
 271248
 271249                    b.HasKey("Id");
 271250
 271251                    b.HasIndex("DeviceId")
 271252                        .IsUnique();
 271253
 271254                    b.ToTable("DeviceOptions");
 271255
 271256                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271257                });
 1258
 271259            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271260                {
 271261                    b.Property<Guid>("ItemId")
 271262                        .HasColumnType("TEXT");
 271263
 271264                    b.Property<int>("Width")
 271265                        .HasColumnType("INTEGER");
 271266
 271267                    b.Property<int>("Bandwidth")
 271268                        .HasColumnType("INTEGER");
 271269
 271270                    b.Property<int>("Height")
 271271                        .HasColumnType("INTEGER");
 271272
 271273                    b.Property<int>("Interval")
 271274                        .HasColumnType("INTEGER");
 271275
 271276                    b.Property<int>("ThumbnailCount")
 271277                        .HasColumnType("INTEGER");
 271278
 271279                    b.Property<int>("TileHeight")
 271280                        .HasColumnType("INTEGER");
 271281
 271282                    b.Property<int>("TileWidth")
 271283                        .HasColumnType("INTEGER");
 271284
 271285                    b.HasKey("ItemId", "Width");
 271286
 271287                    b.ToTable("TrickplayInfos");
 271288
 271289                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271290                });
 1291
 271292            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271293                {
 271294                    b.Property<Guid>("Id")
 271295                        .ValueGeneratedOnAdd()
 271296                        .HasColumnType("TEXT");
 271297
 271298                    b.Property<string>("AudioLanguagePreference")
 271299                        .HasMaxLength(255)
 271300                        .HasColumnType("TEXT");
 271301
 271302                    b.Property<string>("AuthenticationProviderId")
 271303                        .IsRequired()
 271304                        .HasMaxLength(255)
 271305                        .HasColumnType("TEXT");
 271306
 271307                    b.Property<string>("CastReceiverId")
 271308                        .HasMaxLength(32)
 271309                        .HasColumnType("TEXT");
 271310
 271311                    b.Property<bool>("DisplayCollectionsView")
 271312                        .HasColumnType("INTEGER");
 271313
 271314                    b.Property<bool>("DisplayMissingEpisodes")
 271315                        .HasColumnType("INTEGER");
 271316
 271317                    b.Property<bool>("EnableAutoLogin")
 271318                        .HasColumnType("INTEGER");
 271319
 271320                    b.Property<bool>("EnableLocalPassword")
 271321                        .HasColumnType("INTEGER");
 271322
 271323                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271324                        .HasColumnType("INTEGER");
 271325
 271326                    b.Property<bool>("EnableUserPreferenceAccess")
 271327                        .HasColumnType("INTEGER");
 271328
 271329                    b.Property<bool>("HidePlayedInLatest")
 271330                        .HasColumnType("INTEGER");
 271331
 271332                    b.Property<long>("InternalId")
 271333                        .HasColumnType("INTEGER");
 271334
 271335                    b.Property<int>("InvalidLoginAttemptCount")
 271336                        .HasColumnType("INTEGER");
 271337
 271338                    b.Property<DateTime?>("LastActivityDate")
 271339                        .HasColumnType("TEXT");
 271340
 271341                    b.Property<DateTime?>("LastLoginDate")
 271342                        .HasColumnType("TEXT");
 271343
 271344                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271345                        .HasColumnType("INTEGER");
 271346
 271347                    b.Property<int>("MaxActiveSessions")
 271348                        .HasColumnType("INTEGER");
 271349
 271350                    b.Property<int?>("MaxParentalRatingScore")
 271351                        .HasColumnType("INTEGER");
 271352
 271353                    b.Property<int?>("MaxParentalRatingSubScore")
 271354                        .HasColumnType("INTEGER");
 271355
 271356                    b.Property<bool>("MustUpdatePassword")
 271357                        .HasColumnType("INTEGER");
 271358
 271359                    b.Property<string>("Password")
 271360                        .HasMaxLength(65535)
 271361                        .HasColumnType("TEXT");
 271362
 271363                    b.Property<string>("PasswordResetProviderId")
 271364                        .IsRequired()
 271365                        .HasMaxLength(255)
 271366                        .HasColumnType("TEXT");
 271367
 271368                    b.Property<bool>("PlayDefaultAudioTrack")
 271369                        .HasColumnType("INTEGER");
 271370
 271371                    b.Property<bool>("RememberAudioSelections")
 271372                        .HasColumnType("INTEGER");
 271373
 271374                    b.Property<bool>("RememberSubtitleSelections")
 271375                        .HasColumnType("INTEGER");
 271376
 271377                    b.Property<int?>("RemoteClientBitrateLimit")
 271378                        .HasColumnType("INTEGER");
 271379
 271380                    b.Property<uint>("RowVersion")
 271381                        .IsConcurrencyToken()
 271382                        .HasColumnType("INTEGER");
 271383
 271384                    b.Property<string>("SubtitleLanguagePreference")
 271385                        .HasMaxLength(255)
 271386                        .HasColumnType("TEXT");
 271387
 271388                    b.Property<int>("SubtitleMode")
 271389                        .HasColumnType("INTEGER");
 271390
 271391                    b.Property<int>("SyncPlayAccess")
 271392                        .HasColumnType("INTEGER");
 271393
 271394                    b.Property<string>("Username")
 271395                        .IsRequired()
 271396                        .HasMaxLength(255)
 271397                        .HasColumnType("TEXT");
 271398
 271399                    b.HasKey("Id");
 271400
 271401                    b.HasIndex("Username")
 271402                        .IsUnique();
 271403
 271404                    b.ToTable("Users");
 271405
 271406                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271407                });
 1408
 271409            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271410                {
 271411                    b.Property<Guid>("ItemId")
 271412                        .HasColumnType("TEXT");
 271413
 271414                    b.Property<Guid>("UserId")
 271415                        .HasColumnType("TEXT");
 271416
 271417                    b.Property<string>("CustomDataKey")
 271418                        .HasColumnType("TEXT");
 271419
 271420                    b.Property<int?>("AudioStreamIndex")
 271421                        .HasColumnType("INTEGER");
 271422
 271423                    b.Property<bool>("IsFavorite")
 271424                        .HasColumnType("INTEGER");
 271425
 271426                    b.Property<DateTime?>("LastPlayedDate")
 271427                        .HasColumnType("TEXT");
 271428
 271429                    b.Property<bool?>("Likes")
 271430                        .HasColumnType("INTEGER");
 271431
 271432                    b.Property<int>("PlayCount")
 271433                        .HasColumnType("INTEGER");
 271434
 271435                    b.Property<long>("PlaybackPositionTicks")
 271436                        .HasColumnType("INTEGER");
 271437
 271438                    b.Property<bool>("Played")
 271439                        .HasColumnType("INTEGER");
 271440
 271441                    b.Property<double?>("Rating")
 271442                        .HasColumnType("REAL");
 271443
 271444                    b.Property<DateTime?>("RetentionDate")
 271445                        .HasColumnType("TEXT");
 271446
 271447                    b.Property<int?>("SubtitleStreamIndex")
 271448                        .HasColumnType("INTEGER");
 271449
 271450                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271451
 271452                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271453
 271454                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271455
 271456                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271457
 271458                    b.HasIndex("ItemId", "UserId", "Played");
 271459
 271460                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 271461
 271462                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 271463
 271464                    b.HasIndex("UserId", "Played", "ItemId");
 271465
 271466                    b.ToTable("UserData");
 271467
 271468                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271469                });
 1470
 271471            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271472                {
 271473                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271474                        .WithMany("AccessSchedules")
 271475                        .HasForeignKey("UserId")
 271476                        .OnDelete(DeleteBehavior.Cascade)
 271477                        .IsRequired();
 271478                });
 1479
 271480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271481                {
 271482                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271483                        .WithMany("Parents")
 271484                        .HasForeignKey("ItemId")
 271485                        .OnDelete(DeleteBehavior.Cascade)
 271486                        .IsRequired();
 271487
 271488                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271489                        .WithMany("Children")
 271490                        .HasForeignKey("ParentItemId")
 271491                        .OnDelete(DeleteBehavior.Cascade)
 271492                        .IsRequired();
 271493
 271494                    b.Navigation("Item");
 271495
 271496                    b.Navigation("ParentItem");
 271497                });
 1498
 271499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271500                {
 271501                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271502                        .WithMany()
 271503                        .HasForeignKey("ItemId")
 271504                        .OnDelete(DeleteBehavior.Cascade)
 271505                        .IsRequired();
 271506
 271507                    b.Navigation("Item");
 271508                });
 1509
 271510            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271511                {
 271512                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 271513                        .WithMany("Extras")
 271514                        .HasForeignKey("OwnerId")
 271515                        .OnDelete(DeleteBehavior.NoAction);
 271516
 271517                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 271518                        .WithMany("DirectChildren")
 271519                        .HasForeignKey("ParentId")
 271520                        .OnDelete(DeleteBehavior.Cascade);
 271521
 271522                    b.Navigation("DirectParent");
 271523
 271524                    b.Navigation("Owner");
 271525                });
 1526
 271527            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271528                {
 271529                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271530                        .WithMany("Images")
 271531                        .HasForeignKey("ItemId")
 271532                        .OnDelete(DeleteBehavior.Cascade)
 271533                        .IsRequired();
 271534
 271535                    b.Navigation("Item");
 271536                });
 1537
 271538            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271539                {
 271540                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271541                        .WithMany("LockedFields")
 271542                        .HasForeignKey("ItemId")
 271543                        .OnDelete(DeleteBehavior.Cascade)
 271544                        .IsRequired();
 271545
 271546                    b.Navigation("Item");
 271547                });
 1548
 271549            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271550                {
 271551                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271552                        .WithMany("Provider")
 271553                        .HasForeignKey("ItemId")
 271554                        .OnDelete(DeleteBehavior.Cascade)
 271555                        .IsRequired();
 271556
 271557                    b.Navigation("Item");
 271558                });
 1559
 271560            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271561                {
 271562                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271563                        .WithMany("TrailerTypes")
 271564                        .HasForeignKey("ItemId")
 271565                        .OnDelete(DeleteBehavior.Cascade)
 271566                        .IsRequired();
 271567
 271568                    b.Navigation("Item");
 271569                });
 1570
 271571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271572                {
 271573                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271574                        .WithMany("Chapters")
 271575                        .HasForeignKey("ItemId")
 271576                        .OnDelete(DeleteBehavior.Cascade)
 271577                        .IsRequired();
 271578
 271579                    b.Navigation("Item");
 271580                });
 1581
 271582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271583                {
 271584                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271585                        .WithMany("DisplayPreferences")
 271586                        .HasForeignKey("UserId")
 271587                        .OnDelete(DeleteBehavior.Cascade)
 271588                        .IsRequired();
 271589                });
 1590
 271591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271592                {
 271593                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271594                        .WithMany("HomeSections")
 271595                        .HasForeignKey("DisplayPreferencesId")
 271596                        .OnDelete(DeleteBehavior.Cascade)
 271597                        .IsRequired();
 271598                });
 1599
 271600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271601                {
 271602                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271603                        .WithOne("ProfileImage")
 271604                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271605                        .OnDelete(DeleteBehavior.Cascade);
 271606                });
 1607
 271608            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271609                {
 271610                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271611                        .WithMany("ItemDisplayPreferences")
 271612                        .HasForeignKey("UserId")
 271613                        .OnDelete(DeleteBehavior.Cascade)
 271614                        .IsRequired();
 271615                });
 1616
 271617            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271618                {
 271619                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271620                        .WithMany("ItemValues")
 271621                        .HasForeignKey("ItemId")
 271622                        .OnDelete(DeleteBehavior.Cascade)
 271623                        .IsRequired();
 271624
 271625                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271626                        .WithMany("BaseItemsMap")
 271627                        .HasForeignKey("ItemValueId")
 271628                        .OnDelete(DeleteBehavior.Cascade)
 271629                        .IsRequired();
 271630
 271631                    b.Navigation("Item");
 271632
 271633                    b.Navigation("ItemValue");
 271634                });
 1635
 271636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271637                {
 271638                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271639                        .WithMany()
 271640                        .HasForeignKey("ItemId")
 271641                        .OnDelete(DeleteBehavior.Cascade)
 271642                        .IsRequired();
 271643
 271644                    b.Navigation("Item");
 271645                });
 1646
 271647            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 271648                {
 271649                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 271650                        .WithMany("LinkedChildOfEntities")
 271651                        .HasForeignKey("ChildId")
 271652                        .OnDelete(DeleteBehavior.NoAction)
 271653                        .IsRequired();
 271654
 271655                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 271656                        .WithMany("LinkedChildEntities")
 271657                        .HasForeignKey("ParentId")
 271658                        .OnDelete(DeleteBehavior.NoAction)
 271659                        .IsRequired();
 271660
 271661                    b.Navigation("Child");
 271662
 271663                    b.Navigation("Parent");
 271664                });
 1665
 271666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271667                {
 271668                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271669                        .WithMany("MediaStreams")
 271670                        .HasForeignKey("ItemId")
 271671                        .OnDelete(DeleteBehavior.Cascade)
 271672                        .IsRequired();
 271673
 271674                    b.Navigation("Item");
 271675                });
 1676
 271677            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271678                {
 271679                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271680                        .WithMany("Peoples")
 271681                        .HasForeignKey("ItemId")
 271682                        .OnDelete(DeleteBehavior.Cascade)
 271683                        .IsRequired();
 271684
 271685                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271686                        .WithMany("BaseItems")
 271687                        .HasForeignKey("PeopleId")
 271688                        .OnDelete(DeleteBehavior.Cascade)
 271689                        .IsRequired();
 271690
 271691                    b.Navigation("Item");
 271692
 271693                    b.Navigation("People");
 271694                });
 1695
 271696            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271697                {
 271698                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271699                        .WithMany("Permissions")
 271700                        .HasForeignKey("UserId")
 271701                        .OnDelete(DeleteBehavior.Cascade);
 271702                });
 1703
 271704            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271705                {
 271706                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271707                        .WithMany("Preferences")
 271708                        .HasForeignKey("UserId")
 271709                        .OnDelete(DeleteBehavior.Cascade);
 271710                });
 1711
 271712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271713                {
 271714                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271715                        .WithMany()
 271716                        .HasForeignKey("UserId")
 271717                        .OnDelete(DeleteBehavior.Cascade)
 271718                        .IsRequired();
 271719
 271720                    b.Navigation("User");
 271721                });
 1722
 271723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271724                {
 271725                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271726                        .WithMany("UserData")
 271727                        .HasForeignKey("ItemId")
 271728                        .OnDelete(DeleteBehavior.Cascade)
 271729                        .IsRequired();
 271730
 271731                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271732                        .WithMany()
 271733                        .HasForeignKey("UserId")
 271734                        .OnDelete(DeleteBehavior.Cascade)
 271735                        .IsRequired();
 271736
 271737                    b.Navigation("Item");
 271738
 271739                    b.Navigation("User");
 271740                });
 1741
 271742            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271743                {
 271744                    b.Navigation("Chapters");
 271745
 271746                    b.Navigation("Children");
 271747
 271748                    b.Navigation("DirectChildren");
 271749
 271750                    b.Navigation("Extras");
 271751
 271752                    b.Navigation("Images");
 271753
 271754                    b.Navigation("ItemValues");
 271755
 271756                    b.Navigation("LinkedChildEntities");
 271757
 271758                    b.Navigation("LinkedChildOfEntities");
 271759
 271760                    b.Navigation("LockedFields");
 271761
 271762                    b.Navigation("MediaStreams");
 271763
 271764                    b.Navigation("Parents");
 271765
 271766                    b.Navigation("Peoples");
 271767
 271768                    b.Navigation("Provider");
 271769
 271770                    b.Navigation("TrailerTypes");
 271771
 271772                    b.Navigation("UserData");
 271773                });
 1774
 271775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271776                {
 271777                    b.Navigation("HomeSections");
 271778                });
 1779
 271780            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271781                {
 271782                    b.Navigation("BaseItemsMap");
 271783                });
 1784
 271785            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271786                {
 271787                    b.Navigation("BaseItems");
 271788                });
 1789
 271790            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271791                {
 271792                    b.Navigation("AccessSchedules");
 271793
 271794                    b.Navigation("DisplayPreferences");
 271795
 271796                    b.Navigation("ItemDisplayPreferences");
 271797
 271798                    b.Navigation("Permissions");
 271799
 271800                    b.Navigation("Preferences");
 271801
 271802                    b.Navigation("ProfileImage");
 271803                });
 1804#pragma warning restore 612, 618
 271805        }
 1806    }
 1807}