< Summary - Jellyfin

Line coverage
98%
Covered lines: 1537
Uncovered lines: 16
Coverable lines: 1553
Total lines: 1652
Line coverage: 98.9%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/16/2026 - 12:15:55 AM Line coverage: 98.9% (1537/1553) Total lines: 1652

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/20241112152323_FixAncestorIdConfig.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class FixAncestorIdConfig : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2714            migrationBuilder.DropForeignKey(
 2715                name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
 2716                table: "AncestorIds");
 17
 2718            migrationBuilder.DropIndex(
 2719                name: "IX_AncestorIds_BaseItemEntityId",
 2720                table: "AncestorIds");
 21
 2722            migrationBuilder.DropColumn(
 2723                name: "BaseItemEntityId",
 2724                table: "AncestorIds");
 2725        }
 26
 27        /// <inheritdoc />
 28        protected override void Down(MigrationBuilder migrationBuilder)
 29        {
 030            migrationBuilder.AddColumn<Guid>(
 031                name: "BaseItemEntityId",
 032                table: "AncestorIds",
 033                type: "TEXT",
 034                nullable: true);
 35
 036            migrationBuilder.CreateIndex(
 037                name: "IX_AncestorIds_BaseItemEntityId",
 038                table: "AncestorIds",
 039                column: "BaseItemEntityId");
 40
 041            migrationBuilder.AddForeignKey(
 042                name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
 043                table: "AncestorIds",
 044                column: "BaseItemEntityId",
 045                principalTable: "BaseItems",
 046                principalColumn: "Id");
 047        }
 48    }
 49}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.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("20241112152323_FixAncestorIdConfig")]
 15    partial class FixAncestorIdConfig
 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
 27698                    b.ToTable("ItemValues");
 27699                });
 700
 27701            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 27702                {
 27703                    b.Property<Guid>("ItemValueId")
 27704                        .HasColumnType("TEXT");
 27705
 27706                    b.Property<Guid>("ItemId")
 27707                        .HasColumnType("TEXT");
 27708
 27709                    b.HasKey("ItemValueId", "ItemId");
 27710
 27711                    b.HasIndex("ItemId");
 27712
 27713                    b.ToTable("ItemValuesMap");
 27714                });
 715
 27716            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 27717                {
 27718                    b.Property<Guid>("Id")
 27719                        .ValueGeneratedOnAdd()
 27720                        .HasColumnType("TEXT");
 27721
 27722                    b.Property<long>("EndTicks")
 27723                        .HasColumnType("INTEGER");
 27724
 27725                    b.Property<Guid>("ItemId")
 27726                        .HasColumnType("TEXT");
 27727
 27728                    b.Property<string>("SegmentProviderId")
 27729                        .IsRequired()
 27730                        .HasColumnType("TEXT");
 27731
 27732                    b.Property<long>("StartTicks")
 27733                        .HasColumnType("INTEGER");
 27734
 27735                    b.Property<int>("Type")
 27736                        .HasColumnType("INTEGER");
 27737
 27738                    b.HasKey("Id");
 27739
 27740                    b.ToTable("MediaSegments");
 27741                });
 742
 27743            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 27744                {
 27745                    b.Property<Guid>("ItemId")
 27746                        .HasColumnType("TEXT");
 27747
 27748                    b.Property<int>("StreamIndex")
 27749                        .HasColumnType("INTEGER");
 27750
 27751                    b.Property<string>("AspectRatio")
 27752                        .HasColumnType("TEXT");
 27753
 27754                    b.Property<float>("AverageFrameRate")
 27755                        .HasColumnType("REAL");
 27756
 27757                    b.Property<int>("BitDepth")
 27758                        .HasColumnType("INTEGER");
 27759
 27760                    b.Property<int>("BitRate")
 27761                        .HasColumnType("INTEGER");
 27762
 27763                    b.Property<int>("BlPresentFlag")
 27764                        .HasColumnType("INTEGER");
 27765
 27766                    b.Property<string>("ChannelLayout")
 27767                        .HasColumnType("TEXT");
 27768
 27769                    b.Property<int>("Channels")
 27770                        .HasColumnType("INTEGER");
 27771
 27772                    b.Property<string>("Codec")
 27773                        .HasColumnType("TEXT");
 27774
 27775                    b.Property<string>("CodecTag")
 27776                        .IsRequired()
 27777                        .HasColumnType("TEXT");
 27778
 27779                    b.Property<string>("CodecTimeBase")
 27780                        .IsRequired()
 27781                        .HasColumnType("TEXT");
 27782
 27783                    b.Property<string>("ColorPrimaries")
 27784                        .IsRequired()
 27785                        .HasColumnType("TEXT");
 27786
 27787                    b.Property<string>("ColorSpace")
 27788                        .IsRequired()
 27789                        .HasColumnType("TEXT");
 27790
 27791                    b.Property<string>("ColorTransfer")
 27792                        .IsRequired()
 27793                        .HasColumnType("TEXT");
 27794
 27795                    b.Property<string>("Comment")
 27796                        .IsRequired()
 27797                        .HasColumnType("TEXT");
 27798
 27799                    b.Property<int>("DvBlSignalCompatibilityId")
 27800                        .HasColumnType("INTEGER");
 27801
 27802                    b.Property<int>("DvLevel")
 27803                        .HasColumnType("INTEGER");
 27804
 27805                    b.Property<int>("DvProfile")
 27806                        .HasColumnType("INTEGER");
 27807
 27808                    b.Property<int>("DvVersionMajor")
 27809                        .HasColumnType("INTEGER");
 27810
 27811                    b.Property<int>("DvVersionMinor")
 27812                        .HasColumnType("INTEGER");
 27813
 27814                    b.Property<int>("ElPresentFlag")
 27815                        .HasColumnType("INTEGER");
 27816
 27817                    b.Property<int>("Height")
 27818                        .HasColumnType("INTEGER");
 27819
 27820                    b.Property<bool>("IsAnamorphic")
 27821                        .HasColumnType("INTEGER");
 27822
 27823                    b.Property<bool>("IsAvc")
 27824                        .HasColumnType("INTEGER");
 27825
 27826                    b.Property<bool>("IsDefault")
 27827                        .HasColumnType("INTEGER");
 27828
 27829                    b.Property<bool>("IsExternal")
 27830                        .HasColumnType("INTEGER");
 27831
 27832                    b.Property<bool>("IsForced")
 27833                        .HasColumnType("INTEGER");
 27834
 27835                    b.Property<bool>("IsHearingImpaired")
 27836                        .HasColumnType("INTEGER");
 27837
 27838                    b.Property<bool>("IsInterlaced")
 27839                        .HasColumnType("INTEGER");
 27840
 27841                    b.Property<string>("KeyFrames")
 27842                        .HasColumnType("TEXT");
 27843
 27844                    b.Property<string>("Language")
 27845                        .HasColumnType("TEXT");
 27846
 27847                    b.Property<float>("Level")
 27848                        .HasColumnType("REAL");
 27849
 27850                    b.Property<string>("NalLengthSize")
 27851                        .IsRequired()
 27852                        .HasColumnType("TEXT");
 27853
 27854                    b.Property<string>("Path")
 27855                        .HasColumnType("TEXT");
 27856
 27857                    b.Property<string>("PixelFormat")
 27858                        .HasColumnType("TEXT");
 27859
 27860                    b.Property<string>("Profile")
 27861                        .HasColumnType("TEXT");
 27862
 27863                    b.Property<float>("RealFrameRate")
 27864                        .HasColumnType("REAL");
 27865
 27866                    b.Property<int>("RefFrames")
 27867                        .HasColumnType("INTEGER");
 27868
 27869                    b.Property<int>("Rotation")
 27870                        .HasColumnType("INTEGER");
 27871
 27872                    b.Property<int>("RpuPresentFlag")
 27873                        .HasColumnType("INTEGER");
 27874
 27875                    b.Property<int>("SampleRate")
 27876                        .HasColumnType("INTEGER");
 27877
 27878                    b.Property<int?>("StreamType")
 27879                        .HasColumnType("INTEGER");
 27880
 27881                    b.Property<string>("TimeBase")
 27882                        .IsRequired()
 27883                        .HasColumnType("TEXT");
 27884
 27885                    b.Property<string>("Title")
 27886                        .IsRequired()
 27887                        .HasColumnType("TEXT");
 27888
 27889                    b.Property<int>("Width")
 27890                        .HasColumnType("INTEGER");
 27891
 27892                    b.HasKey("ItemId", "StreamIndex");
 27893
 27894                    b.HasIndex("StreamIndex");
 27895
 27896                    b.HasIndex("StreamType");
 27897
 27898                    b.HasIndex("StreamIndex", "StreamType");
 27899
 27900                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27901
 27902                    b.ToTable("MediaStreamInfos");
 27903                });
 904
 27905            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 27906                {
 27907                    b.Property<Guid>("Id")
 27908                        .ValueGeneratedOnAdd()
 27909                        .HasColumnType("TEXT");
 27910
 27911                    b.Property<string>("Name")
 27912                        .IsRequired()
 27913                        .HasColumnType("TEXT");
 27914
 27915                    b.Property<string>("PersonType")
 27916                        .HasColumnType("TEXT");
 27917
 27918                    b.HasKey("Id");
 27919
 27920                    b.HasIndex("Name");
 27921
 27922                    b.ToTable("Peoples");
 27923                });
 924
 27925            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 27926                {
 27927                    b.Property<Guid>("ItemId")
 27928                        .HasColumnType("TEXT");
 27929
 27930                    b.Property<Guid>("PeopleId")
 27931                        .HasColumnType("TEXT");
 27932
 27933                    b.Property<int?>("ListOrder")
 27934                        .HasColumnType("INTEGER");
 27935
 27936                    b.Property<string>("Role")
 27937                        .HasColumnType("TEXT");
 27938
 27939                    b.Property<int?>("SortOrder")
 27940                        .HasColumnType("INTEGER");
 27941
 27942                    b.HasKey("ItemId", "PeopleId");
 27943
 27944                    b.HasIndex("PeopleId");
 27945
 27946                    b.HasIndex("ItemId", "ListOrder");
 27947
 27948                    b.HasIndex("ItemId", "SortOrder");
 27949
 27950                    b.ToTable("PeopleBaseItemMap");
 27951                });
 952
 27953            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27954                {
 27955                    b.Property<int>("Id")
 27956                        .ValueGeneratedOnAdd()
 27957                        .HasColumnType("INTEGER");
 27958
 27959                    b.Property<int>("Kind")
 27960                        .HasColumnType("INTEGER");
 27961
 27962                    b.Property<Guid?>("Permission_Permissions_Guid")
 27963                        .HasColumnType("TEXT");
 27964
 27965                    b.Property<uint>("RowVersion")
 27966                        .IsConcurrencyToken()
 27967                        .HasColumnType("INTEGER");
 27968
 27969                    b.Property<Guid?>("UserId")
 27970                        .HasColumnType("TEXT");
 27971
 27972                    b.Property<bool>("Value")
 27973                        .HasColumnType("INTEGER");
 27974
 27975                    b.HasKey("Id");
 27976
 27977                    b.HasIndex("UserId", "Kind")
 27978                        .IsUnique()
 27979                        .HasFilter("[UserId] IS NOT NULL");
 27980
 27981                    b.ToTable("Permissions");
 27982                });
 983
 27984            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27985                {
 27986                    b.Property<int>("Id")
 27987                        .ValueGeneratedOnAdd()
 27988                        .HasColumnType("INTEGER");
 27989
 27990                    b.Property<int>("Kind")
 27991                        .HasColumnType("INTEGER");
 27992
 27993                    b.Property<Guid?>("Preference_Preferences_Guid")
 27994                        .HasColumnType("TEXT");
 27995
 27996                    b.Property<uint>("RowVersion")
 27997                        .IsConcurrencyToken()
 27998                        .HasColumnType("INTEGER");
 27999
 271000                    b.Property<Guid?>("UserId")
 271001                        .HasColumnType("TEXT");
 271002
 271003                    b.Property<string>("Value")
 271004                        .IsRequired()
 271005                        .HasMaxLength(65535)
 271006                        .HasColumnType("TEXT");
 271007
 271008                    b.HasKey("Id");
 271009
 271010                    b.HasIndex("UserId", "Kind")
 271011                        .IsUnique()
 271012                        .HasFilter("[UserId] IS NOT NULL");
 271013
 271014                    b.ToTable("Preferences");
 271015                });
 1016
 271017            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 271018                {
 271019                    b.Property<int>("Id")
 271020                        .ValueGeneratedOnAdd()
 271021                        .HasColumnType("INTEGER");
 271022
 271023                    b.Property<string>("AccessToken")
 271024                        .IsRequired()
 271025                        .HasColumnType("TEXT");
 271026
 271027                    b.Property<DateTime>("DateCreated")
 271028                        .HasColumnType("TEXT");
 271029
 271030                    b.Property<DateTime>("DateLastActivity")
 271031                        .HasColumnType("TEXT");
 271032
 271033                    b.Property<string>("Name")
 271034                        .IsRequired()
 271035                        .HasMaxLength(64)
 271036                        .HasColumnType("TEXT");
 271037
 271038                    b.HasKey("Id");
 271039
 271040                    b.HasIndex("AccessToken")
 271041                        .IsUnique();
 271042
 271043                    b.ToTable("ApiKeys");
 271044                });
 1045
 271046            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 271047                {
 271048                    b.Property<int>("Id")
 271049                        .ValueGeneratedOnAdd()
 271050                        .HasColumnType("INTEGER");
 271051
 271052                    b.Property<string>("AccessToken")
 271053                        .IsRequired()
 271054                        .HasColumnType("TEXT");
 271055
 271056                    b.Property<string>("AppName")
 271057                        .IsRequired()
 271058                        .HasMaxLength(64)
 271059                        .HasColumnType("TEXT");
 271060
 271061                    b.Property<string>("AppVersion")
 271062                        .IsRequired()
 271063                        .HasMaxLength(32)
 271064                        .HasColumnType("TEXT");
 271065
 271066                    b.Property<DateTime>("DateCreated")
 271067                        .HasColumnType("TEXT");
 271068
 271069                    b.Property<DateTime>("DateLastActivity")
 271070                        .HasColumnType("TEXT");
 271071
 271072                    b.Property<DateTime>("DateModified")
 271073                        .HasColumnType("TEXT");
 271074
 271075                    b.Property<string>("DeviceId")
 271076                        .IsRequired()
 271077                        .HasMaxLength(256)
 271078                        .HasColumnType("TEXT");
 271079
 271080                    b.Property<string>("DeviceName")
 271081                        .IsRequired()
 271082                        .HasMaxLength(64)
 271083                        .HasColumnType("TEXT");
 271084
 271085                    b.Property<bool>("IsActive")
 271086                        .HasColumnType("INTEGER");
 271087
 271088                    b.Property<Guid>("UserId")
 271089                        .HasColumnType("TEXT");
 271090
 271091                    b.HasKey("Id");
 271092
 271093                    b.HasIndex("DeviceId");
 271094
 271095                    b.HasIndex("AccessToken", "DateLastActivity");
 271096
 271097                    b.HasIndex("DeviceId", "DateLastActivity");
 271098
 271099                    b.HasIndex("UserId", "DeviceId");
 271100
 271101                    b.ToTable("Devices");
 271102                });
 1103
 271104            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 271105                {
 271106                    b.Property<int>("Id")
 271107                        .ValueGeneratedOnAdd()
 271108                        .HasColumnType("INTEGER");
 271109
 271110                    b.Property<string>("CustomName")
 271111                        .HasColumnType("TEXT");
 271112
 271113                    b.Property<string>("DeviceId")
 271114                        .IsRequired()
 271115                        .HasColumnType("TEXT");
 271116
 271117                    b.HasKey("Id");
 271118
 271119                    b.HasIndex("DeviceId")
 271120                        .IsUnique();
 271121
 271122                    b.ToTable("DeviceOptions");
 271123                });
 1124
 271125            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 271126                {
 271127                    b.Property<Guid>("ItemId")
 271128                        .HasColumnType("TEXT");
 271129
 271130                    b.Property<int>("Width")
 271131                        .HasColumnType("INTEGER");
 271132
 271133                    b.Property<int>("Bandwidth")
 271134                        .HasColumnType("INTEGER");
 271135
 271136                    b.Property<int>("Height")
 271137                        .HasColumnType("INTEGER");
 271138
 271139                    b.Property<int>("Interval")
 271140                        .HasColumnType("INTEGER");
 271141
 271142                    b.Property<int>("ThumbnailCount")
 271143                        .HasColumnType("INTEGER");
 271144
 271145                    b.Property<int>("TileHeight")
 271146                        .HasColumnType("INTEGER");
 271147
 271148                    b.Property<int>("TileWidth")
 271149                        .HasColumnType("INTEGER");
 271150
 271151                    b.HasKey("ItemId", "Width");
 271152
 271153                    b.ToTable("TrickplayInfos");
 271154                });
 1155
 271156            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 271157                {
 271158                    b.Property<Guid>("Id")
 271159                        .ValueGeneratedOnAdd()
 271160                        .HasColumnType("TEXT");
 271161
 271162                    b.Property<string>("AudioLanguagePreference")
 271163                        .HasMaxLength(255)
 271164                        .HasColumnType("TEXT");
 271165
 271166                    b.Property<string>("AuthenticationProviderId")
 271167                        .IsRequired()
 271168                        .HasMaxLength(255)
 271169                        .HasColumnType("TEXT");
 271170
 271171                    b.Property<string>("CastReceiverId")
 271172                        .HasMaxLength(32)
 271173                        .HasColumnType("TEXT");
 271174
 271175                    b.Property<bool>("DisplayCollectionsView")
 271176                        .HasColumnType("INTEGER");
 271177
 271178                    b.Property<bool>("DisplayMissingEpisodes")
 271179                        .HasColumnType("INTEGER");
 271180
 271181                    b.Property<bool>("EnableAutoLogin")
 271182                        .HasColumnType("INTEGER");
 271183
 271184                    b.Property<bool>("EnableLocalPassword")
 271185                        .HasColumnType("INTEGER");
 271186
 271187                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271188                        .HasColumnType("INTEGER");
 271189
 271190                    b.Property<bool>("EnableUserPreferenceAccess")
 271191                        .HasColumnType("INTEGER");
 271192
 271193                    b.Property<bool>("HidePlayedInLatest")
 271194                        .HasColumnType("INTEGER");
 271195
 271196                    b.Property<long>("InternalId")
 271197                        .HasColumnType("INTEGER");
 271198
 271199                    b.Property<int>("InvalidLoginAttemptCount")
 271200                        .HasColumnType("INTEGER");
 271201
 271202                    b.Property<DateTime?>("LastActivityDate")
 271203                        .HasColumnType("TEXT");
 271204
 271205                    b.Property<DateTime?>("LastLoginDate")
 271206                        .HasColumnType("TEXT");
 271207
 271208                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271209                        .HasColumnType("INTEGER");
 271210
 271211                    b.Property<int>("MaxActiveSessions")
 271212                        .HasColumnType("INTEGER");
 271213
 271214                    b.Property<int?>("MaxParentalAgeRating")
 271215                        .HasColumnType("INTEGER");
 271216
 271217                    b.Property<bool>("MustUpdatePassword")
 271218                        .HasColumnType("INTEGER");
 271219
 271220                    b.Property<string>("Password")
 271221                        .HasMaxLength(65535)
 271222                        .HasColumnType("TEXT");
 271223
 271224                    b.Property<string>("PasswordResetProviderId")
 271225                        .IsRequired()
 271226                        .HasMaxLength(255)
 271227                        .HasColumnType("TEXT");
 271228
 271229                    b.Property<bool>("PlayDefaultAudioTrack")
 271230                        .HasColumnType("INTEGER");
 271231
 271232                    b.Property<bool>("RememberAudioSelections")
 271233                        .HasColumnType("INTEGER");
 271234
 271235                    b.Property<bool>("RememberSubtitleSelections")
 271236                        .HasColumnType("INTEGER");
 271237
 271238                    b.Property<int?>("RemoteClientBitrateLimit")
 271239                        .HasColumnType("INTEGER");
 271240
 271241                    b.Property<uint>("RowVersion")
 271242                        .IsConcurrencyToken()
 271243                        .HasColumnType("INTEGER");
 271244
 271245                    b.Property<string>("SubtitleLanguagePreference")
 271246                        .HasMaxLength(255)
 271247                        .HasColumnType("TEXT");
 271248
 271249                    b.Property<int>("SubtitleMode")
 271250                        .HasColumnType("INTEGER");
 271251
 271252                    b.Property<int>("SyncPlayAccess")
 271253                        .HasColumnType("INTEGER");
 271254
 271255                    b.Property<string>("Username")
 271256                        .IsRequired()
 271257                        .HasMaxLength(255)
 271258                        .HasColumnType("TEXT")
 271259                        .UseCollation("NOCASE");
 271260
 271261                    b.HasKey("Id");
 271262
 271263                    b.HasIndex("Username")
 271264                        .IsUnique();
 271265
 271266                    b.ToTable("Users");
 271267                });
 1268
 271269            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 271270                {
 271271                    b.Property<Guid>("ItemId")
 271272                        .HasColumnType("TEXT");
 271273
 271274                    b.Property<Guid>("UserId")
 271275                        .HasColumnType("TEXT");
 271276
 271277                    b.Property<string>("CustomDataKey")
 271278                        .HasColumnType("TEXT");
 271279
 271280                    b.Property<int?>("AudioStreamIndex")
 271281                        .HasColumnType("INTEGER");
 271282
 271283                    b.Property<bool>("IsFavorite")
 271284                        .HasColumnType("INTEGER");
 271285
 271286                    b.Property<DateTime?>("LastPlayedDate")
 271287                        .HasColumnType("TEXT");
 271288
 271289                    b.Property<bool?>("Likes")
 271290                        .HasColumnType("INTEGER");
 271291
 271292                    b.Property<int>("PlayCount")
 271293                        .HasColumnType("INTEGER");
 271294
 271295                    b.Property<long>("PlaybackPositionTicks")
 271296                        .HasColumnType("INTEGER");
 271297
 271298                    b.Property<bool>("Played")
 271299                        .HasColumnType("INTEGER");
 271300
 271301                    b.Property<double?>("Rating")
 271302                        .HasColumnType("REAL");
 271303
 271304                    b.Property<int?>("SubtitleStreamIndex")
 271305                        .HasColumnType("INTEGER");
 271306
 271307                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271308
 271309                    b.HasIndex("UserId");
 271310
 271311                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271312
 271313                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271314
 271315                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271316
 271317                    b.HasIndex("ItemId", "UserId", "Played");
 271318
 271319                    b.ToTable("UserData");
 271320                });
 1321
 271322            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 271323                {
 271324                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271325                        .WithMany("AccessSchedules")
 271326                        .HasForeignKey("UserId")
 271327                        .OnDelete(DeleteBehavior.Cascade)
 271328                        .IsRequired();
 271329                });
 1330
 271331            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 271332                {
 271333                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271334                        .WithMany("Children")
 271335                        .HasForeignKey("ItemId")
 271336                        .OnDelete(DeleteBehavior.Cascade)
 271337                        .IsRequired();
 271338
 271339                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem")
 271340                        .WithMany("ParentAncestors")
 271341                        .HasForeignKey("ParentItemId")
 271342                        .OnDelete(DeleteBehavior.Cascade)
 271343                        .IsRequired();
 271344
 271345                    b.Navigation("Item");
 271346
 271347                    b.Navigation("ParentItem");
 271348                });
 1349
 271350            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 271351                {
 271352                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271353                        .WithMany()
 271354                        .HasForeignKey("ItemId")
 271355                        .OnDelete(DeleteBehavior.Cascade)
 271356                        .IsRequired();
 271357
 271358                    b.Navigation("Item");
 271359                });
 1360
 271361            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 271362                {
 271363                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271364                        .WithMany("Images")
 271365                        .HasForeignKey("ItemId")
 271366                        .OnDelete(DeleteBehavior.Cascade)
 271367                        .IsRequired();
 271368
 271369                    b.Navigation("Item");
 271370                });
 1371
 271372            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 271373                {
 271374                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271375                        .WithMany("LockedFields")
 271376                        .HasForeignKey("ItemId")
 271377                        .OnDelete(DeleteBehavior.Cascade)
 271378                        .IsRequired();
 271379
 271380                    b.Navigation("Item");
 271381                });
 1382
 271383            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 271384                {
 271385                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271386                        .WithMany("Provider")
 271387                        .HasForeignKey("ItemId")
 271388                        .OnDelete(DeleteBehavior.Cascade)
 271389                        .IsRequired();
 271390
 271391                    b.Navigation("Item");
 271392                });
 1393
 271394            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 271395                {
 271396                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271397                        .WithMany("TrailerTypes")
 271398                        .HasForeignKey("ItemId")
 271399                        .OnDelete(DeleteBehavior.Cascade)
 271400                        .IsRequired();
 271401
 271402                    b.Navigation("Item");
 271403                });
 1404
 271405            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 271406                {
 271407                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271408                        .WithMany("Chapters")
 271409                        .HasForeignKey("ItemId")
 271410                        .OnDelete(DeleteBehavior.Cascade)
 271411                        .IsRequired();
 271412
 271413                    b.Navigation("Item");
 271414                });
 1415
 271416            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 271417                {
 271418                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271419                        .WithMany("DisplayPreferences")
 271420                        .HasForeignKey("UserId")
 271421                        .OnDelete(DeleteBehavior.Cascade)
 271422                        .IsRequired();
 271423                });
 1424
 271425            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 271426                {
 271427                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 271428                        .WithMany("HomeSections")
 271429                        .HasForeignKey("DisplayPreferencesId")
 271430                        .OnDelete(DeleteBehavior.Cascade)
 271431                        .IsRequired();
 271432                });
 1433
 271434            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 271435                {
 271436                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271437                        .WithOne("ProfileImage")
 271438                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 271439                        .OnDelete(DeleteBehavior.Cascade);
 271440                });
 1441
 271442            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 271443                {
 271444                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271445                        .WithMany("ItemDisplayPreferences")
 271446                        .HasForeignKey("UserId")
 271447                        .OnDelete(DeleteBehavior.Cascade)
 271448                        .IsRequired();
 271449                });
 1450
 271451            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 271452                {
 271453                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271454                        .WithMany("ItemValues")
 271455                        .HasForeignKey("ItemId")
 271456                        .OnDelete(DeleteBehavior.Cascade)
 271457                        .IsRequired();
 271458
 271459                    b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue")
 271460                        .WithMany("BaseItemsMap")
 271461                        .HasForeignKey("ItemValueId")
 271462                        .OnDelete(DeleteBehavior.Cascade)
 271463                        .IsRequired();
 271464
 271465                    b.Navigation("Item");
 271466
 271467                    b.Navigation("ItemValue");
 271468                });
 1469
 271470            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 271471                {
 271472                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271473                        .WithMany("MediaStreams")
 271474                        .HasForeignKey("ItemId")
 271475                        .OnDelete(DeleteBehavior.Cascade)
 271476                        .IsRequired();
 271477
 271478                    b.Navigation("Item");
 271479                });
 1480
 271481            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 271482                {
 271483                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271484                        .WithMany("Peoples")
 271485                        .HasForeignKey("ItemId")
 271486                        .OnDelete(DeleteBehavior.Cascade)
 271487                        .IsRequired();
 271488
 271489                    b.HasOne("Jellyfin.Data.Entities.People", "People")
 271490                        .WithMany("BaseItems")
 271491                        .HasForeignKey("PeopleId")
 271492                        .OnDelete(DeleteBehavior.Cascade)
 271493                        .IsRequired();
 271494
 271495                    b.Navigation("Item");
 271496
 271497                    b.Navigation("People");
 271498                });
 1499
 271500            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 271501                {
 271502                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271503                        .WithMany("Permissions")
 271504                        .HasForeignKey("UserId")
 271505                        .OnDelete(DeleteBehavior.Cascade);
 271506                });
 1507
 271508            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 271509                {
 271510                    b.HasOne("Jellyfin.Data.Entities.User", null)
 271511                        .WithMany("Preferences")
 271512                        .HasForeignKey("UserId")
 271513                        .OnDelete(DeleteBehavior.Cascade);
 271514                });
 1515
 271516            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 271517                {
 271518                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 271519                        .WithMany()
 271520                        .HasForeignKey("UserId")
 271521                        .OnDelete(DeleteBehavior.Cascade)
 271522                        .IsRequired();
 271523
 271524                    b.Navigation("User");
 271525                });
 1526
 271527            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 271528                {
 271529                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 271530                        .WithMany("UserData")
 271531                        .HasForeignKey("ItemId")
 271532                        .OnDelete(DeleteBehavior.Cascade)
 271533                        .IsRequired();
 271534
 271535                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 271536                        .WithMany()
 271537                        .HasForeignKey("UserId")
 271538                        .OnDelete(DeleteBehavior.Cascade)
 271539                        .IsRequired();
 271540
 271541                    b.Navigation("Item");
 271542
 271543                    b.Navigation("User");
 271544                });
 1545
 271546            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 271547                {
 271548                    b.Navigation("Chapters");
 271549
 271550                    b.Navigation("Children");
 271551
 271552                    b.Navigation("Images");
 271553
 271554                    b.Navigation("ItemValues");
 271555
 271556                    b.Navigation("LockedFields");
 271557
 271558                    b.Navigation("MediaStreams");
 271559
 271560                    b.Navigation("ParentAncestors");
 271561
 271562                    b.Navigation("Peoples");
 271563
 271564                    b.Navigation("Provider");
 271565
 271566                    b.Navigation("TrailerTypes");
 271567
 271568                    b.Navigation("UserData");
 271569                });
 1570
 271571            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 271572                {
 271573                    b.Navigation("HomeSections");
 271574                });
 1575
 271576            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 271577                {
 271578                    b.Navigation("BaseItemsMap");
 271579                });
 1580
 271581            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 271582                {
 271583                    b.Navigation("BaseItems");
 271584                });
 1585
 271586            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 271587                {
 271588                    b.Navigation("AccessSchedules");
 271589
 271590                    b.Navigation("DisplayPreferences");
 271591
 271592                    b.Navigation("ItemDisplayPreferences");
 271593
 271594                    b.Navigation("Permissions");
 271595
 271596                    b.Navigation("Preferences");
 271597
 271598                    b.Navigation("ProfileImage");
 271599                });
 1600#pragma warning restore 612, 618
 271601        }
 1602    }
 1603}