< Summary - Jellyfin

Line coverage
99%
Covered lines: 1528
Uncovered lines: 8
Coverable lines: 1536
Total lines: 1632
Line coverage: 99.4%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/11/2026 - 12:15:59 AM Line coverage: 99.4% (1528/1536) Total lines: 1632

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/20241113133548_EnforceUniqueItemValue.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class EnforceUniqueItemValue : 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" },
 2721                unique: true);
 2722        }
 23
 24        /// <inheritdoc />
 25        protected override void Down(MigrationBuilder migrationBuilder)
 26        {
 027            migrationBuilder.DropIndex(
 028                name: "IX_ItemValues_Type_CleanValue",
 029                table: "ItemValues");
 30
 031            migrationBuilder.CreateIndex(
 032                name: "IX_ItemValues_Type_CleanValue",
 033                table: "ItemValues",
 034                columns: new[] { "Type", "CleanValue" });
 035        }
 36    }
 37}

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