< Summary - Jellyfin

Line coverage
98%
Covered lines: 1534
Uncovered lines: 19
Coverable lines: 1553
Total lines: 1650
Line coverage: 98.7%
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.7% (1534/1553) Total lines: 1650

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/20250204092455_MakeStartEndDateNullable.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 MakeStartEndDateNullable : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2214            migrationBuilder.AlterColumn<DateTime>(
 2215                name: "StartDate",
 2216                table: "BaseItems",
 2217                type: "TEXT",
 2218                nullable: true,
 2219                oldClrType: typeof(DateTime),
 2220                oldType: "TEXT");
 21
 2222            migrationBuilder.AlterColumn<DateTime>(
 2223                name: "EndDate",
 2224                table: "BaseItems",
 2225                type: "TEXT",
 2226                nullable: true,
 2227                oldClrType: typeof(DateTime),
 2228                oldType: "TEXT");
 2229        }
 30
 31        /// <inheritdoc />
 32        protected override void Down(MigrationBuilder migrationBuilder)
 33        {
 034            migrationBuilder.AlterColumn<DateTime>(
 035                name: "StartDate",
 036                table: "BaseItems",
 037                type: "TEXT",
 038                nullable: false,
 039                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
 040                oldClrType: typeof(DateTime),
 041                oldType: "TEXT",
 042                oldNullable: true);
 43
 044            migrationBuilder.AlterColumn<DateTime>(
 045                name: "EndDate",
 046                table: "BaseItems",
 047                type: "TEXT",
 048                nullable: false,
 049                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
 050                oldClrType: typeof(DateTime),
 051                oldType: "TEXT",
 052                oldNullable: true);
 053        }
 54    }
 55}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.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("20250204092455_MakeStartEndDateNullable")]
 15    partial class MakeStartEndDateNullable
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "9.0.1");
 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                        .IsUnique();
 22698
 22699                    b.ToTable("ItemValues");
 22700                });
 701
 22702            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 22703                {
 22704                    b.Property<Guid>("ItemValueId")
 22705                        .HasColumnType("TEXT");
 22706
 22707                    b.Property<Guid>("ItemId")
 22708                        .HasColumnType("TEXT");
 22709
 22710                    b.HasKey("ItemValueId", "ItemId");
 22711
 22712                    b.HasIndex("ItemId");
 22713
 22714                    b.ToTable("ItemValuesMap");
 22715                });
 716
 22717            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 22718                {
 22719                    b.Property<Guid>("Id")
 22720                        .ValueGeneratedOnAdd()
 22721                        .HasColumnType("TEXT");
 22722
 22723                    b.Property<long>("EndTicks")
 22724                        .HasColumnType("INTEGER");
 22725
 22726                    b.Property<Guid>("ItemId")
 22727                        .HasColumnType("TEXT");
 22728
 22729                    b.Property<string>("SegmentProviderId")
 22730                        .IsRequired()
 22731                        .HasColumnType("TEXT");
 22732
 22733                    b.Property<long>("StartTicks")
 22734                        .HasColumnType("INTEGER");
 22735
 22736                    b.Property<int>("Type")
 22737                        .HasColumnType("INTEGER");
 22738
 22739                    b.HasKey("Id");
 22740
 22741                    b.ToTable("MediaSegments");
 22742                });
 743
 22744            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 22745                {
 22746                    b.Property<Guid>("ItemId")
 22747                        .HasColumnType("TEXT");
 22748
 22749                    b.Property<int>("StreamIndex")
 22750                        .HasColumnType("INTEGER");
 22751
 22752                    b.Property<string>("AspectRatio")
 22753                        .HasColumnType("TEXT");
 22754
 22755                    b.Property<float?>("AverageFrameRate")
 22756                        .HasColumnType("REAL");
 22757
 22758                    b.Property<int?>("BitDepth")
 22759                        .HasColumnType("INTEGER");
 22760
 22761                    b.Property<int?>("BitRate")
 22762                        .HasColumnType("INTEGER");
 22763
 22764                    b.Property<int?>("BlPresentFlag")
 22765                        .HasColumnType("INTEGER");
 22766
 22767                    b.Property<string>("ChannelLayout")
 22768                        .HasColumnType("TEXT");
 22769
 22770                    b.Property<int?>("Channels")
 22771                        .HasColumnType("INTEGER");
 22772
 22773                    b.Property<string>("Codec")
 22774                        .HasColumnType("TEXT");
 22775
 22776                    b.Property<string>("CodecTag")
 22777                        .HasColumnType("TEXT");
 22778
 22779                    b.Property<string>("CodecTimeBase")
 22780                        .HasColumnType("TEXT");
 22781
 22782                    b.Property<string>("ColorPrimaries")
 22783                        .HasColumnType("TEXT");
 22784
 22785                    b.Property<string>("ColorSpace")
 22786                        .HasColumnType("TEXT");
 22787
 22788                    b.Property<string>("ColorTransfer")
 22789                        .HasColumnType("TEXT");
 22790
 22791                    b.Property<string>("Comment")
 22792                        .HasColumnType("TEXT");
 22793
 22794                    b.Property<int?>("DvBlSignalCompatibilityId")
 22795                        .HasColumnType("INTEGER");
 22796
 22797                    b.Property<int?>("DvLevel")
 22798                        .HasColumnType("INTEGER");
 22799
 22800                    b.Property<int?>("DvProfile")
 22801                        .HasColumnType("INTEGER");
 22802
 22803                    b.Property<int?>("DvVersionMajor")
 22804                        .HasColumnType("INTEGER");
 22805
 22806                    b.Property<int?>("DvVersionMinor")
 22807                        .HasColumnType("INTEGER");
 22808
 22809                    b.Property<int?>("ElPresentFlag")
 22810                        .HasColumnType("INTEGER");
 22811
 22812                    b.Property<int?>("Height")
 22813                        .HasColumnType("INTEGER");
 22814
 22815                    b.Property<bool?>("IsAnamorphic")
 22816                        .HasColumnType("INTEGER");
 22817
 22818                    b.Property<bool?>("IsAvc")
 22819                        .HasColumnType("INTEGER");
 22820
 22821                    b.Property<bool>("IsDefault")
 22822                        .HasColumnType("INTEGER");
 22823
 22824                    b.Property<bool>("IsExternal")
 22825                        .HasColumnType("INTEGER");
 22826
 22827                    b.Property<bool>("IsForced")
 22828                        .HasColumnType("INTEGER");
 22829
 22830                    b.Property<bool?>("IsHearingImpaired")
 22831                        .HasColumnType("INTEGER");
 22832
 22833                    b.Property<bool?>("IsInterlaced")
 22834                        .HasColumnType("INTEGER");
 22835
 22836                    b.Property<string>("KeyFrames")
 22837                        .HasColumnType("TEXT");
 22838
 22839                    b.Property<string>("Language")
 22840                        .HasColumnType("TEXT");
 22841
 22842                    b.Property<float?>("Level")
 22843                        .HasColumnType("REAL");
 22844
 22845                    b.Property<string>("NalLengthSize")
 22846                        .HasColumnType("TEXT");
 22847
 22848                    b.Property<string>("Path")
 22849                        .HasColumnType("TEXT");
 22850
 22851                    b.Property<string>("PixelFormat")
 22852                        .HasColumnType("TEXT");
 22853
 22854                    b.Property<string>("Profile")
 22855                        .HasColumnType("TEXT");
 22856
 22857                    b.Property<float?>("RealFrameRate")
 22858                        .HasColumnType("REAL");
 22859
 22860                    b.Property<int?>("RefFrames")
 22861                        .HasColumnType("INTEGER");
 22862
 22863                    b.Property<int?>("Rotation")
 22864                        .HasColumnType("INTEGER");
 22865
 22866                    b.Property<int?>("RpuPresentFlag")
 22867                        .HasColumnType("INTEGER");
 22868
 22869                    b.Property<int?>("SampleRate")
 22870                        .HasColumnType("INTEGER");
 22871
 22872                    b.Property<int>("StreamType")
 22873                        .HasColumnType("INTEGER");
 22874
 22875                    b.Property<string>("TimeBase")
 22876                        .HasColumnType("TEXT");
 22877
 22878                    b.Property<string>("Title")
 22879                        .HasColumnType("TEXT");
 22880
 22881                    b.Property<int?>("Width")
 22882                        .HasColumnType("INTEGER");
 22883
 22884                    b.HasKey("ItemId", "StreamIndex");
 22885
 22886                    b.HasIndex("StreamIndex");
 22887
 22888                    b.HasIndex("StreamType");
 22889
 22890                    b.HasIndex("StreamIndex", "StreamType");
 22891
 22892                    b.HasIndex("StreamIndex", "StreamType", "Language");
 22893
 22894                    b.ToTable("MediaStreamInfos");
 22895                });
 896
 22897            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 22898                {
 22899                    b.Property<Guid>("Id")
 22900                        .ValueGeneratedOnAdd()
 22901                        .HasColumnType("TEXT");
 22902
 22903                    b.Property<string>("Name")
 22904                        .IsRequired()
 22905                        .HasColumnType("TEXT");
 22906
 22907                    b.Property<string>("PersonType")
 22908                        .HasColumnType("TEXT");
 22909
 22910                    b.HasKey("Id");
 22911
 22912                    b.HasIndex("Name");
 22913
 22914                    b.ToTable("Peoples");
 22915                });
 916
 22917            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 22918                {
 22919                    b.Property<Guid>("ItemId")
 22920                        .HasColumnType("TEXT");
 22921
 22922                    b.Property<Guid>("PeopleId")
 22923                        .HasColumnType("TEXT");
 22924
 22925                    b.Property<int?>("ListOrder")
 22926                        .HasColumnType("INTEGER");
 22927
 22928                    b.Property<string>("Role")
 22929                        .HasColumnType("TEXT");
 22930
 22931                    b.Property<int?>("SortOrder")
 22932                        .HasColumnType("INTEGER");
 22933
 22934                    b.HasKey("ItemId", "PeopleId");
 22935
 22936                    b.HasIndex("PeopleId");
 22937
 22938                    b.HasIndex("ItemId", "ListOrder");
 22939
 22940                    b.HasIndex("ItemId", "SortOrder");
 22941
 22942                    b.ToTable("PeopleBaseItemMap");
 22943                });
 944
 22945            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22946                {
 22947                    b.Property<int>("Id")
 22948                        .ValueGeneratedOnAdd()
 22949                        .HasColumnType("INTEGER");
 22950
 22951                    b.Property<int>("Kind")
 22952                        .HasColumnType("INTEGER");
 22953
 22954                    b.Property<Guid?>("Permission_Permissions_Guid")
 22955                        .HasColumnType("TEXT");
 22956
 22957                    b.Property<uint>("RowVersion")
 22958                        .IsConcurrencyToken()
 22959                        .HasColumnType("INTEGER");
 22960
 22961                    b.Property<Guid?>("UserId")
 22962                        .HasColumnType("TEXT");
 22963
 22964                    b.Property<bool>("Value")
 22965                        .HasColumnType("INTEGER");
 22966
 22967                    b.HasKey("Id");
 22968
 22969                    b.HasIndex("UserId", "Kind")
 22970                        .IsUnique()
 22971                        .HasFilter("[UserId] IS NOT NULL");
 22972
 22973                    b.ToTable("Permissions");
 22974                });
 975
 22976            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22977                {
 22978                    b.Property<int>("Id")
 22979                        .ValueGeneratedOnAdd()
 22980                        .HasColumnType("INTEGER");
 22981
 22982                    b.Property<int>("Kind")
 22983                        .HasColumnType("INTEGER");
 22984
 22985                    b.Property<Guid?>("Preference_Preferences_Guid")
 22986                        .HasColumnType("TEXT");
 22987
 22988                    b.Property<uint>("RowVersion")
 22989                        .IsConcurrencyToken()
 22990                        .HasColumnType("INTEGER");
 22991
 22992                    b.Property<Guid?>("UserId")
 22993                        .HasColumnType("TEXT");
 22994
 22995                    b.Property<string>("Value")
 22996                        .IsRequired()
 22997                        .HasMaxLength(65535)
 22998                        .HasColumnType("TEXT");
 22999
 221000                    b.HasKey("Id");
 221001
 221002                    b.HasIndex("UserId", "Kind")
 221003                        .IsUnique()
 221004                        .HasFilter("[UserId] IS NOT NULL");
 221005
 221006                    b.ToTable("Preferences");
 221007                });
 1008
 221009            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 221010                {
 221011                    b.Property<int>("Id")
 221012                        .ValueGeneratedOnAdd()
 221013                        .HasColumnType("INTEGER");
 221014
 221015                    b.Property<string>("AccessToken")
 221016                        .IsRequired()
 221017                        .HasColumnType("TEXT");
 221018
 221019                    b.Property<DateTime>("DateCreated")
 221020                        .HasColumnType("TEXT");
 221021
 221022                    b.Property<DateTime>("DateLastActivity")
 221023                        .HasColumnType("TEXT");
 221024
 221025                    b.Property<string>("Name")
 221026                        .IsRequired()
 221027                        .HasMaxLength(64)
 221028                        .HasColumnType("TEXT");
 221029
 221030                    b.HasKey("Id");
 221031
 221032                    b.HasIndex("AccessToken")
 221033                        .IsUnique();
 221034
 221035                    b.ToTable("ApiKeys");
 221036                });
 1037
 221038            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221039                {
 221040                    b.Property<int>("Id")
 221041                        .ValueGeneratedOnAdd()
 221042                        .HasColumnType("INTEGER");
 221043
 221044                    b.Property<string>("AccessToken")
 221045                        .IsRequired()
 221046                        .HasColumnType("TEXT");
 221047
 221048                    b.Property<string>("AppName")
 221049                        .IsRequired()
 221050                        .HasMaxLength(64)
 221051                        .HasColumnType("TEXT");
 221052
 221053                    b.Property<string>("AppVersion")
 221054                        .IsRequired()
 221055                        .HasMaxLength(32)
 221056                        .HasColumnType("TEXT");
 221057
 221058                    b.Property<DateTime>("DateCreated")
 221059                        .HasColumnType("TEXT");
 221060
 221061                    b.Property<DateTime>("DateLastActivity")
 221062                        .HasColumnType("TEXT");
 221063
 221064                    b.Property<DateTime>("DateModified")
 221065                        .HasColumnType("TEXT");
 221066
 221067                    b.Property<string>("DeviceId")
 221068                        .IsRequired()
 221069                        .HasMaxLength(256)
 221070                        .HasColumnType("TEXT");
 221071
 221072                    b.Property<string>("DeviceName")
 221073                        .IsRequired()
 221074                        .HasMaxLength(64)
 221075                        .HasColumnType("TEXT");
 221076
 221077                    b.Property<bool>("IsActive")
 221078                        .HasColumnType("INTEGER");
 221079
 221080                    b.Property<Guid>("UserId")
 221081                        .HasColumnType("TEXT");
 221082
 221083                    b.HasKey("Id");
 221084
 221085                    b.HasIndex("DeviceId");
 221086
 221087                    b.HasIndex("AccessToken", "DateLastActivity");
 221088
 221089                    b.HasIndex("DeviceId", "DateLastActivity");
 221090
 221091                    b.HasIndex("UserId", "DeviceId");
 221092
 221093                    b.ToTable("Devices");
 221094                });
 1095
 221096            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 221097                {
 221098                    b.Property<int>("Id")
 221099                        .ValueGeneratedOnAdd()
 221100                        .HasColumnType("INTEGER");
 221101
 221102                    b.Property<string>("CustomName")
 221103                        .HasColumnType("TEXT");
 221104
 221105                    b.Property<string>("DeviceId")
 221106                        .IsRequired()
 221107                        .HasColumnType("TEXT");
 221108
 221109                    b.HasKey("Id");
 221110
 221111                    b.HasIndex("DeviceId")
 221112                        .IsUnique();
 221113
 221114                    b.ToTable("DeviceOptions");
 221115                });
 1116
 221117            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 221118                {
 221119                    b.Property<Guid>("ItemId")
 221120                        .HasColumnType("TEXT");
 221121
 221122                    b.Property<int>("Width")
 221123                        .HasColumnType("INTEGER");
 221124
 221125                    b.Property<int>("Bandwidth")
 221126                        .HasColumnType("INTEGER");
 221127
 221128                    b.Property<int>("Height")
 221129                        .HasColumnType("INTEGER");
 221130
 221131                    b.Property<int>("Interval")
 221132                        .HasColumnType("INTEGER");
 221133
 221134                    b.Property<int>("ThumbnailCount")
 221135                        .HasColumnType("INTEGER");
 221136
 221137                    b.Property<int>("TileHeight")
 221138                        .HasColumnType("INTEGER");
 221139
 221140                    b.Property<int>("TileWidth")
 221141                        .HasColumnType("INTEGER");
 221142
 221143                    b.HasKey("ItemId", "Width");
 221144
 221145                    b.ToTable("TrickplayInfos");
 221146                });
 1147
 221148            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221149                {
 221150                    b.Property<Guid>("Id")
 221151                        .ValueGeneratedOnAdd()
 221152                        .HasColumnType("TEXT");
 221153
 221154                    b.Property<string>("AudioLanguagePreference")
 221155                        .HasMaxLength(255)
 221156                        .HasColumnType("TEXT");
 221157
 221158                    b.Property<string>("AuthenticationProviderId")
 221159                        .IsRequired()
 221160                        .HasMaxLength(255)
 221161                        .HasColumnType("TEXT");
 221162
 221163                    b.Property<string>("CastReceiverId")
 221164                        .HasMaxLength(32)
 221165                        .HasColumnType("TEXT");
 221166
 221167                    b.Property<bool>("DisplayCollectionsView")
 221168                        .HasColumnType("INTEGER");
 221169
 221170                    b.Property<bool>("DisplayMissingEpisodes")
 221171                        .HasColumnType("INTEGER");
 221172
 221173                    b.Property<bool>("EnableAutoLogin")
 221174                        .HasColumnType("INTEGER");
 221175
 221176                    b.Property<bool>("EnableLocalPassword")
 221177                        .HasColumnType("INTEGER");
 221178
 221179                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221180                        .HasColumnType("INTEGER");
 221181
 221182                    b.Property<bool>("EnableUserPreferenceAccess")
 221183                        .HasColumnType("INTEGER");
 221184
 221185                    b.Property<bool>("HidePlayedInLatest")
 221186                        .HasColumnType("INTEGER");
 221187
 221188                    b.Property<long>("InternalId")
 221189                        .HasColumnType("INTEGER");
 221190
 221191                    b.Property<int>("InvalidLoginAttemptCount")
 221192                        .HasColumnType("INTEGER");
 221193
 221194                    b.Property<DateTime?>("LastActivityDate")
 221195                        .HasColumnType("TEXT");
 221196
 221197                    b.Property<DateTime?>("LastLoginDate")
 221198                        .HasColumnType("TEXT");
 221199
 221200                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221201                        .HasColumnType("INTEGER");
 221202
 221203                    b.Property<int>("MaxActiveSessions")
 221204                        .HasColumnType("INTEGER");
 221205
 221206                    b.Property<int?>("MaxParentalAgeRating")
 221207                        .HasColumnType("INTEGER");
 221208
 221209                    b.Property<bool>("MustUpdatePassword")
 221210                        .HasColumnType("INTEGER");
 221211
 221212                    b.Property<string>("Password")
 221213                        .HasMaxLength(65535)
 221214                        .HasColumnType("TEXT");
 221215
 221216                    b.Property<string>("PasswordResetProviderId")
 221217                        .IsRequired()
 221218                        .HasMaxLength(255)
 221219                        .HasColumnType("TEXT");
 221220
 221221                    b.Property<bool>("PlayDefaultAudioTrack")
 221222                        .HasColumnType("INTEGER");
 221223
 221224                    b.Property<bool>("RememberAudioSelections")
 221225                        .HasColumnType("INTEGER");
 221226
 221227                    b.Property<bool>("RememberSubtitleSelections")
 221228                        .HasColumnType("INTEGER");
 221229
 221230                    b.Property<int?>("RemoteClientBitrateLimit")
 221231                        .HasColumnType("INTEGER");
 221232
 221233                    b.Property<uint>("RowVersion")
 221234                        .IsConcurrencyToken()
 221235                        .HasColumnType("INTEGER");
 221236
 221237                    b.Property<string>("SubtitleLanguagePreference")
 221238                        .HasMaxLength(255)
 221239                        .HasColumnType("TEXT");
 221240
 221241                    b.Property<int>("SubtitleMode")
 221242                        .HasColumnType("INTEGER");
 221243
 221244                    b.Property<int>("SyncPlayAccess")
 221245                        .HasColumnType("INTEGER");
 221246
 221247                    b.Property<string>("Username")
 221248                        .IsRequired()
 221249                        .HasMaxLength(255)
 221250                        .HasColumnType("TEXT")
 221251                        .UseCollation("NOCASE");
 221252
 221253                    b.HasKey("Id");
 221254
 221255                    b.HasIndex("Username")
 221256                        .IsUnique();
 221257
 221258                    b.ToTable("Users");
 221259                });
 1260
 221261            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221262                {
 221263                    b.Property<Guid>("ItemId")
 221264                        .HasColumnType("TEXT");
 221265
 221266                    b.Property<Guid>("UserId")
 221267                        .HasColumnType("TEXT");
 221268
 221269                    b.Property<string>("CustomDataKey")
 221270                        .HasColumnType("TEXT");
 221271
 221272                    b.Property<int?>("AudioStreamIndex")
 221273                        .HasColumnType("INTEGER");
 221274
 221275                    b.Property<bool>("IsFavorite")
 221276                        .HasColumnType("INTEGER");
 221277
 221278                    b.Property<DateTime?>("LastPlayedDate")
 221279                        .HasColumnType("TEXT");
 221280
 221281                    b.Property<bool?>("Likes")
 221282                        .HasColumnType("INTEGER");
 221283
 221284                    b.Property<int>("PlayCount")
 221285                        .HasColumnType("INTEGER");
 221286
 221287                    b.Property<long>("PlaybackPositionTicks")
 221288                        .HasColumnType("INTEGER");
 221289
 221290                    b.Property<bool>("Played")
 221291                        .HasColumnType("INTEGER");
 221292
 221293                    b.Property<double?>("Rating")
 221294                        .HasColumnType("REAL");
 221295
 221296                    b.Property<int?>("SubtitleStreamIndex")
 221297                        .HasColumnType("INTEGER");
 221298
 221299                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221300
 221301                    b.HasIndex("UserId");
 221302
 221303                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221304
 221305                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221306
 221307                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221308
 221309                    b.HasIndex("ItemId", "UserId", "Played");
 221310
 221311                    b.ToTable("UserData");
 221312                });
 1313
 221314            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 221315                {
 221316                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221317                        .WithMany("AccessSchedules")
 221318                        .HasForeignKey("UserId")
 221319                        .OnDelete(DeleteBehavior.Cascade)
 221320                        .IsRequired();
 221321                });
 1322
 221323            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 221324                {
 221325                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221326                        .WithMany("Children")
 221327                        .HasForeignKey("ItemId")
 221328                        .OnDelete(DeleteBehavior.Cascade)
 221329                        .IsRequired();
 221330
 221331                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem")
 221332                        .WithMany("ParentAncestors")
 221333                        .HasForeignKey("ParentItemId")
 221334                        .OnDelete(DeleteBehavior.Cascade)
 221335                        .IsRequired();
 221336
 221337                    b.Navigation("Item");
 221338
 221339                    b.Navigation("ParentItem");
 221340                });
 1341
 221342            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 221343                {
 221344                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221345                        .WithMany()
 221346                        .HasForeignKey("ItemId")
 221347                        .OnDelete(DeleteBehavior.Cascade)
 221348                        .IsRequired();
 221349
 221350                    b.Navigation("Item");
 221351                });
 1352
 221353            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 221354                {
 221355                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221356                        .WithMany("Images")
 221357                        .HasForeignKey("ItemId")
 221358                        .OnDelete(DeleteBehavior.Cascade)
 221359                        .IsRequired();
 221360
 221361                    b.Navigation("Item");
 221362                });
 1363
 221364            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 221365                {
 221366                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221367                        .WithMany("LockedFields")
 221368                        .HasForeignKey("ItemId")
 221369                        .OnDelete(DeleteBehavior.Cascade)
 221370                        .IsRequired();
 221371
 221372                    b.Navigation("Item");
 221373                });
 1374
 221375            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 221376                {
 221377                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221378                        .WithMany("Provider")
 221379                        .HasForeignKey("ItemId")
 221380                        .OnDelete(DeleteBehavior.Cascade)
 221381                        .IsRequired();
 221382
 221383                    b.Navigation("Item");
 221384                });
 1385
 221386            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 221387                {
 221388                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221389                        .WithMany("TrailerTypes")
 221390                        .HasForeignKey("ItemId")
 221391                        .OnDelete(DeleteBehavior.Cascade)
 221392                        .IsRequired();
 221393
 221394                    b.Navigation("Item");
 221395                });
 1396
 221397            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 221398                {
 221399                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221400                        .WithMany("Chapters")
 221401                        .HasForeignKey("ItemId")
 221402                        .OnDelete(DeleteBehavior.Cascade)
 221403                        .IsRequired();
 221404
 221405                    b.Navigation("Item");
 221406                });
 1407
 221408            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221409                {
 221410                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221411                        .WithMany("DisplayPreferences")
 221412                        .HasForeignKey("UserId")
 221413                        .OnDelete(DeleteBehavior.Cascade)
 221414                        .IsRequired();
 221415                });
 1416
 221417            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 221418                {
 221419                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 221420                        .WithMany("HomeSections")
 221421                        .HasForeignKey("DisplayPreferencesId")
 221422                        .OnDelete(DeleteBehavior.Cascade)
 221423                        .IsRequired();
 221424                });
 1425
 221426            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 221427                {
 221428                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221429                        .WithOne("ProfileImage")
 221430                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 221431                        .OnDelete(DeleteBehavior.Cascade);
 221432                });
 1433
 221434            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 221435                {
 221436                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221437                        .WithMany("ItemDisplayPreferences")
 221438                        .HasForeignKey("UserId")
 221439                        .OnDelete(DeleteBehavior.Cascade)
 221440                        .IsRequired();
 221441                });
 1442
 221443            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 221444                {
 221445                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221446                        .WithMany("ItemValues")
 221447                        .HasForeignKey("ItemId")
 221448                        .OnDelete(DeleteBehavior.Cascade)
 221449                        .IsRequired();
 221450
 221451                    b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue")
 221452                        .WithMany("BaseItemsMap")
 221453                        .HasForeignKey("ItemValueId")
 221454                        .OnDelete(DeleteBehavior.Cascade)
 221455                        .IsRequired();
 221456
 221457                    b.Navigation("Item");
 221458
 221459                    b.Navigation("ItemValue");
 221460                });
 1461
 221462            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 221463                {
 221464                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221465                        .WithMany("MediaStreams")
 221466                        .HasForeignKey("ItemId")
 221467                        .OnDelete(DeleteBehavior.Cascade)
 221468                        .IsRequired();
 221469
 221470                    b.Navigation("Item");
 221471                });
 1472
 221473            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 221474                {
 221475                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221476                        .WithMany("Peoples")
 221477                        .HasForeignKey("ItemId")
 221478                        .OnDelete(DeleteBehavior.Cascade)
 221479                        .IsRequired();
 221480
 221481                    b.HasOne("Jellyfin.Data.Entities.People", "People")
 221482                        .WithMany("BaseItems")
 221483                        .HasForeignKey("PeopleId")
 221484                        .OnDelete(DeleteBehavior.Cascade)
 221485                        .IsRequired();
 221486
 221487                    b.Navigation("Item");
 221488
 221489                    b.Navigation("People");
 221490                });
 1491
 221492            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 221493                {
 221494                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221495                        .WithMany("Permissions")
 221496                        .HasForeignKey("UserId")
 221497                        .OnDelete(DeleteBehavior.Cascade);
 221498                });
 1499
 221500            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 221501                {
 221502                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221503                        .WithMany("Preferences")
 221504                        .HasForeignKey("UserId")
 221505                        .OnDelete(DeleteBehavior.Cascade);
 221506                });
 1507
 221508            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221509                {
 221510                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221511                        .WithMany()
 221512                        .HasForeignKey("UserId")
 221513                        .OnDelete(DeleteBehavior.Cascade)
 221514                        .IsRequired();
 221515
 221516                    b.Navigation("User");
 221517                });
 1518
 221519            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221520                {
 221521                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221522                        .WithMany("UserData")
 221523                        .HasForeignKey("ItemId")
 221524                        .OnDelete(DeleteBehavior.Cascade)
 221525                        .IsRequired();
 221526
 221527                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221528                        .WithMany()
 221529                        .HasForeignKey("UserId")
 221530                        .OnDelete(DeleteBehavior.Cascade)
 221531                        .IsRequired();
 221532
 221533                    b.Navigation("Item");
 221534
 221535                    b.Navigation("User");
 221536                });
 1537
 221538            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 221539                {
 221540                    b.Navigation("Chapters");
 221541
 221542                    b.Navigation("Children");
 221543
 221544                    b.Navigation("Images");
 221545
 221546                    b.Navigation("ItemValues");
 221547
 221548                    b.Navigation("LockedFields");
 221549
 221550                    b.Navigation("MediaStreams");
 221551
 221552                    b.Navigation("ParentAncestors");
 221553
 221554                    b.Navigation("Peoples");
 221555
 221556                    b.Navigation("Provider");
 221557
 221558                    b.Navigation("TrailerTypes");
 221559
 221560                    b.Navigation("UserData");
 221561                });
 1562
 221563            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221564                {
 221565                    b.Navigation("HomeSections");
 221566                });
 1567
 221568            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 221569                {
 221570                    b.Navigation("BaseItemsMap");
 221571                });
 1572
 221573            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 221574                {
 221575                    b.Navigation("BaseItems");
 221576                });
 1577
 221578            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221579                {
 221580                    b.Navigation("AccessSchedules");
 221581
 221582                    b.Navigation("DisplayPreferences");
 221583
 221584                    b.Navigation("ItemDisplayPreferences");
 221585
 221586                    b.Navigation("Permissions");
 221587
 221588                    b.Navigation("Preferences");
 221589
 221590                    b.Navigation("ProfileImage");
 221591                });
 1592#pragma warning restore 612, 618
 221593        }
 1594    }
 1595}