< 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 3/26/2026 - 12:14:14 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        {
 2214            migrationBuilder.DropForeignKey(
 2215                name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
 2216                table: "AncestorIds");
 17
 2218            migrationBuilder.DropIndex(
 2219                name: "IX_AncestorIds_BaseItemEntityId",
 2220                table: "AncestorIds");
 21
 2222            migrationBuilder.DropColumn(
 2223                name: "BaseItemEntityId",
 2224                table: "AncestorIds");
 2225        }
 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
 2221            modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
 22
 2223            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246                });
 47
 2248            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2249                {
 2250                    b.Property<int>("Id")
 2251                        .ValueGeneratedOnAdd()
 2252                        .HasColumnType("INTEGER");
 2253
 2254                    b.Property<DateTime>("DateCreated")
 2255                        .HasColumnType("TEXT");
 2256
 2257                    b.Property<string>("ItemId")
 2258                        .HasMaxLength(256)
 2259                        .HasColumnType("TEXT");
 2260
 2261                    b.Property<int>("LogSeverity")
 2262                        .HasColumnType("INTEGER");
 2263
 2264                    b.Property<string>("Name")
 2265                        .IsRequired()
 2266                        .HasMaxLength(512)
 2267                        .HasColumnType("TEXT");
 2268
 2269                    b.Property<string>("Overview")
 2270                        .HasMaxLength(512)
 2271                        .HasColumnType("TEXT");
 2272
 2273                    b.Property<uint>("RowVersion")
 2274                        .IsConcurrencyToken()
 2275                        .HasColumnType("INTEGER");
 2276
 2277                    b.Property<string>("ShortOverview")
 2278                        .HasMaxLength(512)
 2279                        .HasColumnType("TEXT");
 2280
 2281                    b.Property<string>("Type")
 2282                        .IsRequired()
 2283                        .HasMaxLength(256)
 2284                        .HasColumnType("TEXT");
 2285
 2286                    b.Property<Guid>("UserId")
 2287                        .HasColumnType("TEXT");
 2288
 2289                    b.HasKey("Id");
 2290
 2291                    b.HasIndex("DateCreated");
 2292
 2293                    b.ToTable("ActivityLogs");
 2294                });
 95
 2296            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 2297                {
 2298                    b.Property<Guid>("ItemId")
 2299                        .HasColumnType("TEXT");
 22100
 22101                    b.Property<Guid>("ParentItemId")
 22102                        .HasColumnType("TEXT");
 22103
 22104                    b.HasKey("ItemId", "ParentItemId");
 22105
 22106                    b.HasIndex("ParentItemId");
 22107
 22108                    b.ToTable("AncestorIds");
 22109                });
 110
 22111            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 22112                {
 22113                    b.Property<Guid>("ItemId")
 22114                        .HasColumnType("TEXT");
 22115
 22116                    b.Property<int>("Index")
 22117                        .HasColumnType("INTEGER");
 22118
 22119                    b.Property<string>("Codec")
 22120                        .IsRequired()
 22121                        .HasColumnType("TEXT");
 22122
 22123                    b.Property<string>("CodecTag")
 22124                        .HasColumnType("TEXT");
 22125
 22126                    b.Property<string>("Comment")
 22127                        .HasColumnType("TEXT");
 22128
 22129                    b.Property<string>("Filename")
 22130                        .HasColumnType("TEXT");
 22131
 22132                    b.Property<string>("MimeType")
 22133                        .HasColumnType("TEXT");
 22134
 22135                    b.HasKey("ItemId", "Index");
 22136
 22137                    b.ToTable("AttachmentStreamInfos");
 22138                });
 139
 22140            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 22141                {
 22142                    b.Property<Guid>("Id")
 22143                        .ValueGeneratedOnAdd()
 22144                        .HasColumnType("TEXT");
 22145
 22146                    b.Property<string>("Album")
 22147                        .HasColumnType("TEXT");
 22148
 22149                    b.Property<string>("AlbumArtists")
 22150                        .HasColumnType("TEXT");
 22151
 22152                    b.Property<string>("Artists")
 22153                        .HasColumnType("TEXT");
 22154
 22155                    b.Property<int?>("Audio")
 22156                        .HasColumnType("INTEGER");
 22157
 22158                    b.Property<string>("ChannelId")
 22159                        .HasColumnType("TEXT");
 22160
 22161                    b.Property<string>("CleanName")
 22162                        .HasColumnType("TEXT");
 22163
 22164                    b.Property<float?>("CommunityRating")
 22165                        .HasColumnType("REAL");
 22166
 22167                    b.Property<float?>("CriticRating")
 22168                        .HasColumnType("REAL");
 22169
 22170                    b.Property<string>("CustomRating")
 22171                        .HasColumnType("TEXT");
 22172
 22173                    b.Property<string>("Data")
 22174                        .HasColumnType("TEXT");
 22175
 22176                    b.Property<DateTime?>("DateCreated")
 22177                        .HasColumnType("TEXT");
 22178
 22179                    b.Property<DateTime?>("DateLastMediaAdded")
 22180                        .HasColumnType("TEXT");
 22181
 22182                    b.Property<DateTime?>("DateLastRefreshed")
 22183                        .HasColumnType("TEXT");
 22184
 22185                    b.Property<DateTime?>("DateLastSaved")
 22186                        .HasColumnType("TEXT");
 22187
 22188                    b.Property<DateTime?>("DateModified")
 22189                        .HasColumnType("TEXT");
 22190
 22191                    b.Property<DateTime>("EndDate")
 22192                        .HasColumnType("TEXT");
 22193
 22194                    b.Property<string>("EpisodeTitle")
 22195                        .HasColumnType("TEXT");
 22196
 22197                    b.Property<string>("ExternalId")
 22198                        .HasColumnType("TEXT");
 22199
 22200                    b.Property<string>("ExternalSeriesId")
 22201                        .HasColumnType("TEXT");
 22202
 22203                    b.Property<string>("ExternalServiceId")
 22204                        .HasColumnType("TEXT");
 22205
 22206                    b.Property<string>("ExtraIds")
 22207                        .HasColumnType("TEXT");
 22208
 22209                    b.Property<int?>("ExtraType")
 22210                        .HasColumnType("INTEGER");
 22211
 22212                    b.Property<string>("ForcedSortName")
 22213                        .HasColumnType("TEXT");
 22214
 22215                    b.Property<string>("Genres")
 22216                        .HasColumnType("TEXT");
 22217
 22218                    b.Property<int?>("Height")
 22219                        .HasColumnType("INTEGER");
 22220
 22221                    b.Property<int?>("IndexNumber")
 22222                        .HasColumnType("INTEGER");
 22223
 22224                    b.Property<int?>("InheritedParentalRatingValue")
 22225                        .HasColumnType("INTEGER");
 22226
 22227                    b.Property<bool>("IsFolder")
 22228                        .HasColumnType("INTEGER");
 22229
 22230                    b.Property<bool>("IsInMixedFolder")
 22231                        .HasColumnType("INTEGER");
 22232
 22233                    b.Property<bool>("IsLocked")
 22234                        .HasColumnType("INTEGER");
 22235
 22236                    b.Property<bool>("IsMovie")
 22237                        .HasColumnType("INTEGER");
 22238
 22239                    b.Property<bool>("IsRepeat")
 22240                        .HasColumnType("INTEGER");
 22241
 22242                    b.Property<bool>("IsSeries")
 22243                        .HasColumnType("INTEGER");
 22244
 22245                    b.Property<bool>("IsVirtualItem")
 22246                        .HasColumnType("INTEGER");
 22247
 22248                    b.Property<float?>("LUFS")
 22249                        .HasColumnType("REAL");
 22250
 22251                    b.Property<string>("MediaType")
 22252                        .HasColumnType("TEXT");
 22253
 22254                    b.Property<string>("Name")
 22255                        .HasColumnType("TEXT");
 22256
 22257                    b.Property<float?>("NormalizationGain")
 22258                        .HasColumnType("REAL");
 22259
 22260                    b.Property<string>("OfficialRating")
 22261                        .HasColumnType("TEXT");
 22262
 22263                    b.Property<string>("OriginalTitle")
 22264                        .HasColumnType("TEXT");
 22265
 22266                    b.Property<string>("Overview")
 22267                        .HasColumnType("TEXT");
 22268
 22269                    b.Property<string>("OwnerId")
 22270                        .HasColumnType("TEXT");
 22271
 22272                    b.Property<Guid?>("ParentId")
 22273                        .HasColumnType("TEXT");
 22274
 22275                    b.Property<int?>("ParentIndexNumber")
 22276                        .HasColumnType("INTEGER");
 22277
 22278                    b.Property<string>("Path")
 22279                        .HasColumnType("TEXT");
 22280
 22281                    b.Property<string>("PreferredMetadataCountryCode")
 22282                        .HasColumnType("TEXT");
 22283
 22284                    b.Property<string>("PreferredMetadataLanguage")
 22285                        .HasColumnType("TEXT");
 22286
 22287                    b.Property<DateTime?>("PremiereDate")
 22288                        .HasColumnType("TEXT");
 22289
 22290                    b.Property<string>("PresentationUniqueKey")
 22291                        .HasColumnType("TEXT");
 22292
 22293                    b.Property<string>("PrimaryVersionId")
 22294                        .HasColumnType("TEXT");
 22295
 22296                    b.Property<string>("ProductionLocations")
 22297                        .HasColumnType("TEXT");
 22298
 22299                    b.Property<int?>("ProductionYear")
 22300                        .HasColumnType("INTEGER");
 22301
 22302                    b.Property<long?>("RunTimeTicks")
 22303                        .HasColumnType("INTEGER");
 22304
 22305                    b.Property<Guid?>("SeasonId")
 22306                        .HasColumnType("TEXT");
 22307
 22308                    b.Property<string>("SeasonName")
 22309                        .HasColumnType("TEXT");
 22310
 22311                    b.Property<Guid?>("SeriesId")
 22312                        .HasColumnType("TEXT");
 22313
 22314                    b.Property<string>("SeriesName")
 22315                        .HasColumnType("TEXT");
 22316
 22317                    b.Property<string>("SeriesPresentationUniqueKey")
 22318                        .HasColumnType("TEXT");
 22319
 22320                    b.Property<string>("ShowId")
 22321                        .HasColumnType("TEXT");
 22322
 22323                    b.Property<long?>("Size")
 22324                        .HasColumnType("INTEGER");
 22325
 22326                    b.Property<string>("SortName")
 22327                        .HasColumnType("TEXT");
 22328
 22329                    b.Property<DateTime>("StartDate")
 22330                        .HasColumnType("TEXT");
 22331
 22332                    b.Property<string>("Studios")
 22333                        .HasColumnType("TEXT");
 22334
 22335                    b.Property<string>("Tagline")
 22336                        .HasColumnType("TEXT");
 22337
 22338                    b.Property<string>("Tags")
 22339                        .HasColumnType("TEXT");
 22340
 22341                    b.Property<Guid?>("TopParentId")
 22342                        .HasColumnType("TEXT");
 22343
 22344                    b.Property<int?>("TotalBitrate")
 22345                        .HasColumnType("INTEGER");
 22346
 22347                    b.Property<string>("Type")
 22348                        .IsRequired()
 22349                        .HasColumnType("TEXT");
 22350
 22351                    b.Property<string>("UnratedType")
 22352                        .HasColumnType("TEXT");
 22353
 22354                    b.Property<int?>("Width")
 22355                        .HasColumnType("INTEGER");
 22356
 22357                    b.HasKey("Id");
 22358
 22359                    b.HasIndex("ParentId");
 22360
 22361                    b.HasIndex("Path");
 22362
 22363                    b.HasIndex("PresentationUniqueKey");
 22364
 22365                    b.HasIndex("TopParentId", "Id");
 22366
 22367                    b.HasIndex("Type", "TopParentId", "Id");
 22368
 22369                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22370
 22371                    b.HasIndex("Type", "TopParentId", "StartDate");
 22372
 22373                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22374
 22375                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22376
 22377                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22378
 22379                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22380
 22381                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22382
 22383                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22384
 22385                    b.ToTable("BaseItems");
 22386                });
 387
 22388            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 22389                {
 22390                    b.Property<Guid>("Id")
 22391                        .ValueGeneratedOnAdd()
 22392                        .HasColumnType("TEXT");
 22393
 22394                    b.Property<byte[]>("Blurhash")
 22395                        .HasColumnType("BLOB");
 22396
 22397                    b.Property<DateTime>("DateModified")
 22398                        .HasColumnType("TEXT");
 22399
 22400                    b.Property<int>("Height")
 22401                        .HasColumnType("INTEGER");
 22402
 22403                    b.Property<int>("ImageType")
 22404                        .HasColumnType("INTEGER");
 22405
 22406                    b.Property<Guid>("ItemId")
 22407                        .HasColumnType("TEXT");
 22408
 22409                    b.Property<string>("Path")
 22410                        .IsRequired()
 22411                        .HasColumnType("TEXT");
 22412
 22413                    b.Property<int>("Width")
 22414                        .HasColumnType("INTEGER");
 22415
 22416                    b.HasKey("Id");
 22417
 22418                    b.HasIndex("ItemId");
 22419
 22420                    b.ToTable("BaseItemImageInfos");
 22421                });
 422
 22423            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 22424                {
 22425                    b.Property<int>("Id")
 22426                        .HasColumnType("INTEGER");
 22427
 22428                    b.Property<Guid>("ItemId")
 22429                        .HasColumnType("TEXT");
 22430
 22431                    b.HasKey("Id", "ItemId");
 22432
 22433                    b.HasIndex("ItemId");
 22434
 22435                    b.ToTable("BaseItemMetadataFields");
 22436                });
 437
 22438            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 22439                {
 22440                    b.Property<Guid>("ItemId")
 22441                        .HasColumnType("TEXT");
 22442
 22443                    b.Property<string>("ProviderId")
 22444                        .HasColumnType("TEXT");
 22445
 22446                    b.Property<string>("ProviderValue")
 22447                        .IsRequired()
 22448                        .HasColumnType("TEXT");
 22449
 22450                    b.HasKey("ItemId", "ProviderId");
 22451
 22452                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22453
 22454                    b.ToTable("BaseItemProviders");
 22455                });
 456
 22457            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 22458                {
 22459                    b.Property<int>("Id")
 22460                        .HasColumnType("INTEGER");
 22461
 22462                    b.Property<Guid>("ItemId")
 22463                        .HasColumnType("TEXT");
 22464
 22465                    b.HasKey("Id", "ItemId");
 22466
 22467                    b.HasIndex("ItemId");
 22468
 22469                    b.ToTable("BaseItemTrailerTypes");
 22470                });
 471
 22472            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 22473                {
 22474                    b.Property<Guid>("ItemId")
 22475                        .HasColumnType("TEXT");
 22476
 22477                    b.Property<int>("ChapterIndex")
 22478                        .HasColumnType("INTEGER");
 22479
 22480                    b.Property<DateTime?>("ImageDateModified")
 22481                        .HasColumnType("TEXT");
 22482
 22483                    b.Property<string>("ImagePath")
 22484                        .HasColumnType("TEXT");
 22485
 22486                    b.Property<string>("Name")
 22487                        .HasColumnType("TEXT");
 22488
 22489                    b.Property<long>("StartPositionTicks")
 22490                        .HasColumnType("INTEGER");
 22491
 22492                    b.HasKey("ItemId", "ChapterIndex");
 22493
 22494                    b.ToTable("Chapters");
 22495                });
 496
 22497            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 22498                {
 22499                    b.Property<int>("Id")
 22500                        .ValueGeneratedOnAdd()
 22501                        .HasColumnType("INTEGER");
 22502
 22503                    b.Property<string>("Client")
 22504                        .IsRequired()
 22505                        .HasMaxLength(32)
 22506                        .HasColumnType("TEXT");
 22507
 22508                    b.Property<Guid>("ItemId")
 22509                        .HasColumnType("TEXT");
 22510
 22511                    b.Property<string>("Key")
 22512                        .IsRequired()
 22513                        .HasColumnType("TEXT");
 22514
 22515                    b.Property<Guid>("UserId")
 22516                        .HasColumnType("TEXT");
 22517
 22518                    b.Property<string>("Value")
 22519                        .HasColumnType("TEXT");
 22520
 22521                    b.HasKey("Id");
 22522
 22523                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22524                        .IsUnique();
 22525
 22526                    b.ToTable("CustomItemDisplayPreferences");
 22527                });
 528
 22529            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22530                {
 22531                    b.Property<int>("Id")
 22532                        .ValueGeneratedOnAdd()
 22533                        .HasColumnType("INTEGER");
 22534
 22535                    b.Property<int>("ChromecastVersion")
 22536                        .HasColumnType("INTEGER");
 22537
 22538                    b.Property<string>("Client")
 22539                        .IsRequired()
 22540                        .HasMaxLength(32)
 22541                        .HasColumnType("TEXT");
 22542
 22543                    b.Property<string>("DashboardTheme")
 22544                        .HasMaxLength(32)
 22545                        .HasColumnType("TEXT");
 22546
 22547                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22548                        .HasColumnType("INTEGER");
 22549
 22550                    b.Property<int?>("IndexBy")
 22551                        .HasColumnType("INTEGER");
 22552
 22553                    b.Property<Guid>("ItemId")
 22554                        .HasColumnType("TEXT");
 22555
 22556                    b.Property<int>("ScrollDirection")
 22557                        .HasColumnType("INTEGER");
 22558
 22559                    b.Property<bool>("ShowBackdrop")
 22560                        .HasColumnType("INTEGER");
 22561
 22562                    b.Property<bool>("ShowSidebar")
 22563                        .HasColumnType("INTEGER");
 22564
 22565                    b.Property<int>("SkipBackwardLength")
 22566                        .HasColumnType("INTEGER");
 22567
 22568                    b.Property<int>("SkipForwardLength")
 22569                        .HasColumnType("INTEGER");
 22570
 22571                    b.Property<string>("TvHome")
 22572                        .HasMaxLength(32)
 22573                        .HasColumnType("TEXT");
 22574
 22575                    b.Property<Guid>("UserId")
 22576                        .HasColumnType("TEXT");
 22577
 22578                    b.HasKey("Id");
 22579
 22580                    b.HasIndex("UserId", "ItemId", "Client")
 22581                        .IsUnique();
 22582
 22583                    b.ToTable("DisplayPreferences");
 22584                });
 585
 22586            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22587                {
 22588                    b.Property<int>("Id")
 22589                        .ValueGeneratedOnAdd()
 22590                        .HasColumnType("INTEGER");
 22591
 22592                    b.Property<int>("DisplayPreferencesId")
 22593                        .HasColumnType("INTEGER");
 22594
 22595                    b.Property<int>("Order")
 22596                        .HasColumnType("INTEGER");
 22597
 22598                    b.Property<int>("Type")
 22599                        .HasColumnType("INTEGER");
 22600
 22601                    b.HasKey("Id");
 22602
 22603                    b.HasIndex("DisplayPreferencesId");
 22604
 22605                    b.ToTable("HomeSection");
 22606                });
 607
 22608            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22609                {
 22610                    b.Property<int>("Id")
 22611                        .ValueGeneratedOnAdd()
 22612                        .HasColumnType("INTEGER");
 22613
 22614                    b.Property<DateTime>("LastModified")
 22615                        .HasColumnType("TEXT");
 22616
 22617                    b.Property<string>("Path")
 22618                        .IsRequired()
 22619                        .HasMaxLength(512)
 22620                        .HasColumnType("TEXT");
 22621
 22622                    b.Property<Guid?>("UserId")
 22623                        .HasColumnType("TEXT");
 22624
 22625                    b.HasKey("Id");
 22626
 22627                    b.HasIndex("UserId")
 22628                        .IsUnique();
 22629
 22630                    b.ToTable("ImageInfos");
 22631                });
 632
 22633            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22634                {
 22635                    b.Property<int>("Id")
 22636                        .ValueGeneratedOnAdd()
 22637                        .HasColumnType("INTEGER");
 22638
 22639                    b.Property<string>("Client")
 22640                        .IsRequired()
 22641                        .HasMaxLength(32)
 22642                        .HasColumnType("TEXT");
 22643
 22644                    b.Property<int?>("IndexBy")
 22645                        .HasColumnType("INTEGER");
 22646
 22647                    b.Property<Guid>("ItemId")
 22648                        .HasColumnType("TEXT");
 22649
 22650                    b.Property<bool>("RememberIndexing")
 22651                        .HasColumnType("INTEGER");
 22652
 22653                    b.Property<bool>("RememberSorting")
 22654                        .HasColumnType("INTEGER");
 22655
 22656                    b.Property<string>("SortBy")
 22657                        .IsRequired()
 22658                        .HasMaxLength(64)
 22659                        .HasColumnType("TEXT");
 22660
 22661                    b.Property<int>("SortOrder")
 22662                        .HasColumnType("INTEGER");
 22663
 22664                    b.Property<Guid>("UserId")
 22665                        .HasColumnType("TEXT");
 22666
 22667                    b.Property<int>("ViewType")
 22668                        .HasColumnType("INTEGER");
 22669
 22670                    b.HasKey("Id");
 22671
 22672                    b.HasIndex("UserId");
 22673
 22674                    b.ToTable("ItemDisplayPreferences");
 22675                });
 676
 22677            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 22678                {
 22679                    b.Property<Guid>("ItemValueId")
 22680                        .ValueGeneratedOnAdd()
 22681                        .HasColumnType("TEXT");
 22682
 22683                    b.Property<string>("CleanValue")
 22684                        .IsRequired()
 22685                        .HasColumnType("TEXT");
 22686
 22687                    b.Property<int>("Type")
 22688                        .HasColumnType("INTEGER");
 22689
 22690                    b.Property<string>("Value")
 22691                        .IsRequired()
 22692                        .HasColumnType("TEXT");
 22693
 22694                    b.HasKey("ItemValueId");
 22695
 22696                    b.HasIndex("Type", "CleanValue");
 22697
 22698                    b.ToTable("ItemValues");
 22699                });
 700
 22701            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 22702                {
 22703                    b.Property<Guid>("ItemValueId")
 22704                        .HasColumnType("TEXT");
 22705
 22706                    b.Property<Guid>("ItemId")
 22707                        .HasColumnType("TEXT");
 22708
 22709                    b.HasKey("ItemValueId", "ItemId");
 22710
 22711                    b.HasIndex("ItemId");
 22712
 22713                    b.ToTable("ItemValuesMap");
 22714                });
 715
 22716            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 22717                {
 22718                    b.Property<Guid>("Id")
 22719                        .ValueGeneratedOnAdd()
 22720                        .HasColumnType("TEXT");
 22721
 22722                    b.Property<long>("EndTicks")
 22723                        .HasColumnType("INTEGER");
 22724
 22725                    b.Property<Guid>("ItemId")
 22726                        .HasColumnType("TEXT");
 22727
 22728                    b.Property<string>("SegmentProviderId")
 22729                        .IsRequired()
 22730                        .HasColumnType("TEXT");
 22731
 22732                    b.Property<long>("StartTicks")
 22733                        .HasColumnType("INTEGER");
 22734
 22735                    b.Property<int>("Type")
 22736                        .HasColumnType("INTEGER");
 22737
 22738                    b.HasKey("Id");
 22739
 22740                    b.ToTable("MediaSegments");
 22741                });
 742
 22743            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 22744                {
 22745                    b.Property<Guid>("ItemId")
 22746                        .HasColumnType("TEXT");
 22747
 22748                    b.Property<int>("StreamIndex")
 22749                        .HasColumnType("INTEGER");
 22750
 22751                    b.Property<string>("AspectRatio")
 22752                        .HasColumnType("TEXT");
 22753
 22754                    b.Property<float>("AverageFrameRate")
 22755                        .HasColumnType("REAL");
 22756
 22757                    b.Property<int>("BitDepth")
 22758                        .HasColumnType("INTEGER");
 22759
 22760                    b.Property<int>("BitRate")
 22761                        .HasColumnType("INTEGER");
 22762
 22763                    b.Property<int>("BlPresentFlag")
 22764                        .HasColumnType("INTEGER");
 22765
 22766                    b.Property<string>("ChannelLayout")
 22767                        .HasColumnType("TEXT");
 22768
 22769                    b.Property<int>("Channels")
 22770                        .HasColumnType("INTEGER");
 22771
 22772                    b.Property<string>("Codec")
 22773                        .HasColumnType("TEXT");
 22774
 22775                    b.Property<string>("CodecTag")
 22776                        .IsRequired()
 22777                        .HasColumnType("TEXT");
 22778
 22779                    b.Property<string>("CodecTimeBase")
 22780                        .IsRequired()
 22781                        .HasColumnType("TEXT");
 22782
 22783                    b.Property<string>("ColorPrimaries")
 22784                        .IsRequired()
 22785                        .HasColumnType("TEXT");
 22786
 22787                    b.Property<string>("ColorSpace")
 22788                        .IsRequired()
 22789                        .HasColumnType("TEXT");
 22790
 22791                    b.Property<string>("ColorTransfer")
 22792                        .IsRequired()
 22793                        .HasColumnType("TEXT");
 22794
 22795                    b.Property<string>("Comment")
 22796                        .IsRequired()
 22797                        .HasColumnType("TEXT");
 22798
 22799                    b.Property<int>("DvBlSignalCompatibilityId")
 22800                        .HasColumnType("INTEGER");
 22801
 22802                    b.Property<int>("DvLevel")
 22803                        .HasColumnType("INTEGER");
 22804
 22805                    b.Property<int>("DvProfile")
 22806                        .HasColumnType("INTEGER");
 22807
 22808                    b.Property<int>("DvVersionMajor")
 22809                        .HasColumnType("INTEGER");
 22810
 22811                    b.Property<int>("DvVersionMinor")
 22812                        .HasColumnType("INTEGER");
 22813
 22814                    b.Property<int>("ElPresentFlag")
 22815                        .HasColumnType("INTEGER");
 22816
 22817                    b.Property<int>("Height")
 22818                        .HasColumnType("INTEGER");
 22819
 22820                    b.Property<bool>("IsAnamorphic")
 22821                        .HasColumnType("INTEGER");
 22822
 22823                    b.Property<bool>("IsAvc")
 22824                        .HasColumnType("INTEGER");
 22825
 22826                    b.Property<bool>("IsDefault")
 22827                        .HasColumnType("INTEGER");
 22828
 22829                    b.Property<bool>("IsExternal")
 22830                        .HasColumnType("INTEGER");
 22831
 22832                    b.Property<bool>("IsForced")
 22833                        .HasColumnType("INTEGER");
 22834
 22835                    b.Property<bool>("IsHearingImpaired")
 22836                        .HasColumnType("INTEGER");
 22837
 22838                    b.Property<bool>("IsInterlaced")
 22839                        .HasColumnType("INTEGER");
 22840
 22841                    b.Property<string>("KeyFrames")
 22842                        .HasColumnType("TEXT");
 22843
 22844                    b.Property<string>("Language")
 22845                        .HasColumnType("TEXT");
 22846
 22847                    b.Property<float>("Level")
 22848                        .HasColumnType("REAL");
 22849
 22850                    b.Property<string>("NalLengthSize")
 22851                        .IsRequired()
 22852                        .HasColumnType("TEXT");
 22853
 22854                    b.Property<string>("Path")
 22855                        .HasColumnType("TEXT");
 22856
 22857                    b.Property<string>("PixelFormat")
 22858                        .HasColumnType("TEXT");
 22859
 22860                    b.Property<string>("Profile")
 22861                        .HasColumnType("TEXT");
 22862
 22863                    b.Property<float>("RealFrameRate")
 22864                        .HasColumnType("REAL");
 22865
 22866                    b.Property<int>("RefFrames")
 22867                        .HasColumnType("INTEGER");
 22868
 22869                    b.Property<int>("Rotation")
 22870                        .HasColumnType("INTEGER");
 22871
 22872                    b.Property<int>("RpuPresentFlag")
 22873                        .HasColumnType("INTEGER");
 22874
 22875                    b.Property<int>("SampleRate")
 22876                        .HasColumnType("INTEGER");
 22877
 22878                    b.Property<int?>("StreamType")
 22879                        .HasColumnType("INTEGER");
 22880
 22881                    b.Property<string>("TimeBase")
 22882                        .IsRequired()
 22883                        .HasColumnType("TEXT");
 22884
 22885                    b.Property<string>("Title")
 22886                        .IsRequired()
 22887                        .HasColumnType("TEXT");
 22888
 22889                    b.Property<int>("Width")
 22890                        .HasColumnType("INTEGER");
 22891
 22892                    b.HasKey("ItemId", "StreamIndex");
 22893
 22894                    b.HasIndex("StreamIndex");
 22895
 22896                    b.HasIndex("StreamType");
 22897
 22898                    b.HasIndex("StreamIndex", "StreamType");
 22899
 22900                    b.HasIndex("StreamIndex", "StreamType", "Language");
 22901
 22902                    b.ToTable("MediaStreamInfos");
 22903                });
 904
 22905            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 22906                {
 22907                    b.Property<Guid>("Id")
 22908                        .ValueGeneratedOnAdd()
 22909                        .HasColumnType("TEXT");
 22910
 22911                    b.Property<string>("Name")
 22912                        .IsRequired()
 22913                        .HasColumnType("TEXT");
 22914
 22915                    b.Property<string>("PersonType")
 22916                        .HasColumnType("TEXT");
 22917
 22918                    b.HasKey("Id");
 22919
 22920                    b.HasIndex("Name");
 22921
 22922                    b.ToTable("Peoples");
 22923                });
 924
 22925            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 22926                {
 22927                    b.Property<Guid>("ItemId")
 22928                        .HasColumnType("TEXT");
 22929
 22930                    b.Property<Guid>("PeopleId")
 22931                        .HasColumnType("TEXT");
 22932
 22933                    b.Property<int?>("ListOrder")
 22934                        .HasColumnType("INTEGER");
 22935
 22936                    b.Property<string>("Role")
 22937                        .HasColumnType("TEXT");
 22938
 22939                    b.Property<int?>("SortOrder")
 22940                        .HasColumnType("INTEGER");
 22941
 22942                    b.HasKey("ItemId", "PeopleId");
 22943
 22944                    b.HasIndex("PeopleId");
 22945
 22946                    b.HasIndex("ItemId", "ListOrder");
 22947
 22948                    b.HasIndex("ItemId", "SortOrder");
 22949
 22950                    b.ToTable("PeopleBaseItemMap");
 22951                });
 952
 22953            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22954                {
 22955                    b.Property<int>("Id")
 22956                        .ValueGeneratedOnAdd()
 22957                        .HasColumnType("INTEGER");
 22958
 22959                    b.Property<int>("Kind")
 22960                        .HasColumnType("INTEGER");
 22961
 22962                    b.Property<Guid?>("Permission_Permissions_Guid")
 22963                        .HasColumnType("TEXT");
 22964
 22965                    b.Property<uint>("RowVersion")
 22966                        .IsConcurrencyToken()
 22967                        .HasColumnType("INTEGER");
 22968
 22969                    b.Property<Guid?>("UserId")
 22970                        .HasColumnType("TEXT");
 22971
 22972                    b.Property<bool>("Value")
 22973                        .HasColumnType("INTEGER");
 22974
 22975                    b.HasKey("Id");
 22976
 22977                    b.HasIndex("UserId", "Kind")
 22978                        .IsUnique()
 22979                        .HasFilter("[UserId] IS NOT NULL");
 22980
 22981                    b.ToTable("Permissions");
 22982                });
 983
 22984            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22985                {
 22986                    b.Property<int>("Id")
 22987                        .ValueGeneratedOnAdd()
 22988                        .HasColumnType("INTEGER");
 22989
 22990                    b.Property<int>("Kind")
 22991                        .HasColumnType("INTEGER");
 22992
 22993                    b.Property<Guid?>("Preference_Preferences_Guid")
 22994                        .HasColumnType("TEXT");
 22995
 22996                    b.Property<uint>("RowVersion")
 22997                        .IsConcurrencyToken()
 22998                        .HasColumnType("INTEGER");
 22999
 221000                    b.Property<Guid?>("UserId")
 221001                        .HasColumnType("TEXT");
 221002
 221003                    b.Property<string>("Value")
 221004                        .IsRequired()
 221005                        .HasMaxLength(65535)
 221006                        .HasColumnType("TEXT");
 221007
 221008                    b.HasKey("Id");
 221009
 221010                    b.HasIndex("UserId", "Kind")
 221011                        .IsUnique()
 221012                        .HasFilter("[UserId] IS NOT NULL");
 221013
 221014                    b.ToTable("Preferences");
 221015                });
 1016
 221017            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 221018                {
 221019                    b.Property<int>("Id")
 221020                        .ValueGeneratedOnAdd()
 221021                        .HasColumnType("INTEGER");
 221022
 221023                    b.Property<string>("AccessToken")
 221024                        .IsRequired()
 221025                        .HasColumnType("TEXT");
 221026
 221027                    b.Property<DateTime>("DateCreated")
 221028                        .HasColumnType("TEXT");
 221029
 221030                    b.Property<DateTime>("DateLastActivity")
 221031                        .HasColumnType("TEXT");
 221032
 221033                    b.Property<string>("Name")
 221034                        .IsRequired()
 221035                        .HasMaxLength(64)
 221036                        .HasColumnType("TEXT");
 221037
 221038                    b.HasKey("Id");
 221039
 221040                    b.HasIndex("AccessToken")
 221041                        .IsUnique();
 221042
 221043                    b.ToTable("ApiKeys");
 221044                });
 1045
 221046            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221047                {
 221048                    b.Property<int>("Id")
 221049                        .ValueGeneratedOnAdd()
 221050                        .HasColumnType("INTEGER");
 221051
 221052                    b.Property<string>("AccessToken")
 221053                        .IsRequired()
 221054                        .HasColumnType("TEXT");
 221055
 221056                    b.Property<string>("AppName")
 221057                        .IsRequired()
 221058                        .HasMaxLength(64)
 221059                        .HasColumnType("TEXT");
 221060
 221061                    b.Property<string>("AppVersion")
 221062                        .IsRequired()
 221063                        .HasMaxLength(32)
 221064                        .HasColumnType("TEXT");
 221065
 221066                    b.Property<DateTime>("DateCreated")
 221067                        .HasColumnType("TEXT");
 221068
 221069                    b.Property<DateTime>("DateLastActivity")
 221070                        .HasColumnType("TEXT");
 221071
 221072                    b.Property<DateTime>("DateModified")
 221073                        .HasColumnType("TEXT");
 221074
 221075                    b.Property<string>("DeviceId")
 221076                        .IsRequired()
 221077                        .HasMaxLength(256)
 221078                        .HasColumnType("TEXT");
 221079
 221080                    b.Property<string>("DeviceName")
 221081                        .IsRequired()
 221082                        .HasMaxLength(64)
 221083                        .HasColumnType("TEXT");
 221084
 221085                    b.Property<bool>("IsActive")
 221086                        .HasColumnType("INTEGER");
 221087
 221088                    b.Property<Guid>("UserId")
 221089                        .HasColumnType("TEXT");
 221090
 221091                    b.HasKey("Id");
 221092
 221093                    b.HasIndex("DeviceId");
 221094
 221095                    b.HasIndex("AccessToken", "DateLastActivity");
 221096
 221097                    b.HasIndex("DeviceId", "DateLastActivity");
 221098
 221099                    b.HasIndex("UserId", "DeviceId");
 221100
 221101                    b.ToTable("Devices");
 221102                });
 1103
 221104            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 221105                {
 221106                    b.Property<int>("Id")
 221107                        .ValueGeneratedOnAdd()
 221108                        .HasColumnType("INTEGER");
 221109
 221110                    b.Property<string>("CustomName")
 221111                        .HasColumnType("TEXT");
 221112
 221113                    b.Property<string>("DeviceId")
 221114                        .IsRequired()
 221115                        .HasColumnType("TEXT");
 221116
 221117                    b.HasKey("Id");
 221118
 221119                    b.HasIndex("DeviceId")
 221120                        .IsUnique();
 221121
 221122                    b.ToTable("DeviceOptions");
 221123                });
 1124
 221125            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 221126                {
 221127                    b.Property<Guid>("ItemId")
 221128                        .HasColumnType("TEXT");
 221129
 221130                    b.Property<int>("Width")
 221131                        .HasColumnType("INTEGER");
 221132
 221133                    b.Property<int>("Bandwidth")
 221134                        .HasColumnType("INTEGER");
 221135
 221136                    b.Property<int>("Height")
 221137                        .HasColumnType("INTEGER");
 221138
 221139                    b.Property<int>("Interval")
 221140                        .HasColumnType("INTEGER");
 221141
 221142                    b.Property<int>("ThumbnailCount")
 221143                        .HasColumnType("INTEGER");
 221144
 221145                    b.Property<int>("TileHeight")
 221146                        .HasColumnType("INTEGER");
 221147
 221148                    b.Property<int>("TileWidth")
 221149                        .HasColumnType("INTEGER");
 221150
 221151                    b.HasKey("ItemId", "Width");
 221152
 221153                    b.ToTable("TrickplayInfos");
 221154                });
 1155
 221156            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221157                {
 221158                    b.Property<Guid>("Id")
 221159                        .ValueGeneratedOnAdd()
 221160                        .HasColumnType("TEXT");
 221161
 221162                    b.Property<string>("AudioLanguagePreference")
 221163                        .HasMaxLength(255)
 221164                        .HasColumnType("TEXT");
 221165
 221166                    b.Property<string>("AuthenticationProviderId")
 221167                        .IsRequired()
 221168                        .HasMaxLength(255)
 221169                        .HasColumnType("TEXT");
 221170
 221171                    b.Property<string>("CastReceiverId")
 221172                        .HasMaxLength(32)
 221173                        .HasColumnType("TEXT");
 221174
 221175                    b.Property<bool>("DisplayCollectionsView")
 221176                        .HasColumnType("INTEGER");
 221177
 221178                    b.Property<bool>("DisplayMissingEpisodes")
 221179                        .HasColumnType("INTEGER");
 221180
 221181                    b.Property<bool>("EnableAutoLogin")
 221182                        .HasColumnType("INTEGER");
 221183
 221184                    b.Property<bool>("EnableLocalPassword")
 221185                        .HasColumnType("INTEGER");
 221186
 221187                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221188                        .HasColumnType("INTEGER");
 221189
 221190                    b.Property<bool>("EnableUserPreferenceAccess")
 221191                        .HasColumnType("INTEGER");
 221192
 221193                    b.Property<bool>("HidePlayedInLatest")
 221194                        .HasColumnType("INTEGER");
 221195
 221196                    b.Property<long>("InternalId")
 221197                        .HasColumnType("INTEGER");
 221198
 221199                    b.Property<int>("InvalidLoginAttemptCount")
 221200                        .HasColumnType("INTEGER");
 221201
 221202                    b.Property<DateTime?>("LastActivityDate")
 221203                        .HasColumnType("TEXT");
 221204
 221205                    b.Property<DateTime?>("LastLoginDate")
 221206                        .HasColumnType("TEXT");
 221207
 221208                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221209                        .HasColumnType("INTEGER");
 221210
 221211                    b.Property<int>("MaxActiveSessions")
 221212                        .HasColumnType("INTEGER");
 221213
 221214                    b.Property<int?>("MaxParentalAgeRating")
 221215                        .HasColumnType("INTEGER");
 221216
 221217                    b.Property<bool>("MustUpdatePassword")
 221218                        .HasColumnType("INTEGER");
 221219
 221220                    b.Property<string>("Password")
 221221                        .HasMaxLength(65535)
 221222                        .HasColumnType("TEXT");
 221223
 221224                    b.Property<string>("PasswordResetProviderId")
 221225                        .IsRequired()
 221226                        .HasMaxLength(255)
 221227                        .HasColumnType("TEXT");
 221228
 221229                    b.Property<bool>("PlayDefaultAudioTrack")
 221230                        .HasColumnType("INTEGER");
 221231
 221232                    b.Property<bool>("RememberAudioSelections")
 221233                        .HasColumnType("INTEGER");
 221234
 221235                    b.Property<bool>("RememberSubtitleSelections")
 221236                        .HasColumnType("INTEGER");
 221237
 221238                    b.Property<int?>("RemoteClientBitrateLimit")
 221239                        .HasColumnType("INTEGER");
 221240
 221241                    b.Property<uint>("RowVersion")
 221242                        .IsConcurrencyToken()
 221243                        .HasColumnType("INTEGER");
 221244
 221245                    b.Property<string>("SubtitleLanguagePreference")
 221246                        .HasMaxLength(255)
 221247                        .HasColumnType("TEXT");
 221248
 221249                    b.Property<int>("SubtitleMode")
 221250                        .HasColumnType("INTEGER");
 221251
 221252                    b.Property<int>("SyncPlayAccess")
 221253                        .HasColumnType("INTEGER");
 221254
 221255                    b.Property<string>("Username")
 221256                        .IsRequired()
 221257                        .HasMaxLength(255)
 221258                        .HasColumnType("TEXT")
 221259                        .UseCollation("NOCASE");
 221260
 221261                    b.HasKey("Id");
 221262
 221263                    b.HasIndex("Username")
 221264                        .IsUnique();
 221265
 221266                    b.ToTable("Users");
 221267                });
 1268
 221269            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221270                {
 221271                    b.Property<Guid>("ItemId")
 221272                        .HasColumnType("TEXT");
 221273
 221274                    b.Property<Guid>("UserId")
 221275                        .HasColumnType("TEXT");
 221276
 221277                    b.Property<string>("CustomDataKey")
 221278                        .HasColumnType("TEXT");
 221279
 221280                    b.Property<int?>("AudioStreamIndex")
 221281                        .HasColumnType("INTEGER");
 221282
 221283                    b.Property<bool>("IsFavorite")
 221284                        .HasColumnType("INTEGER");
 221285
 221286                    b.Property<DateTime?>("LastPlayedDate")
 221287                        .HasColumnType("TEXT");
 221288
 221289                    b.Property<bool?>("Likes")
 221290                        .HasColumnType("INTEGER");
 221291
 221292                    b.Property<int>("PlayCount")
 221293                        .HasColumnType("INTEGER");
 221294
 221295                    b.Property<long>("PlaybackPositionTicks")
 221296                        .HasColumnType("INTEGER");
 221297
 221298                    b.Property<bool>("Played")
 221299                        .HasColumnType("INTEGER");
 221300
 221301                    b.Property<double?>("Rating")
 221302                        .HasColumnType("REAL");
 221303
 221304                    b.Property<int?>("SubtitleStreamIndex")
 221305                        .HasColumnType("INTEGER");
 221306
 221307                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221308
 221309                    b.HasIndex("UserId");
 221310
 221311                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221312
 221313                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221314
 221315                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221316
 221317                    b.HasIndex("ItemId", "UserId", "Played");
 221318
 221319                    b.ToTable("UserData");
 221320                });
 1321
 221322            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 221323                {
 221324                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221325                        .WithMany("AccessSchedules")
 221326                        .HasForeignKey("UserId")
 221327                        .OnDelete(DeleteBehavior.Cascade)
 221328                        .IsRequired();
 221329                });
 1330
 221331            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 221332                {
 221333                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221334                        .WithMany("Children")
 221335                        .HasForeignKey("ItemId")
 221336                        .OnDelete(DeleteBehavior.Cascade)
 221337                        .IsRequired();
 221338
 221339                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem")
 221340                        .WithMany("ParentAncestors")
 221341                        .HasForeignKey("ParentItemId")
 221342                        .OnDelete(DeleteBehavior.Cascade)
 221343                        .IsRequired();
 221344
 221345                    b.Navigation("Item");
 221346
 221347                    b.Navigation("ParentItem");
 221348                });
 1349
 221350            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 221351                {
 221352                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221353                        .WithMany()
 221354                        .HasForeignKey("ItemId")
 221355                        .OnDelete(DeleteBehavior.Cascade)
 221356                        .IsRequired();
 221357
 221358                    b.Navigation("Item");
 221359                });
 1360
 221361            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 221362                {
 221363                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221364                        .WithMany("Images")
 221365                        .HasForeignKey("ItemId")
 221366                        .OnDelete(DeleteBehavior.Cascade)
 221367                        .IsRequired();
 221368
 221369                    b.Navigation("Item");
 221370                });
 1371
 221372            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 221373                {
 221374                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221375                        .WithMany("LockedFields")
 221376                        .HasForeignKey("ItemId")
 221377                        .OnDelete(DeleteBehavior.Cascade)
 221378                        .IsRequired();
 221379
 221380                    b.Navigation("Item");
 221381                });
 1382
 221383            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 221384                {
 221385                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221386                        .WithMany("Provider")
 221387                        .HasForeignKey("ItemId")
 221388                        .OnDelete(DeleteBehavior.Cascade)
 221389                        .IsRequired();
 221390
 221391                    b.Navigation("Item");
 221392                });
 1393
 221394            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 221395                {
 221396                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221397                        .WithMany("TrailerTypes")
 221398                        .HasForeignKey("ItemId")
 221399                        .OnDelete(DeleteBehavior.Cascade)
 221400                        .IsRequired();
 221401
 221402                    b.Navigation("Item");
 221403                });
 1404
 221405            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 221406                {
 221407                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221408                        .WithMany("Chapters")
 221409                        .HasForeignKey("ItemId")
 221410                        .OnDelete(DeleteBehavior.Cascade)
 221411                        .IsRequired();
 221412
 221413                    b.Navigation("Item");
 221414                });
 1415
 221416            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221417                {
 221418                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221419                        .WithMany("DisplayPreferences")
 221420                        .HasForeignKey("UserId")
 221421                        .OnDelete(DeleteBehavior.Cascade)
 221422                        .IsRequired();
 221423                });
 1424
 221425            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 221426                {
 221427                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 221428                        .WithMany("HomeSections")
 221429                        .HasForeignKey("DisplayPreferencesId")
 221430                        .OnDelete(DeleteBehavior.Cascade)
 221431                        .IsRequired();
 221432                });
 1433
 221434            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 221435                {
 221436                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221437                        .WithOne("ProfileImage")
 221438                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 221439                        .OnDelete(DeleteBehavior.Cascade);
 221440                });
 1441
 221442            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 221443                {
 221444                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221445                        .WithMany("ItemDisplayPreferences")
 221446                        .HasForeignKey("UserId")
 221447                        .OnDelete(DeleteBehavior.Cascade)
 221448                        .IsRequired();
 221449                });
 1450
 221451            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 221452                {
 221453                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221454                        .WithMany("ItemValues")
 221455                        .HasForeignKey("ItemId")
 221456                        .OnDelete(DeleteBehavior.Cascade)
 221457                        .IsRequired();
 221458
 221459                    b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue")
 221460                        .WithMany("BaseItemsMap")
 221461                        .HasForeignKey("ItemValueId")
 221462                        .OnDelete(DeleteBehavior.Cascade)
 221463                        .IsRequired();
 221464
 221465                    b.Navigation("Item");
 221466
 221467                    b.Navigation("ItemValue");
 221468                });
 1469
 221470            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 221471                {
 221472                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221473                        .WithMany("MediaStreams")
 221474                        .HasForeignKey("ItemId")
 221475                        .OnDelete(DeleteBehavior.Cascade)
 221476                        .IsRequired();
 221477
 221478                    b.Navigation("Item");
 221479                });
 1480
 221481            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 221482                {
 221483                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221484                        .WithMany("Peoples")
 221485                        .HasForeignKey("ItemId")
 221486                        .OnDelete(DeleteBehavior.Cascade)
 221487                        .IsRequired();
 221488
 221489                    b.HasOne("Jellyfin.Data.Entities.People", "People")
 221490                        .WithMany("BaseItems")
 221491                        .HasForeignKey("PeopleId")
 221492                        .OnDelete(DeleteBehavior.Cascade)
 221493                        .IsRequired();
 221494
 221495                    b.Navigation("Item");
 221496
 221497                    b.Navigation("People");
 221498                });
 1499
 221500            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 221501                {
 221502                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221503                        .WithMany("Permissions")
 221504                        .HasForeignKey("UserId")
 221505                        .OnDelete(DeleteBehavior.Cascade);
 221506                });
 1507
 221508            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 221509                {
 221510                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221511                        .WithMany("Preferences")
 221512                        .HasForeignKey("UserId")
 221513                        .OnDelete(DeleteBehavior.Cascade);
 221514                });
 1515
 221516            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221517                {
 221518                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221519                        .WithMany()
 221520                        .HasForeignKey("UserId")
 221521                        .OnDelete(DeleteBehavior.Cascade)
 221522                        .IsRequired();
 221523
 221524                    b.Navigation("User");
 221525                });
 1526
 221527            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221528                {
 221529                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221530                        .WithMany("UserData")
 221531                        .HasForeignKey("ItemId")
 221532                        .OnDelete(DeleteBehavior.Cascade)
 221533                        .IsRequired();
 221534
 221535                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221536                        .WithMany()
 221537                        .HasForeignKey("UserId")
 221538                        .OnDelete(DeleteBehavior.Cascade)
 221539                        .IsRequired();
 221540
 221541                    b.Navigation("Item");
 221542
 221543                    b.Navigation("User");
 221544                });
 1545
 221546            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 221547                {
 221548                    b.Navigation("Chapters");
 221549
 221550                    b.Navigation("Children");
 221551
 221552                    b.Navigation("Images");
 221553
 221554                    b.Navigation("ItemValues");
 221555
 221556                    b.Navigation("LockedFields");
 221557
 221558                    b.Navigation("MediaStreams");
 221559
 221560                    b.Navigation("ParentAncestors");
 221561
 221562                    b.Navigation("Peoples");
 221563
 221564                    b.Navigation("Provider");
 221565
 221566                    b.Navigation("TrailerTypes");
 221567
 221568                    b.Navigation("UserData");
 221569                });
 1570
 221571            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221572                {
 221573                    b.Navigation("HomeSections");
 221574                });
 1575
 221576            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 221577                {
 221578                    b.Navigation("BaseItemsMap");
 221579                });
 1580
 221581            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 221582                {
 221583                    b.Navigation("BaseItems");
 221584                });
 1585
 221586            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221587                {
 221588                    b.Navigation("AccessSchedules");
 221589
 221590                    b.Navigation("DisplayPreferences");
 221591
 221592                    b.Navigation("ItemDisplayPreferences");
 221593
 221594                    b.Navigation("Permissions");
 221595
 221596                    b.Navigation("Preferences");
 221597
 221598                    b.Navigation("ProfileImage");
 221599                });
 1600#pragma warning restore 612, 618
 221601        }
 1602    }
 1603}