< Summary - Jellyfin

Line coverage
99%
Covered lines: 1745
Uncovered lines: 15
Coverable lines: 1760
Total lines: 1865
Line coverage: 99.1%
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.1% (1745/1760) Total lines: 1865

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/20261002210711_MakeOwnerIdIndexesPartial.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 MakeOwnerIdIndexesPartial : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.DropIndex(
 2714                name: "IX_BaseItems_ExtraType_OwnerId",
 2715                table: "BaseItems");
 16
 2717            migrationBuilder.DropIndex(
 2718                name: "IX_BaseItems_OwnerId",
 2719                table: "BaseItems");
 20
 2721            migrationBuilder.CreateIndex(
 2722                name: "IX_BaseItems_ExtraType_OwnerId",
 2723                table: "BaseItems",
 2724                columns: new[] { "ExtraType", "OwnerId" },
 2725                filter: "\"ExtraType\" IS NOT NULL");
 26
 2727            migrationBuilder.CreateIndex(
 2728                name: "IX_BaseItems_OwnerId",
 2729                table: "BaseItems",
 2730                column: "OwnerId",
 2731                filter: "\"OwnerId\" IS NOT NULL");
 2732        }
 33
 34        /// <inheritdoc />
 35        protected override void Down(MigrationBuilder migrationBuilder)
 36        {
 037            migrationBuilder.DropIndex(
 038                name: "IX_BaseItems_ExtraType_OwnerId",
 039                table: "BaseItems");
 40
 041            migrationBuilder.DropIndex(
 042                name: "IX_BaseItems_OwnerId",
 043                table: "BaseItems");
 44
 045            migrationBuilder.CreateIndex(
 046                name: "IX_BaseItems_ExtraType_OwnerId",
 047                table: "BaseItems",
 048                columns: new[] { "ExtraType", "OwnerId" });
 49
 050            migrationBuilder.CreateIndex(
 051                name: "IX_BaseItems_OwnerId",
 052                table: "BaseItems",
 053                column: "OwnerId");
 054        }
 55    }
 56}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20261002210711_MakeOwnerIdIndexesPartial.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("20261002210711_MakeOwnerIdIndexesPartial")]
 15    partial class MakeOwnerIdIndexesPartial
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2721            modelBuilder.HasAnnotation("ProductVersion", "10.0.11");
 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                        .HasFilter("\"OwnerId\" IS NOT NULL");
 27373
 27374                    b.HasIndex("ParentId");
 27375
 27376                    b.HasIndex("Path");
 27377
 27378                    b.HasIndex("PresentationUniqueKey");
 27379
 27380                    b.HasIndex("PrimaryVersionId")
 27381                        .HasFilter("\"PrimaryVersionId\" IS NOT NULL");
 27382
 27383                    b.HasIndex("SeasonId");
 27384
 27385                    b.HasIndex("SeriesId");
 27386
 27387                    b.HasIndex("SeriesName");
 27388
 27389                    b.HasIndex("ExtraType", "OwnerId")
 27390                        .HasFilter("\"ExtraType\" IS NOT NULL");
 27391
 27392                    b.HasIndex("TopParentId", "Id");
 27393
 27394                    b.HasIndex("Type", "CleanName");
 27395
 27396                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 27397                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 27398
 27399                    b.HasIndex("Type", "TopParentId", "Id");
 27400
 27401                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27402
 27403                    b.HasIndex("Type", "TopParentId", "SortName");
 27404
 27405                    b.HasIndex("Type", "TopParentId", "StartDate");
 27406
 27407                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27408
 27409                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 27410
 27411                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 27412
 27413                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 27414
 27415                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27416
 27417                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 27418
 27419                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27420
 27421                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27422
 27423                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27424
 27425                    b.ToTable("BaseItems");
 27426
 27427                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27428
 27429                    b.HasData(
 27430                        new
 27431                        {
 27432                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27433                            IsFolder = false,
 27434                            IsInMixedFolder = false,
 27435                            IsLocked = false,
 27436                            IsMovie = false,
 27437                            IsRepeat = false,
 27438                            IsSeries = false,
 27439                            IsVirtualItem = false,
 27440                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 27441                            Type = "PLACEHOLDER"
 27442                        });
 27443                });
 444
 27445            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27446                {
 27447                    b.Property<Guid>("Id")
 27448                        .ValueGeneratedOnAdd()
 27449                        .HasColumnType("TEXT");
 27450
 27451                    b.Property<byte[]>("Blurhash")
 27452                        .HasColumnType("BLOB");
 27453
 27454                    b.Property<DateTime?>("DateModified")
 27455                        .HasColumnType("TEXT");
 27456
 27457                    b.Property<int>("Height")
 27458                        .HasColumnType("INTEGER");
 27459
 27460                    b.Property<int>("ImageType")
 27461                        .HasColumnType("INTEGER");
 27462
 27463                    b.Property<Guid>("ItemId")
 27464                        .HasColumnType("TEXT");
 27465
 27466                    b.Property<string>("Path")
 27467                        .IsRequired()
 27468                        .HasColumnType("TEXT");
 27469
 27470                    b.Property<int>("Width")
 27471                        .HasColumnType("INTEGER");
 27472
 27473                    b.HasKey("Id");
 27474
 27475                    b.HasIndex("ItemId", "ImageType");
 27476
 27477                    b.ToTable("BaseItemImageInfos");
 27478
 27479                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27480                });
 481
 27482            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27483                {
 27484                    b.Property<int>("Id")
 27485                        .HasColumnType("INTEGER");
 27486
 27487                    b.Property<Guid>("ItemId")
 27488                        .HasColumnType("TEXT");
 27489
 27490                    b.HasKey("Id", "ItemId");
 27491
 27492                    b.HasIndex("ItemId");
 27493
 27494                    b.ToTable("BaseItemMetadataFields");
 27495
 27496                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27497                });
 498
 27499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27500                {
 27501                    b.Property<Guid>("ItemId")
 27502                        .HasColumnType("TEXT");
 27503
 27504                    b.Property<string>("ProviderId")
 27505                        .HasColumnType("TEXT");
 27506
 27507                    b.Property<string>("ProviderValue")
 27508                        .IsRequired()
 27509                        .HasColumnType("TEXT");
 27510
 27511                    b.HasKey("ItemId", "ProviderId");
 27512
 27513                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 27514
 27515                    b.ToTable("BaseItemProviders");
 27516
 27517                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27518                });
 519
 27520            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27521                {
 27522                    b.Property<int>("Id")
 27523                        .HasColumnType("INTEGER");
 27524
 27525                    b.Property<Guid>("ItemId")
 27526                        .HasColumnType("TEXT");
 27527
 27528                    b.HasKey("Id", "ItemId");
 27529
 27530                    b.HasIndex("ItemId");
 27531
 27532                    b.ToTable("BaseItemTrailerTypes");
 27533
 27534                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27535                });
 536
 27537            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27538                {
 27539                    b.Property<Guid>("ItemId")
 27540                        .HasColumnType("TEXT");
 27541
 27542                    b.Property<int>("ChapterIndex")
 27543                        .HasColumnType("INTEGER");
 27544
 27545                    b.Property<DateTime?>("ImageDateModified")
 27546                        .HasColumnType("TEXT");
 27547
 27548                    b.Property<string>("ImagePath")
 27549                        .HasColumnType("TEXT");
 27550
 27551                    b.Property<string>("Name")
 27552                        .HasColumnType("TEXT");
 27553
 27554                    b.Property<long>("StartPositionTicks")
 27555                        .HasColumnType("INTEGER");
 27556
 27557                    b.HasKey("ItemId", "ChapterIndex");
 27558
 27559                    b.ToTable("Chapters");
 27560
 27561                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27562                });
 563
 27564            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27565                {
 27566                    b.Property<int>("Id")
 27567                        .ValueGeneratedOnAdd()
 27568                        .HasColumnType("INTEGER");
 27569
 27570                    b.Property<string>("Client")
 27571                        .IsRequired()
 27572                        .HasMaxLength(32)
 27573                        .HasColumnType("TEXT");
 27574
 27575                    b.Property<Guid>("ItemId")
 27576                        .HasColumnType("TEXT");
 27577
 27578                    b.Property<string>("Key")
 27579                        .IsRequired()
 27580                        .HasColumnType("TEXT");
 27581
 27582                    b.Property<Guid>("UserId")
 27583                        .HasColumnType("TEXT");
 27584
 27585                    b.Property<string>("Value")
 27586                        .HasColumnType("TEXT");
 27587
 27588                    b.HasKey("Id");
 27589
 27590                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27591                        .IsUnique();
 27592
 27593                    b.ToTable("CustomItemDisplayPreferences");
 27594
 27595                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27596                });
 597
 27598            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27599                {
 27600                    b.Property<int>("Id")
 27601                        .ValueGeneratedOnAdd()
 27602                        .HasColumnType("INTEGER");
 27603
 27604                    b.Property<int>("ChromecastVersion")
 27605                        .HasColumnType("INTEGER");
 27606
 27607                    b.Property<string>("Client")
 27608                        .IsRequired()
 27609                        .HasMaxLength(32)
 27610                        .HasColumnType("TEXT");
 27611
 27612                    b.Property<string>("DashboardTheme")
 27613                        .HasMaxLength(32)
 27614                        .HasColumnType("TEXT");
 27615
 27616                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27617                        .HasColumnType("INTEGER");
 27618
 27619                    b.Property<int?>("IndexBy")
 27620                        .HasColumnType("INTEGER");
 27621
 27622                    b.Property<Guid>("ItemId")
 27623                        .HasColumnType("TEXT");
 27624
 27625                    b.Property<int>("ScrollDirection")
 27626                        .HasColumnType("INTEGER");
 27627
 27628                    b.Property<bool>("ShowBackdrop")
 27629                        .HasColumnType("INTEGER");
 27630
 27631                    b.Property<bool>("ShowSidebar")
 27632                        .HasColumnType("INTEGER");
 27633
 27634                    b.Property<int>("SkipBackwardLength")
 27635                        .HasColumnType("INTEGER");
 27636
 27637                    b.Property<int>("SkipForwardLength")
 27638                        .HasColumnType("INTEGER");
 27639
 27640                    b.Property<string>("TvHome")
 27641                        .HasMaxLength(32)
 27642                        .HasColumnType("TEXT");
 27643
 27644                    b.Property<Guid>("UserId")
 27645                        .HasColumnType("TEXT");
 27646
 27647                    b.HasKey("Id");
 27648
 27649                    b.HasIndex("UserId", "ItemId", "Client")
 27650                        .IsUnique();
 27651
 27652                    b.ToTable("DisplayPreferences");
 27653
 27654                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27655                });
 656
 27657            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27658                {
 27659                    b.Property<int>("Id")
 27660                        .ValueGeneratedOnAdd()
 27661                        .HasColumnType("INTEGER");
 27662
 27663                    b.Property<int>("DisplayPreferencesId")
 27664                        .HasColumnType("INTEGER");
 27665
 27666                    b.Property<int>("Order")
 27667                        .HasColumnType("INTEGER");
 27668
 27669                    b.Property<int>("Type")
 27670                        .HasColumnType("INTEGER");
 27671
 27672                    b.HasKey("Id");
 27673
 27674                    b.HasIndex("DisplayPreferencesId");
 27675
 27676                    b.ToTable("HomeSection");
 27677
 27678                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27679                });
 680
 27681            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27682                {
 27683                    b.Property<int>("Id")
 27684                        .ValueGeneratedOnAdd()
 27685                        .HasColumnType("INTEGER");
 27686
 27687                    b.Property<DateTime>("LastModified")
 27688                        .HasColumnType("TEXT");
 27689
 27690                    b.Property<string>("Path")
 27691                        .IsRequired()
 27692                        .HasMaxLength(512)
 27693                        .HasColumnType("TEXT");
 27694
 27695                    b.Property<Guid?>("UserId")
 27696                        .HasColumnType("TEXT");
 27697
 27698                    b.HasKey("Id");
 27699
 27700                    b.HasIndex("UserId")
 27701                        .IsUnique();
 27702
 27703                    b.ToTable("ImageInfos");
 27704
 27705                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27706                });
 707
 27708            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27709                {
 27710                    b.Property<int>("Id")
 27711                        .ValueGeneratedOnAdd()
 27712                        .HasColumnType("INTEGER");
 27713
 27714                    b.Property<string>("Client")
 27715                        .IsRequired()
 27716                        .HasMaxLength(32)
 27717                        .HasColumnType("TEXT");
 27718
 27719                    b.Property<int?>("IndexBy")
 27720                        .HasColumnType("INTEGER");
 27721
 27722                    b.Property<Guid>("ItemId")
 27723                        .HasColumnType("TEXT");
 27724
 27725                    b.Property<bool>("RememberIndexing")
 27726                        .HasColumnType("INTEGER");
 27727
 27728                    b.Property<bool>("RememberSorting")
 27729                        .HasColumnType("INTEGER");
 27730
 27731                    b.Property<string>("SortBy")
 27732                        .IsRequired()
 27733                        .HasMaxLength(64)
 27734                        .HasColumnType("TEXT");
 27735
 27736                    b.Property<int>("SortOrder")
 27737                        .HasColumnType("INTEGER");
 27738
 27739                    b.Property<Guid>("UserId")
 27740                        .HasColumnType("TEXT");
 27741
 27742                    b.Property<int>("ViewType")
 27743                        .HasColumnType("INTEGER");
 27744
 27745                    b.HasKey("Id");
 27746
 27747                    b.HasIndex("UserId");
 27748
 27749                    b.ToTable("ItemDisplayPreferences");
 27750
 27751                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27752                });
 753
 27754            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27755                {
 27756                    b.Property<Guid>("ItemValueId")
 27757                        .ValueGeneratedOnAdd()
 27758                        .HasColumnType("TEXT");
 27759
 27760                    b.Property<string>("CleanValue")
 27761                        .IsRequired()
 27762                        .HasColumnType("TEXT");
 27763
 27764                    b.Property<int>("Type")
 27765                        .HasColumnType("INTEGER");
 27766
 27767                    b.Property<string>("Value")
 27768                        .IsRequired()
 27769                        .HasColumnType("TEXT");
 27770
 27771                    b.HasKey("ItemValueId");
 27772
 27773                    b.HasIndex("Type", "CleanValue");
 27774
 27775                    b.HasIndex("Type", "Value")
 27776                        .IsUnique();
 27777
 27778                    b.ToTable("ItemValues");
 27779
 27780                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27781                });
 782
 27783            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27784                {
 27785                    b.Property<Guid>("ItemValueId")
 27786                        .HasColumnType("TEXT");
 27787
 27788                    b.Property<Guid>("ItemId")
 27789                        .HasColumnType("TEXT");
 27790
 27791                    b.HasKey("ItemValueId", "ItemId");
 27792
 27793                    b.HasIndex("ItemId");
 27794
 27795                    b.ToTable("ItemValuesMap");
 27796
 27797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27798                });
 799
 27800            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27801                {
 27802                    b.Property<Guid>("ItemId")
 27803                        .HasColumnType("TEXT");
 27804
 27805                    b.PrimitiveCollection<string>("KeyframeTicks")
 27806                        .HasColumnType("TEXT");
 27807
 27808                    b.Property<long>("TotalDuration")
 27809                        .HasColumnType("INTEGER");
 27810
 27811                    b.HasKey("ItemId");
 27812
 27813                    b.ToTable("KeyframeData");
 27814
 27815                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27816                });
 817
 27818            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 27819                {
 27820                    b.Property<Guid>("ParentId")
 27821                        .HasColumnType("TEXT");
 27822
 27823                    b.Property<int>("SortOrder")
 27824                        .HasColumnType("INTEGER");
 27825
 27826                    b.Property<Guid>("ChildId")
 27827                        .HasColumnType("TEXT");
 27828
 27829                    b.Property<int>("ChildType")
 27830                        .HasColumnType("INTEGER");
 27831
 27832                    b.HasKey("ParentId", "SortOrder");
 27833
 27834                    b.HasIndex("ChildId", "ChildType");
 27835
 27836                    b.HasIndex("ParentId", "ChildType");
 27837
 27838                    b.ToTable("LinkedChildren", (string)null);
 27839
 27840                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27841                });
 842
 27843            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27844                {
 27845                    b.Property<Guid>("Id")
 27846                        .ValueGeneratedOnAdd()
 27847                        .HasColumnType("TEXT");
 27848
 27849                    b.Property<long>("EndTicks")
 27850                        .HasColumnType("INTEGER");
 27851
 27852                    b.Property<Guid>("ItemId")
 27853                        .HasColumnType("TEXT");
 27854
 27855                    b.Property<string>("SegmentProviderId")
 27856                        .IsRequired()
 27857                        .HasColumnType("TEXT");
 27858
 27859                    b.Property<long>("StartTicks")
 27860                        .HasColumnType("INTEGER");
 27861
 27862                    b.Property<int>("Type")
 27863                        .HasColumnType("INTEGER");
 27864
 27865                    b.HasKey("Id");
 27866
 27867                    b.ToTable("MediaSegments");
 27868
 27869                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27870                });
 871
 27872            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27873                {
 27874                    b.Property<Guid>("ItemId")
 27875                        .HasColumnType("TEXT");
 27876
 27877                    b.Property<int>("StreamIndex")
 27878                        .HasColumnType("INTEGER");
 27879
 27880                    b.Property<string>("AspectRatio")
 27881                        .HasColumnType("TEXT");
 27882
 27883                    b.Property<float?>("AverageFrameRate")
 27884                        .HasColumnType("REAL");
 27885
 27886                    b.Property<int?>("BitDepth")
 27887                        .HasColumnType("INTEGER");
 27888
 27889                    b.Property<int?>("BitRate")
 27890                        .HasColumnType("INTEGER");
 27891
 27892                    b.Property<int?>("BlPresentFlag")
 27893                        .HasColumnType("INTEGER");
 27894
 27895                    b.Property<string>("ChannelLayout")
 27896                        .HasColumnType("TEXT");
 27897
 27898                    b.Property<int?>("Channels")
 27899                        .HasColumnType("INTEGER");
 27900
 27901                    b.Property<string>("Codec")
 27902                        .HasColumnType("TEXT");
 27903
 27904                    b.Property<string>("CodecTag")
 27905                        .HasColumnType("TEXT");
 27906
 27907                    b.Property<string>("CodecTimeBase")
 27908                        .HasColumnType("TEXT");
 27909
 27910                    b.Property<string>("ColorPrimaries")
 27911                        .HasColumnType("TEXT");
 27912
 27913                    b.Property<string>("ColorSpace")
 27914                        .HasColumnType("TEXT");
 27915
 27916                    b.Property<string>("ColorTransfer")
 27917                        .HasColumnType("TEXT");
 27918
 27919                    b.Property<string>("Comment")
 27920                        .HasColumnType("TEXT");
 27921
 27922                    b.Property<int?>("DvBlSignalCompatibilityId")
 27923                        .HasColumnType("INTEGER");
 27924
 27925                    b.Property<int?>("DvLevel")
 27926                        .HasColumnType("INTEGER");
 27927
 27928                    b.Property<int?>("DvProfile")
 27929                        .HasColumnType("INTEGER");
 27930
 27931                    b.Property<int?>("DvVersionMajor")
 27932                        .HasColumnType("INTEGER");
 27933
 27934                    b.Property<int?>("DvVersionMinor")
 27935                        .HasColumnType("INTEGER");
 27936
 27937                    b.Property<int?>("ElPresentFlag")
 27938                        .HasColumnType("INTEGER");
 27939
 27940                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27941                        .HasColumnType("INTEGER");
 27942
 27943                    b.Property<int?>("Height")
 27944                        .HasColumnType("INTEGER");
 27945
 27946                    b.Property<bool?>("IsAnamorphic")
 27947                        .HasColumnType("INTEGER");
 27948
 27949                    b.Property<bool?>("IsAvc")
 27950                        .HasColumnType("INTEGER");
 27951
 27952                    b.Property<bool>("IsDefault")
 27953                        .HasColumnType("INTEGER");
 27954
 27955                    b.Property<bool>("IsExternal")
 27956                        .HasColumnType("INTEGER");
 27957
 27958                    b.Property<bool>("IsForced")
 27959                        .HasColumnType("INTEGER");
 27960
 27961                    b.Property<bool?>("IsHearingImpaired")
 27962                        .HasColumnType("INTEGER");
 27963
 27964                    b.Property<bool?>("IsInterlaced")
 27965                        .HasColumnType("INTEGER");
 27966
 27967                    b.Property<bool>("IsOriginal")
 27968                        .HasColumnType("INTEGER");
 27969
 27970                    b.Property<string>("KeyFrames")
 27971                        .HasColumnType("TEXT");
 27972
 27973                    b.Property<string>("Language")
 27974                        .HasColumnType("TEXT");
 27975
 27976                    b.Property<float?>("Level")
 27977                        .HasColumnType("REAL");
 27978
 27979                    b.Property<string>("NalLengthSize")
 27980                        .HasColumnType("TEXT");
 27981
 27982                    b.Property<string>("Path")
 27983                        .HasColumnType("TEXT");
 27984
 27985                    b.Property<string>("PixelFormat")
 27986                        .HasColumnType("TEXT");
 27987
 27988                    b.Property<string>("Profile")
 27989                        .HasColumnType("TEXT");
 27990
 27991                    b.Property<float?>("RealFrameRate")
 27992                        .HasColumnType("REAL");
 27993
 27994                    b.Property<int?>("RefFrames")
 27995                        .HasColumnType("INTEGER");
 27996
 27997                    b.Property<int?>("Rotation")
 27998                        .HasColumnType("INTEGER");
 27999
 271000                    b.Property<int?>("RpuPresentFlag")
 271001                        .HasColumnType("INTEGER");
 271002
 271003                    b.Property<int?>("SampleRate")
 271004                        .HasColumnType("INTEGER");
 271005
 271006                    b.Property<int>("StreamType")
 271007                        .HasColumnType("INTEGER");
 271008
 271009                    b.Property<string>("TimeBase")
 271010                        .HasColumnType("TEXT");
 271011
 271012                    b.Property<string>("Title")
 271013                        .HasColumnType("TEXT");
 271014
 271015                    b.Property<int?>("Width")
 271016                        .HasColumnType("INTEGER");
 271017
 271018                    b.HasKey("ItemId", "StreamIndex");
 271019
 271020                    b.HasIndex("StreamType", "ItemId", "Language", "IsExternal");
 271021
 271022                    b.ToTable("MediaStreamInfos");
 271023
 271024                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271025                });
 1026
 271027            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271028                {
 271029                    b.Property<Guid>("Id")
 271030                        .ValueGeneratedOnAdd()
 271031                        .HasColumnType("TEXT");
 271032
 271033                    b.Property<string>("Name")
 271034                        .IsRequired()
 271035                        .HasColumnType("TEXT");
 271036
 271037                    b.Property<string>("PersonType")
 271038                        .HasColumnType("TEXT");
 271039
 271040                    b.HasKey("Id");
 271041
 271042                    b.HasIndex("Name");
 271043
 271044                    b.ToTable("Peoples");
 271045
 271046                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271047                });
 1048
 271049            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271050                {
 271051                    b.Property<Guid>("ItemId")
 271052                        .HasColumnType("TEXT");
 271053
 271054                    b.Property<Guid>("PeopleId")
 271055                        .HasColumnType("TEXT");
 271056
 271057                    b.Property<string>("Role")
 271058                        .HasColumnType("TEXT");
 271059
 271060                    b.Property<int?>("ListOrder")
 271061                        .HasColumnType("INTEGER");
 271062
 271063                    b.Property<int?>("SortOrder")
 271064                        .HasColumnType("INTEGER");
 271065
 271066                    b.HasKey("ItemId", "PeopleId", "Role");
 271067
 271068                    b.HasIndex("ItemId", "ListOrder");
 271069
 271070                    b.HasIndex("ItemId", "SortOrder");
 271071
 271072                    b.HasIndex("PeopleId", "ItemId");
 271073
 271074                    b.ToTable("PeopleBaseItemMap");
 271075
 271076                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271077                });
 1078
 271079            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271080                {
 271081                    b.Property<int>("Id")
 271082                        .ValueGeneratedOnAdd()
 271083                        .HasColumnType("INTEGER");
 271084
 271085                    b.Property<int>("Kind")
 271086                        .HasColumnType("INTEGER");
 271087
 271088                    b.Property<uint>("RowVersion")
 271089                        .IsConcurrencyToken()
 271090                        .HasColumnType("INTEGER");
 271091
 271092                    b.Property<Guid>("UserId")
 271093                        .HasColumnType("TEXT");
 271094
 271095                    b.Property<bool>("Value")
 271096                        .HasColumnType("INTEGER");
 271097
 271098                    b.HasKey("Id");
 271099
 271100                    b.HasIndex("UserId", "Kind")
 271101                        .IsUnique();
 271102
 271103                    b.ToTable("Permissions");
 271104
 271105                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271106                });
 1107
 271108            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271109                {
 271110                    b.Property<int>("Id")
 271111                        .ValueGeneratedOnAdd()
 271112                        .HasColumnType("INTEGER");
 271113
 271114                    b.Property<int>("Kind")
 271115                        .HasColumnType("INTEGER");
 271116
 271117                    b.Property<uint>("RowVersion")
 271118                        .IsConcurrencyToken()
 271119                        .HasColumnType("INTEGER");
 271120
 271121                    b.Property<Guid>("UserId")
 271122                        .HasColumnType("TEXT");
 271123
 271124                    b.Property<string>("Value")
 271125                        .IsRequired()
 271126                        .HasMaxLength(65535)
 271127                        .HasColumnType("TEXT");
 271128
 271129                    b.HasKey("Id");
 271130
 271131                    b.HasIndex("UserId", "Kind")
 271132                        .IsUnique();
 271133
 271134                    b.ToTable("Preferences");
 271135
 271136                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271137                });
 1138
 271139            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271140                {
 271141                    b.Property<int>("Id")
 271142                        .ValueGeneratedOnAdd()
 271143                        .HasColumnType("INTEGER");
 271144
 271145                    b.Property<string>("AccessToken")
 271146                        .IsRequired()
 271147                        .HasColumnType("TEXT");
 271148
 271149                    b.Property<DateTime>("DateCreated")
 271150                        .HasColumnType("TEXT");
 271151
 271152                    b.Property<DateTime>("DateLastActivity")
 271153                        .HasColumnType("TEXT");
 271154
 271155                    b.Property<string>("Name")
 271156                        .IsRequired()
 271157                        .HasMaxLength(64)
 271158                        .HasColumnType("TEXT");
 271159
 271160                    b.HasKey("Id");
 271161
 271162                    b.HasIndex("AccessToken")
 271163                        .IsUnique();
 271164
 271165                    b.ToTable("ApiKeys");
 271166
 271167                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271168                });
 1169
 271170            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271171                {
 271172                    b.Property<int>("Id")
 271173                        .ValueGeneratedOnAdd()
 271174                        .HasColumnType("INTEGER");
 271175
 271176                    b.Property<string>("AccessToken")
 271177                        .IsRequired()
 271178                        .HasColumnType("TEXT");
 271179
 271180                    b.Property<string>("AppName")
 271181                        .IsRequired()
 271182                        .HasMaxLength(64)
 271183                        .HasColumnType("TEXT");
 271184
 271185                    b.Property<string>("AppVersion")
 271186                        .IsRequired()
 271187                        .HasMaxLength(32)
 271188                        .HasColumnType("TEXT");
 271189
 271190                    b.Property<DateTime>("DateCreated")
 271191                        .HasColumnType("TEXT");
 271192
 271193                    b.Property<DateTime>("DateLastActivity")
 271194                        .HasColumnType("TEXT");
 271195
 271196                    b.Property<DateTime>("DateModified")
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.Property<string>("DeviceId")
 271200                        .IsRequired()
 271201                        .HasMaxLength(256)
 271202                        .HasColumnType("TEXT");
 271203
 271204                    b.Property<string>("DeviceName")
 271205                        .IsRequired()
 271206                        .HasMaxLength(64)
 271207                        .HasColumnType("TEXT");
 271208
 271209                    b.Property<bool>("IsActive")
 271210                        .HasColumnType("INTEGER");
 271211
 271212                    b.Property<Guid>("UserId")
 271213                        .HasColumnType("TEXT");
 271214
 271215                    b.HasKey("Id");
 271216
 271217                    b.HasIndex("AccessToken", "DateLastActivity");
 271218
 271219                    b.HasIndex("DeviceId", "DateLastActivity");
 271220
 271221                    b.HasIndex("UserId", "DeviceId");
 271222
 271223                    b.ToTable("Devices");
 271224
 271225                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271226                });
 1227
 271228            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271229                {
 271230                    b.Property<int>("Id")
 271231                        .ValueGeneratedOnAdd()
 271232                        .HasColumnType("INTEGER");
 271233
 271234                    b.Property<string>("CustomName")
 271235                        .HasColumnType("TEXT");
 271236
 271237                    b.Property<string>("DeviceId")
 271238                        .IsRequired()
 271239                        .HasColumnType("TEXT");
 271240
 271241                    b.HasKey("Id");
 271242
 271243                    b.HasIndex("DeviceId")
 271244                        .IsUnique();
 271245
 271246                    b.ToTable("DeviceOptions");
 271247
 271248                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271249                });
 1250
 271251            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271252                {
 271253                    b.Property<Guid>("ItemId")
 271254                        .HasColumnType("TEXT");
 271255
 271256                    b.Property<int>("Width")
 271257                        .HasColumnType("INTEGER");
 271258
 271259                    b.Property<int>("Bandwidth")
 271260                        .HasColumnType("INTEGER");
 271261
 271262                    b.Property<int>("Height")
 271263                        .HasColumnType("INTEGER");
 271264
 271265                    b.Property<int>("Interval")
 271266                        .HasColumnType("INTEGER");
 271267
 271268                    b.Property<int>("ThumbnailCount")
 271269                        .HasColumnType("INTEGER");
 271270
 271271                    b.Property<int>("TileHeight")
 271272                        .HasColumnType("INTEGER");
 271273
 271274                    b.Property<int>("TileWidth")
 271275                        .HasColumnType("INTEGER");
 271276
 271277                    b.HasKey("ItemId", "Width");
 271278
 271279                    b.ToTable("TrickplayInfos");
 271280
 271281                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271282                });
 1283
 271284            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271285                {
 271286                    b.Property<Guid>("Id")
 271287                        .ValueGeneratedOnAdd()
 271288                        .HasColumnType("TEXT");
 271289
 271290                    b.Property<string>("AudioLanguagePreference")
 271291                        .HasMaxLength(255)
 271292                        .HasColumnType("TEXT");
 271293
 271294                    b.Property<string>("AuthenticationProviderId")
 271295                        .IsRequired()
 271296                        .HasMaxLength(255)
 271297                        .HasColumnType("TEXT");
 271298
 271299                    b.Property<string>("CastReceiverId")
 271300                        .HasMaxLength(32)
 271301                        .HasColumnType("TEXT");
 271302
 271303                    b.Property<bool>("DisplayCollectionsView")
 271304                        .HasColumnType("INTEGER");
 271305
 271306                    b.Property<bool>("DisplayMissingEpisodes")
 271307                        .HasColumnType("INTEGER");
 271308
 271309                    b.Property<bool>("EnableAutoLogin")
 271310                        .HasColumnType("INTEGER");
 271311
 271312                    b.Property<bool>("EnableLocalPassword")
 271313                        .HasColumnType("INTEGER");
 271314
 271315                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271316                        .HasColumnType("INTEGER");
 271317
 271318                    b.Property<bool>("EnableUserPreferenceAccess")
 271319                        .HasColumnType("INTEGER");
 271320
 271321                    b.Property<bool>("HidePlayedInLatest")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<long>("InternalId")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<int>("InvalidLoginAttemptCount")
 271328                        .HasColumnType("INTEGER");
 271329
 271330                    b.Property<DateTime?>("LastActivityDate")
 271331                        .HasColumnType("TEXT");
 271332
 271333                    b.Property<DateTime?>("LastLoginDate")
 271334                        .HasColumnType("TEXT");
 271335
 271336                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271337                        .HasColumnType("INTEGER");
 271338
 271339                    b.Property<int>("MaxActiveSessions")
 271340                        .HasColumnType("INTEGER");
 271341
 271342                    b.Property<int?>("MaxParentalRatingScore")
 271343                        .HasColumnType("INTEGER");
 271344
 271345                    b.Property<int?>("MaxParentalRatingSubScore")
 271346                        .HasColumnType("INTEGER");
 271347
 271348                    b.Property<bool>("MustUpdatePassword")
 271349                        .HasColumnType("INTEGER");
 271350
 271351                    b.Property<string>("NormalizedUsername")
 271352                        .IsRequired()
 271353                        .HasMaxLength(255)
 271354                        .HasColumnType("TEXT");
 271355
 271356                    b.Property<string>("Password")
 271357                        .HasMaxLength(65535)
 271358                        .HasColumnType("TEXT");
 271359
 271360                    b.Property<string>("PasswordResetProviderId")
 271361                        .IsRequired()
 271362                        .HasMaxLength(255)
 271363                        .HasColumnType("TEXT");
 271364
 271365                    b.Property<bool>("PlayDefaultAudioTrack")
 271366                        .HasColumnType("INTEGER");
 271367
 271368                    b.Property<bool>("RememberAudioSelections")
 271369                        .HasColumnType("INTEGER");
 271370
 271371                    b.Property<bool>("RememberSubtitleSelections")
 271372                        .HasColumnType("INTEGER");
 271373
 271374                    b.Property<int?>("RemoteClientBitrateLimit")
 271375                        .HasColumnType("INTEGER");
 271376
 271377                    b.Property<uint>("RowVersion")
 271378                        .IsConcurrencyToken()
 271379                        .HasColumnType("INTEGER");
 271380
 271381                    b.Property<string>("SubtitleLanguagePreference")
 271382                        .HasMaxLength(255)
 271383                        .HasColumnType("TEXT");
 271384
 271385                    b.Property<int>("SubtitleMode")
 271386                        .HasColumnType("INTEGER");
 271387
 271388                    b.Property<int>("SyncPlayAccess")
 271389                        .HasColumnType("INTEGER");
 271390
 271391                    b.Property<string>("Username")
 271392                        .IsRequired()
 271393                        .HasMaxLength(255)
 271394                        .HasColumnType("TEXT");
 271395
 271396                    b.HasKey("Id");
 271397
 271398                    b.HasIndex("NormalizedUsername")
 271399                        .IsUnique();
 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                        .IsRequired();
 271703                });
 1704
 271705            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271706                {
 271707                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271708                        .WithMany("Preferences")
 271709                        .HasForeignKey("UserId")
 271710                        .OnDelete(DeleteBehavior.Cascade)
 271711                        .IsRequired();
 271712                });
 1713
 271714            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271715                {
 271716                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271717                        .WithMany()
 271718                        .HasForeignKey("UserId")
 271719                        .OnDelete(DeleteBehavior.Cascade)
 271720                        .IsRequired();
 271721
 271722                    b.Navigation("User");
 271723                });
 1724
 271725            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271726                {
 271727                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271728                        .WithMany("UserData")
 271729                        .HasForeignKey("ItemId")
 271730                        .OnDelete(DeleteBehavior.Cascade)
 271731                        .IsRequired();
 271732
 271733                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271734                        .WithMany()
 271735                        .HasForeignKey("UserId")
 271736                        .OnDelete(DeleteBehavior.Cascade)
 271737                        .IsRequired();
 271738
 271739                    b.Navigation("Item");
 271740
 271741                    b.Navigation("User");
 271742                });
 1743
 271744            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271745                {
 271746                    b.Navigation("Chapters");
 271747
 271748                    b.Navigation("Children");
 271749
 271750                    b.Navigation("DirectChildren");
 271751
 271752                    b.Navigation("Extras");
 271753
 271754                    b.Navigation("Images");
 271755
 271756                    b.Navigation("ItemValues");
 271757
 271758                    b.Navigation("LinkedChildEntities");
 271759
 271760                    b.Navigation("LinkedChildOfEntities");
 271761
 271762                    b.Navigation("LockedFields");
 271763
 271764                    b.Navigation("MediaStreams");
 271765
 271766                    b.Navigation("Parents");
 271767
 271768                    b.Navigation("Peoples");
 271769
 271770                    b.Navigation("Provider");
 271771
 271772                    b.Navigation("TrailerTypes");
 271773
 271774                    b.Navigation("UserData");
 271775                });
 1776
 271777            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271778                {
 271779                    b.Navigation("HomeSections");
 271780                });
 1781
 271782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271783                {
 271784                    b.Navigation("BaseItemsMap");
 271785                });
 1786
 271787            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271788                {
 271789                    b.Navigation("BaseItems");
 271790                });
 1791
 271792            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271793                {
 271794                    b.Navigation("AccessSchedules");
 271795
 271796                    b.Navigation("DisplayPreferences");
 271797
 271798                    b.Navigation("ItemDisplayPreferences");
 271799
 271800                    b.Navigation("Permissions");
 271801
 271802                    b.Navigation("Preferences");
 271803
 271804                    b.Navigation("ProfileImage");
 271805                });
 1806#pragma warning restore 612, 618
 271807        }
 1808    }
 1809}