< Summary - Jellyfin

Line coverage
99%
Covered lines: 1626
Uncovered lines: 12
Coverable lines: 1638
Total lines: 1738
Line coverage: 99.2%
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/11/2026 - 12:15:59 AM Line coverage: 99.2% (1629/1641) Total lines: 17418/11/2026 - 12:17:00 AM Line coverage: 99.2% (1626/1638) Total lines: 1738

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/20250405075612_FixItemValuesIndices.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixItemValuesIndices : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.DropIndex(
 2714                name: "IX_ItemValues_Type_CleanValue",
 2715                table: "ItemValues");
 16
 2717            migrationBuilder.CreateIndex(
 2718                name: "IX_ItemValues_Type_CleanValue",
 2719                table: "ItemValues",
 2720                columns: new[] { "Type", "CleanValue" });
 21
 2722            migrationBuilder.CreateIndex(
 2723                name: "IX_ItemValues_Type_Value",
 2724                table: "ItemValues",
 2725                columns: new[] { "Type", "Value" },
 2726                unique: true);
 2727        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_ItemValues_Type_CleanValue",
 034                table: "ItemValues");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_ItemValues_Type_Value",
 038                table: "ItemValues");
 39
 040            migrationBuilder.CreateIndex(
 041                name: "IX_ItemValues_Type_CleanValue",
 042                table: "ItemValues",
 043                columns: new[] { "Type", "CleanValue" },
 044                unique: true);
 045        }
 46    }
 47}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250405075612_FixItemValuesIndices.Designer.cs

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