< Summary - Jellyfin

Line coverage
99%
Covered lines: 1739
Uncovered lines: 10
Coverable lines: 1749
Total lines: 1852
Line coverage: 99.4%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/8/2026 - 12:15:13 AM Line coverage: 99.4% (1733/1743) Total lines: 18465/22/2026 - 12:15:17 AM Line coverage: 99.4% (1736/1746) Total lines: 18498/11/2026 - 12:17:00 AM Line coverage: 99.4% (1739/1749) Total lines: 1852

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddBaseItemNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.CreateIndex(
 2214                name: "IX_UserData_UserId_IsFavorite_ItemId",
 2215                table: "UserData",
 2216                columns: new[] { "UserId", "IsFavorite", "ItemId" });
 17
 2218            migrationBuilder.CreateIndex(
 2219                name: "IX_UserData_UserId_Played_ItemId",
 2220                table: "UserData",
 2221                columns: new[] { "UserId", "Played", "ItemId" });
 22
 2223            migrationBuilder.CreateIndex(
 2224                name: "IX_BaseItems_Name",
 2225                table: "BaseItems",
 2226                column: "Name");
 2227        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_UserData_UserId_IsFavorite_ItemId",
 034                table: "UserData");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_UserData_UserId_Played_ItemId",
 038                table: "UserData");
 39
 040            migrationBuilder.DropIndex(
 041                name: "IX_BaseItems_Name",
 042                table: "BaseItems");
 043        }
 44    }
 45}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.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.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260130232147_AddBaseItemNameIndex")]
 15    partial class AddBaseItemNameIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2223            modelBuilder.Entity("Jellyfin.Database.Implementations.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
 2247                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2248                });
 49
 2250            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2251                {
 2252                    b.Property<int>("Id")
 2253                        .ValueGeneratedOnAdd()
 2254                        .HasColumnType("INTEGER");
 2255
 2256                    b.Property<DateTime>("DateCreated")
 2257                        .HasColumnType("TEXT");
 2258
 2259                    b.Property<string>("ItemId")
 2260                        .HasMaxLength(256)
 2261                        .HasColumnType("TEXT");
 2262
 2263                    b.Property<int>("LogSeverity")
 2264                        .HasColumnType("INTEGER");
 2265
 2266                    b.Property<string>("Name")
 2267                        .IsRequired()
 2268                        .HasMaxLength(512)
 2269                        .HasColumnType("TEXT");
 2270
 2271                    b.Property<string>("Overview")
 2272                        .HasMaxLength(512)
 2273                        .HasColumnType("TEXT");
 2274
 2275                    b.Property<uint>("RowVersion")
 2276                        .IsConcurrencyToken()
 2277                        .HasColumnType("INTEGER");
 2278
 2279                    b.Property<string>("ShortOverview")
 2280                        .HasMaxLength(512)
 2281                        .HasColumnType("TEXT");
 2282
 2283                    b.Property<string>("Type")
 2284                        .IsRequired()
 2285                        .HasMaxLength(256)
 2286                        .HasColumnType("TEXT");
 2287
 2288                    b.Property<Guid>("UserId")
 2289                        .HasColumnType("TEXT");
 2290
 2291                    b.HasKey("Id");
 2292
 2293                    b.HasIndex("DateCreated");
 2294
 2295                    b.ToTable("ActivityLogs");
 2296
 2297                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2298                });
 99
 22100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 22101                {
 22102                    b.Property<Guid>("ItemId")
 22103                        .HasColumnType("TEXT");
 22104
 22105                    b.Property<Guid>("ParentItemId")
 22106                        .HasColumnType("TEXT");
 22107
 22108                    b.HasKey("ItemId", "ParentItemId");
 22109
 22110                    b.HasIndex("ParentItemId");
 22111
 22112                    b.ToTable("AncestorIds");
 22113
 22114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22115                });
 116
 22117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 22118                {
 22119                    b.Property<Guid>("ItemId")
 22120                        .HasColumnType("TEXT");
 22121
 22122                    b.Property<int>("Index")
 22123                        .HasColumnType("INTEGER");
 22124
 22125                    b.Property<string>("Codec")
 22126                        .HasColumnType("TEXT");
 22127
 22128                    b.Property<string>("CodecTag")
 22129                        .HasColumnType("TEXT");
 22130
 22131                    b.Property<string>("Comment")
 22132                        .HasColumnType("TEXT");
 22133
 22134                    b.Property<string>("Filename")
 22135                        .HasColumnType("TEXT");
 22136
 22137                    b.Property<string>("MimeType")
 22138                        .HasColumnType("TEXT");
 22139
 22140                    b.HasKey("ItemId", "Index");
 22141
 22142                    b.ToTable("AttachmentStreamInfos");
 22143
 22144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22145                });
 146
 22147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 22148                {
 22149                    b.Property<Guid>("Id")
 22150                        .ValueGeneratedOnAdd()
 22151                        .HasColumnType("TEXT");
 22152
 22153                    b.Property<string>("Album")
 22154                        .HasColumnType("TEXT");
 22155
 22156                    b.Property<string>("AlbumArtists")
 22157                        .HasColumnType("TEXT");
 22158
 22159                    b.Property<string>("Artists")
 22160                        .HasColumnType("TEXT");
 22161
 22162                    b.Property<int?>("Audio")
 22163                        .HasColumnType("INTEGER");
 22164
 22165                    b.Property<Guid?>("ChannelId")
 22166                        .HasColumnType("TEXT");
 22167
 22168                    b.Property<string>("CleanName")
 22169                        .HasColumnType("TEXT");
 22170
 22171                    b.Property<float?>("CommunityRating")
 22172                        .HasColumnType("REAL");
 22173
 22174                    b.Property<float?>("CriticRating")
 22175                        .HasColumnType("REAL");
 22176
 22177                    b.Property<string>("CustomRating")
 22178                        .HasColumnType("TEXT");
 22179
 22180                    b.Property<string>("Data")
 22181                        .HasColumnType("TEXT");
 22182
 22183                    b.Property<DateTime?>("DateCreated")
 22184                        .HasColumnType("TEXT");
 22185
 22186                    b.Property<DateTime?>("DateLastMediaAdded")
 22187                        .HasColumnType("TEXT");
 22188
 22189                    b.Property<DateTime?>("DateLastRefreshed")
 22190                        .HasColumnType("TEXT");
 22191
 22192                    b.Property<DateTime?>("DateLastSaved")
 22193                        .HasColumnType("TEXT");
 22194
 22195                    b.Property<DateTime?>("DateModified")
 22196                        .HasColumnType("TEXT");
 22197
 22198                    b.Property<DateTime?>("EndDate")
 22199                        .HasColumnType("TEXT");
 22200
 22201                    b.Property<string>("EpisodeTitle")
 22202                        .HasColumnType("TEXT");
 22203
 22204                    b.Property<string>("ExternalId")
 22205                        .HasColumnType("TEXT");
 22206
 22207                    b.Property<string>("ExternalSeriesId")
 22208                        .HasColumnType("TEXT");
 22209
 22210                    b.Property<string>("ExternalServiceId")
 22211                        .HasColumnType("TEXT");
 22212
 22213                    b.Property<int?>("ExtraType")
 22214                        .HasColumnType("INTEGER");
 22215
 22216                    b.Property<string>("ForcedSortName")
 22217                        .HasColumnType("TEXT");
 22218
 22219                    b.Property<string>("Genres")
 22220                        .HasColumnType("TEXT");
 22221
 22222                    b.Property<int?>("Height")
 22223                        .HasColumnType("INTEGER");
 22224
 22225                    b.Property<int?>("IndexNumber")
 22226                        .HasColumnType("INTEGER");
 22227
 22228                    b.Property<int?>("InheritedParentalRatingSubValue")
 22229                        .HasColumnType("INTEGER");
 22230
 22231                    b.Property<int?>("InheritedParentalRatingValue")
 22232                        .HasColumnType("INTEGER");
 22233
 22234                    b.Property<bool>("IsFolder")
 22235                        .HasColumnType("INTEGER");
 22236
 22237                    b.Property<bool>("IsInMixedFolder")
 22238                        .HasColumnType("INTEGER");
 22239
 22240                    b.Property<bool>("IsLocked")
 22241                        .HasColumnType("INTEGER");
 22242
 22243                    b.Property<bool>("IsMovie")
 22244                        .HasColumnType("INTEGER");
 22245
 22246                    b.Property<bool>("IsRepeat")
 22247                        .HasColumnType("INTEGER");
 22248
 22249                    b.Property<bool>("IsSeries")
 22250                        .HasColumnType("INTEGER");
 22251
 22252                    b.Property<bool>("IsVirtualItem")
 22253                        .HasColumnType("INTEGER");
 22254
 22255                    b.Property<float?>("LUFS")
 22256                        .HasColumnType("REAL");
 22257
 22258                    b.Property<string>("MediaType")
 22259                        .HasColumnType("TEXT");
 22260
 22261                    b.Property<string>("Name")
 22262                        .HasColumnType("TEXT");
 22263
 22264                    b.Property<float?>("NormalizationGain")
 22265                        .HasColumnType("REAL");
 22266
 22267                    b.Property<string>("OfficialRating")
 22268                        .HasColumnType("TEXT");
 22269
 22270                    b.Property<string>("OriginalLanguage")
 22271                        .HasColumnType("TEXT");
 22272
 22273                    b.Property<string>("OriginalTitle")
 22274                        .HasColumnType("TEXT");
 22275
 22276                    b.Property<string>("Overview")
 22277                        .HasColumnType("TEXT");
 22278
 22279                    b.Property<Guid?>("OwnerId")
 22280                        .HasColumnType("TEXT");
 22281
 22282                    b.Property<Guid?>("ParentId")
 22283                        .HasColumnType("TEXT");
 22284
 22285                    b.Property<int?>("ParentIndexNumber")
 22286                        .HasColumnType("INTEGER");
 22287
 22288                    b.Property<string>("Path")
 22289                        .HasColumnType("TEXT");
 22290
 22291                    b.Property<string>("PreferredMetadataCountryCode")
 22292                        .HasColumnType("TEXT");
 22293
 22294                    b.Property<string>("PreferredMetadataLanguage")
 22295                        .HasColumnType("TEXT");
 22296
 22297                    b.Property<DateTime?>("PremiereDate")
 22298                        .HasColumnType("TEXT");
 22299
 22300                    b.Property<string>("PresentationUniqueKey")
 22301                        .HasColumnType("TEXT");
 22302
 22303                    b.Property<string>("PrimaryVersionId")
 22304                        .HasColumnType("TEXT");
 22305
 22306                    b.Property<string>("ProductionLocations")
 22307                        .HasColumnType("TEXT");
 22308
 22309                    b.Property<int?>("ProductionYear")
 22310                        .HasColumnType("INTEGER");
 22311
 22312                    b.Property<long?>("RunTimeTicks")
 22313                        .HasColumnType("INTEGER");
 22314
 22315                    b.Property<Guid?>("SeasonId")
 22316                        .HasColumnType("TEXT");
 22317
 22318                    b.Property<string>("SeasonName")
 22319                        .HasColumnType("TEXT");
 22320
 22321                    b.Property<Guid?>("SeriesId")
 22322                        .HasColumnType("TEXT");
 22323
 22324                    b.Property<string>("SeriesName")
 22325                        .HasColumnType("TEXT");
 22326
 22327                    b.Property<string>("SeriesPresentationUniqueKey")
 22328                        .HasColumnType("TEXT");
 22329
 22330                    b.Property<string>("ShowId")
 22331                        .HasColumnType("TEXT");
 22332
 22333                    b.Property<long?>("Size")
 22334                        .HasColumnType("INTEGER");
 22335
 22336                    b.Property<string>("SortName")
 22337                        .HasColumnType("TEXT");
 22338
 22339                    b.Property<DateTime?>("StartDate")
 22340                        .HasColumnType("TEXT");
 22341
 22342                    b.Property<string>("Studios")
 22343                        .HasColumnType("TEXT");
 22344
 22345                    b.Property<string>("Tagline")
 22346                        .HasColumnType("TEXT");
 22347
 22348                    b.Property<string>("Tags")
 22349                        .HasColumnType("TEXT");
 22350
 22351                    b.Property<Guid?>("TopParentId")
 22352                        .HasColumnType("TEXT");
 22353
 22354                    b.Property<int?>("TotalBitrate")
 22355                        .HasColumnType("INTEGER");
 22356
 22357                    b.Property<string>("Type")
 22358                        .IsRequired()
 22359                        .HasColumnType("TEXT");
 22360
 22361                    b.Property<string>("UnratedType")
 22362                        .HasColumnType("TEXT");
 22363
 22364                    b.Property<int?>("Width")
 22365                        .HasColumnType("INTEGER");
 22366
 22367                    b.HasKey("Id");
 22368
 22369                    b.HasIndex("ExtraType");
 22370
 22371                    b.HasIndex("Name");
 22372
 22373                    b.HasIndex("OwnerId");
 22374
 22375                    b.HasIndex("ParentId");
 22376
 22377                    b.HasIndex("Path");
 22378
 22379                    b.HasIndex("PresentationUniqueKey");
 22380
 22381                    b.HasIndex("ExtraType", "OwnerId");
 22382
 22383                    b.HasIndex("TopParentId", "Id");
 22384
 22385                    b.HasIndex("Type", "TopParentId", "Id");
 22386
 22387                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22388
 22389                    b.HasIndex("Type", "TopParentId", "StartDate");
 22390
 22391                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22392
 22393                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22394
 22395                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22396
 22397                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22398
 22399                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22400
 22401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22402
 22403                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22404
 22405                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22406
 22407                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22408
 22409                    b.ToTable("BaseItems");
 22410
 22411                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22412
 22413                    b.HasData(
 22414                        new
 22415                        {
 22416                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22417                            IsFolder = false,
 22418                            IsInMixedFolder = false,
 22419                            IsLocked = false,
 22420                            IsMovie = false,
 22421                            IsRepeat = false,
 22422                            IsSeries = false,
 22423                            IsVirtualItem = false,
 22424                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22425                            Type = "PLACEHOLDER"
 22426                        });
 22427                });
 428
 22429            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22430                {
 22431                    b.Property<Guid>("Id")
 22432                        .ValueGeneratedOnAdd()
 22433                        .HasColumnType("TEXT");
 22434
 22435                    b.Property<byte[]>("Blurhash")
 22436                        .HasColumnType("BLOB");
 22437
 22438                    b.Property<DateTime?>("DateModified")
 22439                        .HasColumnType("TEXT");
 22440
 22441                    b.Property<int>("Height")
 22442                        .HasColumnType("INTEGER");
 22443
 22444                    b.Property<int>("ImageType")
 22445                        .HasColumnType("INTEGER");
 22446
 22447                    b.Property<Guid>("ItemId")
 22448                        .HasColumnType("TEXT");
 22449
 22450                    b.Property<string>("Path")
 22451                        .IsRequired()
 22452                        .HasColumnType("TEXT");
 22453
 22454                    b.Property<int>("Width")
 22455                        .HasColumnType("INTEGER");
 22456
 22457                    b.HasKey("Id");
 22458
 22459                    b.HasIndex("ItemId");
 22460
 22461                    b.HasIndex("ItemId", "ImageType");
 22462
 22463                    b.ToTable("BaseItemImageInfos");
 22464
 22465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22466                });
 467
 22468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22469                {
 22470                    b.Property<int>("Id")
 22471                        .HasColumnType("INTEGER");
 22472
 22473                    b.Property<Guid>("ItemId")
 22474                        .HasColumnType("TEXT");
 22475
 22476                    b.HasKey("Id", "ItemId");
 22477
 22478                    b.HasIndex("ItemId");
 22479
 22480                    b.ToTable("BaseItemMetadataFields");
 22481
 22482                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22483                });
 484
 22485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22486                {
 22487                    b.Property<Guid>("ItemId")
 22488                        .HasColumnType("TEXT");
 22489
 22490                    b.Property<string>("ProviderId")
 22491                        .HasColumnType("TEXT");
 22492
 22493                    b.Property<string>("ProviderValue")
 22494                        .IsRequired()
 22495                        .HasColumnType("TEXT");
 22496
 22497                    b.HasKey("ItemId", "ProviderId");
 22498
 22499                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22500
 22501                    b.ToTable("BaseItemProviders");
 22502
 22503                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22504                });
 505
 22506            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22507                {
 22508                    b.Property<int>("Id")
 22509                        .HasColumnType("INTEGER");
 22510
 22511                    b.Property<Guid>("ItemId")
 22512                        .HasColumnType("TEXT");
 22513
 22514                    b.HasKey("Id", "ItemId");
 22515
 22516                    b.HasIndex("ItemId");
 22517
 22518                    b.ToTable("BaseItemTrailerTypes");
 22519
 22520                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22521                });
 522
 22523            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22524                {
 22525                    b.Property<Guid>("ItemId")
 22526                        .HasColumnType("TEXT");
 22527
 22528                    b.Property<int>("ChapterIndex")
 22529                        .HasColumnType("INTEGER");
 22530
 22531                    b.Property<DateTime?>("ImageDateModified")
 22532                        .HasColumnType("TEXT");
 22533
 22534                    b.Property<string>("ImagePath")
 22535                        .HasColumnType("TEXT");
 22536
 22537                    b.Property<string>("Name")
 22538                        .HasColumnType("TEXT");
 22539
 22540                    b.Property<long>("StartPositionTicks")
 22541                        .HasColumnType("INTEGER");
 22542
 22543                    b.HasKey("ItemId", "ChapterIndex");
 22544
 22545                    b.ToTable("Chapters");
 22546
 22547                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22548                });
 549
 22550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22551                {
 22552                    b.Property<int>("Id")
 22553                        .ValueGeneratedOnAdd()
 22554                        .HasColumnType("INTEGER");
 22555
 22556                    b.Property<string>("Client")
 22557                        .IsRequired()
 22558                        .HasMaxLength(32)
 22559                        .HasColumnType("TEXT");
 22560
 22561                    b.Property<Guid>("ItemId")
 22562                        .HasColumnType("TEXT");
 22563
 22564                    b.Property<string>("Key")
 22565                        .IsRequired()
 22566                        .HasColumnType("TEXT");
 22567
 22568                    b.Property<Guid>("UserId")
 22569                        .HasColumnType("TEXT");
 22570
 22571                    b.Property<string>("Value")
 22572                        .HasColumnType("TEXT");
 22573
 22574                    b.HasKey("Id");
 22575
 22576                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22577                        .IsUnique();
 22578
 22579                    b.ToTable("CustomItemDisplayPreferences");
 22580
 22581                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22582                });
 583
 22584            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22585                {
 22586                    b.Property<int>("Id")
 22587                        .ValueGeneratedOnAdd()
 22588                        .HasColumnType("INTEGER");
 22589
 22590                    b.Property<int>("ChromecastVersion")
 22591                        .HasColumnType("INTEGER");
 22592
 22593                    b.Property<string>("Client")
 22594                        .IsRequired()
 22595                        .HasMaxLength(32)
 22596                        .HasColumnType("TEXT");
 22597
 22598                    b.Property<string>("DashboardTheme")
 22599                        .HasMaxLength(32)
 22600                        .HasColumnType("TEXT");
 22601
 22602                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22603                        .HasColumnType("INTEGER");
 22604
 22605                    b.Property<int?>("IndexBy")
 22606                        .HasColumnType("INTEGER");
 22607
 22608                    b.Property<Guid>("ItemId")
 22609                        .HasColumnType("TEXT");
 22610
 22611                    b.Property<int>("ScrollDirection")
 22612                        .HasColumnType("INTEGER");
 22613
 22614                    b.Property<bool>("ShowBackdrop")
 22615                        .HasColumnType("INTEGER");
 22616
 22617                    b.Property<bool>("ShowSidebar")
 22618                        .HasColumnType("INTEGER");
 22619
 22620                    b.Property<int>("SkipBackwardLength")
 22621                        .HasColumnType("INTEGER");
 22622
 22623                    b.Property<int>("SkipForwardLength")
 22624                        .HasColumnType("INTEGER");
 22625
 22626                    b.Property<string>("TvHome")
 22627                        .HasMaxLength(32)
 22628                        .HasColumnType("TEXT");
 22629
 22630                    b.Property<Guid>("UserId")
 22631                        .HasColumnType("TEXT");
 22632
 22633                    b.HasKey("Id");
 22634
 22635                    b.HasIndex("UserId", "ItemId", "Client")
 22636                        .IsUnique();
 22637
 22638                    b.ToTable("DisplayPreferences");
 22639
 22640                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22641                });
 642
 22643            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22644                {
 22645                    b.Property<int>("Id")
 22646                        .ValueGeneratedOnAdd()
 22647                        .HasColumnType("INTEGER");
 22648
 22649                    b.Property<int>("DisplayPreferencesId")
 22650                        .HasColumnType("INTEGER");
 22651
 22652                    b.Property<int>("Order")
 22653                        .HasColumnType("INTEGER");
 22654
 22655                    b.Property<int>("Type")
 22656                        .HasColumnType("INTEGER");
 22657
 22658                    b.HasKey("Id");
 22659
 22660                    b.HasIndex("DisplayPreferencesId");
 22661
 22662                    b.ToTable("HomeSection");
 22663
 22664                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22665                });
 666
 22667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22668                {
 22669                    b.Property<int>("Id")
 22670                        .ValueGeneratedOnAdd()
 22671                        .HasColumnType("INTEGER");
 22672
 22673                    b.Property<DateTime>("LastModified")
 22674                        .HasColumnType("TEXT");
 22675
 22676                    b.Property<string>("Path")
 22677                        .IsRequired()
 22678                        .HasMaxLength(512)
 22679                        .HasColumnType("TEXT");
 22680
 22681                    b.Property<Guid?>("UserId")
 22682                        .HasColumnType("TEXT");
 22683
 22684                    b.HasKey("Id");
 22685
 22686                    b.HasIndex("UserId")
 22687                        .IsUnique();
 22688
 22689                    b.ToTable("ImageInfos");
 22690
 22691                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22692                });
 693
 22694            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22695                {
 22696                    b.Property<int>("Id")
 22697                        .ValueGeneratedOnAdd()
 22698                        .HasColumnType("INTEGER");
 22699
 22700                    b.Property<string>("Client")
 22701                        .IsRequired()
 22702                        .HasMaxLength(32)
 22703                        .HasColumnType("TEXT");
 22704
 22705                    b.Property<int?>("IndexBy")
 22706                        .HasColumnType("INTEGER");
 22707
 22708                    b.Property<Guid>("ItemId")
 22709                        .HasColumnType("TEXT");
 22710
 22711                    b.Property<bool>("RememberIndexing")
 22712                        .HasColumnType("INTEGER");
 22713
 22714                    b.Property<bool>("RememberSorting")
 22715                        .HasColumnType("INTEGER");
 22716
 22717                    b.Property<string>("SortBy")
 22718                        .IsRequired()
 22719                        .HasMaxLength(64)
 22720                        .HasColumnType("TEXT");
 22721
 22722                    b.Property<int>("SortOrder")
 22723                        .HasColumnType("INTEGER");
 22724
 22725                    b.Property<Guid>("UserId")
 22726                        .HasColumnType("TEXT");
 22727
 22728                    b.Property<int>("ViewType")
 22729                        .HasColumnType("INTEGER");
 22730
 22731                    b.HasKey("Id");
 22732
 22733                    b.HasIndex("UserId");
 22734
 22735                    b.ToTable("ItemDisplayPreferences");
 22736
 22737                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22738                });
 739
 22740            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22741                {
 22742                    b.Property<Guid>("ItemValueId")
 22743                        .ValueGeneratedOnAdd()
 22744                        .HasColumnType("TEXT");
 22745
 22746                    b.Property<string>("CleanValue")
 22747                        .IsRequired()
 22748                        .HasColumnType("TEXT");
 22749
 22750                    b.Property<int>("Type")
 22751                        .HasColumnType("INTEGER");
 22752
 22753                    b.Property<string>("Value")
 22754                        .IsRequired()
 22755                        .HasColumnType("TEXT");
 22756
 22757                    b.HasKey("ItemValueId");
 22758
 22759                    b.HasIndex("Type", "CleanValue");
 22760
 22761                    b.HasIndex("Type", "Value")
 22762                        .IsUnique();
 22763
 22764                    b.ToTable("ItemValues");
 22765
 22766                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22767                });
 768
 22769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22770                {
 22771                    b.Property<Guid>("ItemValueId")
 22772                        .HasColumnType("TEXT");
 22773
 22774                    b.Property<Guid>("ItemId")
 22775                        .HasColumnType("TEXT");
 22776
 22777                    b.HasKey("ItemValueId", "ItemId");
 22778
 22779                    b.HasIndex("ItemId");
 22780
 22781                    b.ToTable("ItemValuesMap");
 22782
 22783                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22784                });
 785
 22786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22787                {
 22788                    b.Property<Guid>("ItemId")
 22789                        .HasColumnType("TEXT");
 22790
 22791                    b.PrimitiveCollection<string>("KeyframeTicks")
 22792                        .HasColumnType("TEXT");
 22793
 22794                    b.Property<long>("TotalDuration")
 22795                        .HasColumnType("INTEGER");
 22796
 22797                    b.HasKey("ItemId");
 22798
 22799                    b.ToTable("KeyframeData");
 22800
 22801                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22802                });
 803
 22804            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22805                {
 22806                    b.Property<Guid>("ParentId")
 22807                        .HasColumnType("TEXT");
 22808
 22809                    b.Property<Guid>("ChildId")
 22810                        .HasColumnType("TEXT");
 22811
 22812                    b.Property<int>("ChildType")
 22813                        .HasColumnType("INTEGER");
 22814
 22815                    b.Property<int?>("SortOrder")
 22816                        .HasColumnType("INTEGER");
 22817
 22818                    b.HasKey("ParentId", "ChildId");
 22819
 22820                    b.HasIndex("ChildId");
 22821
 22822                    b.HasIndex("ParentId");
 22823
 22824                    b.HasIndex("ChildId", "ChildType");
 22825
 22826                    b.HasIndex("ParentId", "ChildType");
 22827
 22828                    b.HasIndex("ParentId", "SortOrder");
 22829
 22830                    b.ToTable("LinkedChildren", (string)null);
 22831
 22832                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22833                });
 834
 22835            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22836                {
 22837                    b.Property<Guid>("Id")
 22838                        .ValueGeneratedOnAdd()
 22839                        .HasColumnType("TEXT");
 22840
 22841                    b.Property<long>("EndTicks")
 22842                        .HasColumnType("INTEGER");
 22843
 22844                    b.Property<Guid>("ItemId")
 22845                        .HasColumnType("TEXT");
 22846
 22847                    b.Property<string>("SegmentProviderId")
 22848                        .IsRequired()
 22849                        .HasColumnType("TEXT");
 22850
 22851                    b.Property<long>("StartTicks")
 22852                        .HasColumnType("INTEGER");
 22853
 22854                    b.Property<int>("Type")
 22855                        .HasColumnType("INTEGER");
 22856
 22857                    b.HasKey("Id");
 22858
 22859                    b.ToTable("MediaSegments");
 22860
 22861                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22862                });
 863
 22864            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22865                {
 22866                    b.Property<Guid>("ItemId")
 22867                        .HasColumnType("TEXT");
 22868
 22869                    b.Property<int>("StreamIndex")
 22870                        .HasColumnType("INTEGER");
 22871
 22872                    b.Property<string>("AspectRatio")
 22873                        .HasColumnType("TEXT");
 22874
 22875                    b.Property<float?>("AverageFrameRate")
 22876                        .HasColumnType("REAL");
 22877
 22878                    b.Property<int?>("BitDepth")
 22879                        .HasColumnType("INTEGER");
 22880
 22881                    b.Property<int?>("BitRate")
 22882                        .HasColumnType("INTEGER");
 22883
 22884                    b.Property<int?>("BlPresentFlag")
 22885                        .HasColumnType("INTEGER");
 22886
 22887                    b.Property<string>("ChannelLayout")
 22888                        .HasColumnType("TEXT");
 22889
 22890                    b.Property<int?>("Channels")
 22891                        .HasColumnType("INTEGER");
 22892
 22893                    b.Property<string>("Codec")
 22894                        .HasColumnType("TEXT");
 22895
 22896                    b.Property<string>("CodecTag")
 22897                        .HasColumnType("TEXT");
 22898
 22899                    b.Property<string>("CodecTimeBase")
 22900                        .HasColumnType("TEXT");
 22901
 22902                    b.Property<string>("ColorPrimaries")
 22903                        .HasColumnType("TEXT");
 22904
 22905                    b.Property<string>("ColorSpace")
 22906                        .HasColumnType("TEXT");
 22907
 22908                    b.Property<string>("ColorTransfer")
 22909                        .HasColumnType("TEXT");
 22910
 22911                    b.Property<string>("Comment")
 22912                        .HasColumnType("TEXT");
 22913
 22914                    b.Property<int?>("DvBlSignalCompatibilityId")
 22915                        .HasColumnType("INTEGER");
 22916
 22917                    b.Property<int?>("DvLevel")
 22918                        .HasColumnType("INTEGER");
 22919
 22920                    b.Property<int?>("DvProfile")
 22921                        .HasColumnType("INTEGER");
 22922
 22923                    b.Property<int?>("DvVersionMajor")
 22924                        .HasColumnType("INTEGER");
 22925
 22926                    b.Property<int?>("DvVersionMinor")
 22927                        .HasColumnType("INTEGER");
 22928
 22929                    b.Property<int?>("ElPresentFlag")
 22930                        .HasColumnType("INTEGER");
 22931
 22932                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22933                        .HasColumnType("INTEGER");
 22934
 22935                    b.Property<int?>("Height")
 22936                        .HasColumnType("INTEGER");
 22937
 22938                    b.Property<bool?>("IsAnamorphic")
 22939                        .HasColumnType("INTEGER");
 22940
 22941                    b.Property<bool?>("IsAvc")
 22942                        .HasColumnType("INTEGER");
 22943
 22944                    b.Property<bool>("IsDefault")
 22945                        .HasColumnType("INTEGER");
 22946
 22947                    b.Property<bool>("IsExternal")
 22948                        .HasColumnType("INTEGER");
 22949
 22950                    b.Property<bool>("IsForced")
 22951                        .HasColumnType("INTEGER");
 22952
 22953                    b.Property<bool?>("IsHearingImpaired")
 22954                        .HasColumnType("INTEGER");
 22955
 22956                    b.Property<bool?>("IsInterlaced")
 22957                        .HasColumnType("INTEGER");
 22958
 22959                    b.Property<bool>("IsOriginal")
 22960                        .HasColumnType("INTEGER");
 22961
 22962                    b.Property<string>("KeyFrames")
 22963                        .HasColumnType("TEXT");
 22964
 22965                    b.Property<string>("Language")
 22966                        .HasColumnType("TEXT");
 22967
 22968                    b.Property<float?>("Level")
 22969                        .HasColumnType("REAL");
 22970
 22971                    b.Property<string>("NalLengthSize")
 22972                        .HasColumnType("TEXT");
 22973
 22974                    b.Property<string>("Path")
 22975                        .HasColumnType("TEXT");
 22976
 22977                    b.Property<string>("PixelFormat")
 22978                        .HasColumnType("TEXT");
 22979
 22980                    b.Property<string>("Profile")
 22981                        .HasColumnType("TEXT");
 22982
 22983                    b.Property<float?>("RealFrameRate")
 22984                        .HasColumnType("REAL");
 22985
 22986                    b.Property<int?>("RefFrames")
 22987                        .HasColumnType("INTEGER");
 22988
 22989                    b.Property<int?>("Rotation")
 22990                        .HasColumnType("INTEGER");
 22991
 22992                    b.Property<int?>("RpuPresentFlag")
 22993                        .HasColumnType("INTEGER");
 22994
 22995                    b.Property<int?>("SampleRate")
 22996                        .HasColumnType("INTEGER");
 22997
 22998                    b.Property<int>("StreamType")
 22999                        .HasColumnType("INTEGER");
 221000
 221001                    b.Property<string>("TimeBase")
 221002                        .HasColumnType("TEXT");
 221003
 221004                    b.Property<string>("Title")
 221005                        .HasColumnType("TEXT");
 221006
 221007                    b.Property<int?>("Width")
 221008                        .HasColumnType("INTEGER");
 221009
 221010                    b.HasKey("ItemId", "StreamIndex");
 221011
 221012                    b.HasIndex("StreamIndex");
 221013
 221014                    b.HasIndex("StreamType");
 221015
 221016                    b.HasIndex("StreamIndex", "StreamType");
 221017
 221018                    b.HasIndex("StreamIndex", "StreamType", "Language");
 221019
 221020                    b.ToTable("MediaStreamInfos");
 221021
 221022                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221023                });
 1024
 221025            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221026                {
 221027                    b.Property<Guid>("Id")
 221028                        .ValueGeneratedOnAdd()
 221029                        .HasColumnType("TEXT");
 221030
 221031                    b.Property<string>("Name")
 221032                        .IsRequired()
 221033                        .HasColumnType("TEXT");
 221034
 221035                    b.Property<string>("PersonType")
 221036                        .HasColumnType("TEXT");
 221037
 221038                    b.HasKey("Id");
 221039
 221040                    b.HasIndex("Name");
 221041
 221042                    b.ToTable("Peoples");
 221043
 221044                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221045                });
 1046
 221047            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221048                {
 221049                    b.Property<Guid>("ItemId")
 221050                        .HasColumnType("TEXT");
 221051
 221052                    b.Property<Guid>("PeopleId")
 221053                        .HasColumnType("TEXT");
 221054
 221055                    b.Property<string>("Role")
 221056                        .HasColumnType("TEXT");
 221057
 221058                    b.Property<int?>("ListOrder")
 221059                        .HasColumnType("INTEGER");
 221060
 221061                    b.Property<int?>("SortOrder")
 221062                        .HasColumnType("INTEGER");
 221063
 221064                    b.HasKey("ItemId", "PeopleId", "Role");
 221065
 221066                    b.HasIndex("PeopleId");
 221067
 221068                    b.HasIndex("ItemId", "ListOrder");
 221069
 221070                    b.HasIndex("ItemId", "SortOrder");
 221071
 221072                    b.ToTable("PeopleBaseItemMap");
 221073
 221074                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221075                });
 1076
 221077            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221078                {
 221079                    b.Property<int>("Id")
 221080                        .ValueGeneratedOnAdd()
 221081                        .HasColumnType("INTEGER");
 221082
 221083                    b.Property<int>("Kind")
 221084                        .HasColumnType("INTEGER");
 221085
 221086                    b.Property<Guid?>("Permission_Permissions_Guid")
 221087                        .HasColumnType("TEXT");
 221088
 221089                    b.Property<uint>("RowVersion")
 221090                        .IsConcurrencyToken()
 221091                        .HasColumnType("INTEGER");
 221092
 221093                    b.Property<Guid?>("UserId")
 221094                        .HasColumnType("TEXT");
 221095
 221096                    b.Property<bool>("Value")
 221097                        .HasColumnType("INTEGER");
 221098
 221099                    b.HasKey("Id");
 221100
 221101                    b.HasIndex("UserId", "Kind")
 221102                        .IsUnique()
 221103                        .HasFilter("[UserId] IS NOT NULL");
 221104
 221105                    b.ToTable("Permissions");
 221106
 221107                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221108                });
 1109
 221110            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221111                {
 221112                    b.Property<int>("Id")
 221113                        .ValueGeneratedOnAdd()
 221114                        .HasColumnType("INTEGER");
 221115
 221116                    b.Property<int>("Kind")
 221117                        .HasColumnType("INTEGER");
 221118
 221119                    b.Property<Guid?>("Preference_Preferences_Guid")
 221120                        .HasColumnType("TEXT");
 221121
 221122                    b.Property<uint>("RowVersion")
 221123                        .IsConcurrencyToken()
 221124                        .HasColumnType("INTEGER");
 221125
 221126                    b.Property<Guid?>("UserId")
 221127                        .HasColumnType("TEXT");
 221128
 221129                    b.Property<string>("Value")
 221130                        .IsRequired()
 221131                        .HasMaxLength(65535)
 221132                        .HasColumnType("TEXT");
 221133
 221134                    b.HasKey("Id");
 221135
 221136                    b.HasIndex("UserId", "Kind")
 221137                        .IsUnique()
 221138                        .HasFilter("[UserId] IS NOT NULL");
 221139
 221140                    b.ToTable("Preferences");
 221141
 221142                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221143                });
 1144
 221145            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221146                {
 221147                    b.Property<int>("Id")
 221148                        .ValueGeneratedOnAdd()
 221149                        .HasColumnType("INTEGER");
 221150
 221151                    b.Property<string>("AccessToken")
 221152                        .IsRequired()
 221153                        .HasColumnType("TEXT");
 221154
 221155                    b.Property<DateTime>("DateCreated")
 221156                        .HasColumnType("TEXT");
 221157
 221158                    b.Property<DateTime>("DateLastActivity")
 221159                        .HasColumnType("TEXT");
 221160
 221161                    b.Property<string>("Name")
 221162                        .IsRequired()
 221163                        .HasMaxLength(64)
 221164                        .HasColumnType("TEXT");
 221165
 221166                    b.HasKey("Id");
 221167
 221168                    b.HasIndex("AccessToken")
 221169                        .IsUnique();
 221170
 221171                    b.ToTable("ApiKeys");
 221172
 221173                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221174                });
 1175
 221176            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221177                {
 221178                    b.Property<int>("Id")
 221179                        .ValueGeneratedOnAdd()
 221180                        .HasColumnType("INTEGER");
 221181
 221182                    b.Property<string>("AccessToken")
 221183                        .IsRequired()
 221184                        .HasColumnType("TEXT");
 221185
 221186                    b.Property<string>("AppName")
 221187                        .IsRequired()
 221188                        .HasMaxLength(64)
 221189                        .HasColumnType("TEXT");
 221190
 221191                    b.Property<string>("AppVersion")
 221192                        .IsRequired()
 221193                        .HasMaxLength(32)
 221194                        .HasColumnType("TEXT");
 221195
 221196                    b.Property<DateTime>("DateCreated")
 221197                        .HasColumnType("TEXT");
 221198
 221199                    b.Property<DateTime>("DateLastActivity")
 221200                        .HasColumnType("TEXT");
 221201
 221202                    b.Property<DateTime>("DateModified")
 221203                        .HasColumnType("TEXT");
 221204
 221205                    b.Property<string>("DeviceId")
 221206                        .IsRequired()
 221207                        .HasMaxLength(256)
 221208                        .HasColumnType("TEXT");
 221209
 221210                    b.Property<string>("DeviceName")
 221211                        .IsRequired()
 221212                        .HasMaxLength(64)
 221213                        .HasColumnType("TEXT");
 221214
 221215                    b.Property<bool>("IsActive")
 221216                        .HasColumnType("INTEGER");
 221217
 221218                    b.Property<Guid>("UserId")
 221219                        .HasColumnType("TEXT");
 221220
 221221                    b.HasKey("Id");
 221222
 221223                    b.HasIndex("DeviceId");
 221224
 221225                    b.HasIndex("AccessToken", "DateLastActivity");
 221226
 221227                    b.HasIndex("DeviceId", "DateLastActivity");
 221228
 221229                    b.HasIndex("UserId", "DeviceId");
 221230
 221231                    b.ToTable("Devices");
 221232
 221233                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221234                });
 1235
 221236            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221237                {
 221238                    b.Property<int>("Id")
 221239                        .ValueGeneratedOnAdd()
 221240                        .HasColumnType("INTEGER");
 221241
 221242                    b.Property<string>("CustomName")
 221243                        .HasColumnType("TEXT");
 221244
 221245                    b.Property<string>("DeviceId")
 221246                        .IsRequired()
 221247                        .HasColumnType("TEXT");
 221248
 221249                    b.HasKey("Id");
 221250
 221251                    b.HasIndex("DeviceId")
 221252                        .IsUnique();
 221253
 221254                    b.ToTable("DeviceOptions");
 221255
 221256                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221257                });
 1258
 221259            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221260                {
 221261                    b.Property<Guid>("ItemId")
 221262                        .HasColumnType("TEXT");
 221263
 221264                    b.Property<int>("Width")
 221265                        .HasColumnType("INTEGER");
 221266
 221267                    b.Property<int>("Bandwidth")
 221268                        .HasColumnType("INTEGER");
 221269
 221270                    b.Property<int>("Height")
 221271                        .HasColumnType("INTEGER");
 221272
 221273                    b.Property<int>("Interval")
 221274                        .HasColumnType("INTEGER");
 221275
 221276                    b.Property<int>("ThumbnailCount")
 221277                        .HasColumnType("INTEGER");
 221278
 221279                    b.Property<int>("TileHeight")
 221280                        .HasColumnType("INTEGER");
 221281
 221282                    b.Property<int>("TileWidth")
 221283                        .HasColumnType("INTEGER");
 221284
 221285                    b.HasKey("ItemId", "Width");
 221286
 221287                    b.ToTable("TrickplayInfos");
 221288
 221289                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221290                });
 1291
 221292            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221293                {
 221294                    b.Property<Guid>("Id")
 221295                        .ValueGeneratedOnAdd()
 221296                        .HasColumnType("TEXT");
 221297
 221298                    b.Property<string>("AudioLanguagePreference")
 221299                        .HasMaxLength(255)
 221300                        .HasColumnType("TEXT");
 221301
 221302                    b.Property<string>("AuthenticationProviderId")
 221303                        .IsRequired()
 221304                        .HasMaxLength(255)
 221305                        .HasColumnType("TEXT");
 221306
 221307                    b.Property<string>("CastReceiverId")
 221308                        .HasMaxLength(32)
 221309                        .HasColumnType("TEXT");
 221310
 221311                    b.Property<bool>("DisplayCollectionsView")
 221312                        .HasColumnType("INTEGER");
 221313
 221314                    b.Property<bool>("DisplayMissingEpisodes")
 221315                        .HasColumnType("INTEGER");
 221316
 221317                    b.Property<bool>("EnableAutoLogin")
 221318                        .HasColumnType("INTEGER");
 221319
 221320                    b.Property<bool>("EnableLocalPassword")
 221321                        .HasColumnType("INTEGER");
 221322
 221323                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221324                        .HasColumnType("INTEGER");
 221325
 221326                    b.Property<bool>("EnableUserPreferenceAccess")
 221327                        .HasColumnType("INTEGER");
 221328
 221329                    b.Property<bool>("HidePlayedInLatest")
 221330                        .HasColumnType("INTEGER");
 221331
 221332                    b.Property<long>("InternalId")
 221333                        .HasColumnType("INTEGER");
 221334
 221335                    b.Property<int>("InvalidLoginAttemptCount")
 221336                        .HasColumnType("INTEGER");
 221337
 221338                    b.Property<DateTime?>("LastActivityDate")
 221339                        .HasColumnType("TEXT");
 221340
 221341                    b.Property<DateTime?>("LastLoginDate")
 221342                        .HasColumnType("TEXT");
 221343
 221344                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221345                        .HasColumnType("INTEGER");
 221346
 221347                    b.Property<int>("MaxActiveSessions")
 221348                        .HasColumnType("INTEGER");
 221349
 221350                    b.Property<int?>("MaxParentalRatingScore")
 221351                        .HasColumnType("INTEGER");
 221352
 221353                    b.Property<int?>("MaxParentalRatingSubScore")
 221354                        .HasColumnType("INTEGER");
 221355
 221356                    b.Property<bool>("MustUpdatePassword")
 221357                        .HasColumnType("INTEGER");
 221358
 221359                    b.Property<string>("Password")
 221360                        .HasMaxLength(65535)
 221361                        .HasColumnType("TEXT");
 221362
 221363                    b.Property<string>("PasswordResetProviderId")
 221364                        .IsRequired()
 221365                        .HasMaxLength(255)
 221366                        .HasColumnType("TEXT");
 221367
 221368                    b.Property<bool>("PlayDefaultAudioTrack")
 221369                        .HasColumnType("INTEGER");
 221370
 221371                    b.Property<bool>("RememberAudioSelections")
 221372                        .HasColumnType("INTEGER");
 221373
 221374                    b.Property<bool>("RememberSubtitleSelections")
 221375                        .HasColumnType("INTEGER");
 221376
 221377                    b.Property<int?>("RemoteClientBitrateLimit")
 221378                        .HasColumnType("INTEGER");
 221379
 221380                    b.Property<uint>("RowVersion")
 221381                        .IsConcurrencyToken()
 221382                        .HasColumnType("INTEGER");
 221383
 221384                    b.Property<string>("SubtitleLanguagePreference")
 221385                        .HasMaxLength(255)
 221386                        .HasColumnType("TEXT");
 221387
 221388                    b.Property<int>("SubtitleMode")
 221389                        .HasColumnType("INTEGER");
 221390
 221391                    b.Property<int>("SyncPlayAccess")
 221392                        .HasColumnType("INTEGER");
 221393
 221394                    b.Property<string>("Username")
 221395                        .IsRequired()
 221396                        .HasMaxLength(255)
 221397                        .HasColumnType("TEXT");
 221398
 221399                    b.HasKey("Id");
 221400
 221401                    b.HasIndex("Username")
 221402                        .IsUnique();
 221403
 221404                    b.ToTable("Users");
 221405
 221406                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221407                });
 1408
 221409            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221410                {
 221411                    b.Property<Guid>("ItemId")
 221412                        .HasColumnType("TEXT");
 221413
 221414                    b.Property<Guid>("UserId")
 221415                        .HasColumnType("TEXT");
 221416
 221417                    b.Property<string>("CustomDataKey")
 221418                        .HasColumnType("TEXT");
 221419
 221420                    b.Property<int?>("AudioStreamIndex")
 221421                        .HasColumnType("INTEGER");
 221422
 221423                    b.Property<bool>("IsFavorite")
 221424                        .HasColumnType("INTEGER");
 221425
 221426                    b.Property<DateTime?>("LastPlayedDate")
 221427                        .HasColumnType("TEXT");
 221428
 221429                    b.Property<bool?>("Likes")
 221430                        .HasColumnType("INTEGER");
 221431
 221432                    b.Property<int>("PlayCount")
 221433                        .HasColumnType("INTEGER");
 221434
 221435                    b.Property<long>("PlaybackPositionTicks")
 221436                        .HasColumnType("INTEGER");
 221437
 221438                    b.Property<bool>("Played")
 221439                        .HasColumnType("INTEGER");
 221440
 221441                    b.Property<double?>("Rating")
 221442                        .HasColumnType("REAL");
 221443
 221444                    b.Property<DateTime?>("RetentionDate")
 221445                        .HasColumnType("TEXT");
 221446
 221447                    b.Property<int?>("SubtitleStreamIndex")
 221448                        .HasColumnType("INTEGER");
 221449
 221450                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221451
 221452                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221453
 221454                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221455
 221456                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221457
 221458                    b.HasIndex("ItemId", "UserId", "Played");
 221459
 221460                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 221461
 221462                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 221463
 221464                    b.HasIndex("UserId", "Played", "ItemId");
 221465
 221466                    b.ToTable("UserData");
 221467
 221468                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221469                });
 1470
 221471            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221472                {
 221473                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221474                        .WithMany("AccessSchedules")
 221475                        .HasForeignKey("UserId")
 221476                        .OnDelete(DeleteBehavior.Cascade)
 221477                        .IsRequired();
 221478                });
 1479
 221480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221481                {
 221482                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221483                        .WithMany("Parents")
 221484                        .HasForeignKey("ItemId")
 221485                        .OnDelete(DeleteBehavior.Cascade)
 221486                        .IsRequired();
 221487
 221488                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221489                        .WithMany("Children")
 221490                        .HasForeignKey("ParentItemId")
 221491                        .OnDelete(DeleteBehavior.Cascade)
 221492                        .IsRequired();
 221493
 221494                    b.Navigation("Item");
 221495
 221496                    b.Navigation("ParentItem");
 221497                });
 1498
 221499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221500                {
 221501                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221502                        .WithMany()
 221503                        .HasForeignKey("ItemId")
 221504                        .OnDelete(DeleteBehavior.Cascade)
 221505                        .IsRequired();
 221506
 221507                    b.Navigation("Item");
 221508                });
 1509
 221510            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221511                {
 221512                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221513                        .WithMany("Extras")
 221514                        .HasForeignKey("OwnerId")
 221515                        .OnDelete(DeleteBehavior.NoAction);
 221516
 221517                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221518                        .WithMany("DirectChildren")
 221519                        .HasForeignKey("ParentId")
 221520                        .OnDelete(DeleteBehavior.Cascade);
 221521
 221522                    b.Navigation("DirectParent");
 221523
 221524                    b.Navigation("Owner");
 221525                });
 1526
 221527            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221528                {
 221529                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221530                        .WithMany("Images")
 221531                        .HasForeignKey("ItemId")
 221532                        .OnDelete(DeleteBehavior.Cascade)
 221533                        .IsRequired();
 221534
 221535                    b.Navigation("Item");
 221536                });
 1537
 221538            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221539                {
 221540                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221541                        .WithMany("LockedFields")
 221542                        .HasForeignKey("ItemId")
 221543                        .OnDelete(DeleteBehavior.Cascade)
 221544                        .IsRequired();
 221545
 221546                    b.Navigation("Item");
 221547                });
 1548
 221549            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221550                {
 221551                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221552                        .WithMany("Provider")
 221553                        .HasForeignKey("ItemId")
 221554                        .OnDelete(DeleteBehavior.Cascade)
 221555                        .IsRequired();
 221556
 221557                    b.Navigation("Item");
 221558                });
 1559
 221560            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221561                {
 221562                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221563                        .WithMany("TrailerTypes")
 221564                        .HasForeignKey("ItemId")
 221565                        .OnDelete(DeleteBehavior.Cascade)
 221566                        .IsRequired();
 221567
 221568                    b.Navigation("Item");
 221569                });
 1570
 221571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221572                {
 221573                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221574                        .WithMany("Chapters")
 221575                        .HasForeignKey("ItemId")
 221576                        .OnDelete(DeleteBehavior.Cascade)
 221577                        .IsRequired();
 221578
 221579                    b.Navigation("Item");
 221580                });
 1581
 221582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221583                {
 221584                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221585                        .WithMany("DisplayPreferences")
 221586                        .HasForeignKey("UserId")
 221587                        .OnDelete(DeleteBehavior.Cascade)
 221588                        .IsRequired();
 221589                });
 1590
 221591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221592                {
 221593                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221594                        .WithMany("HomeSections")
 221595                        .HasForeignKey("DisplayPreferencesId")
 221596                        .OnDelete(DeleteBehavior.Cascade)
 221597                        .IsRequired();
 221598                });
 1599
 221600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221601                {
 221602                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221603                        .WithOne("ProfileImage")
 221604                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221605                        .OnDelete(DeleteBehavior.Cascade);
 221606                });
 1607
 221608            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221609                {
 221610                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221611                        .WithMany("ItemDisplayPreferences")
 221612                        .HasForeignKey("UserId")
 221613                        .OnDelete(DeleteBehavior.Cascade)
 221614                        .IsRequired();
 221615                });
 1616
 221617            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221618                {
 221619                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221620                        .WithMany("ItemValues")
 221621                        .HasForeignKey("ItemId")
 221622                        .OnDelete(DeleteBehavior.Cascade)
 221623                        .IsRequired();
 221624
 221625                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221626                        .WithMany("BaseItemsMap")
 221627                        .HasForeignKey("ItemValueId")
 221628                        .OnDelete(DeleteBehavior.Cascade)
 221629                        .IsRequired();
 221630
 221631                    b.Navigation("Item");
 221632
 221633                    b.Navigation("ItemValue");
 221634                });
 1635
 221636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221637                {
 221638                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221639                        .WithMany()
 221640                        .HasForeignKey("ItemId")
 221641                        .OnDelete(DeleteBehavior.Cascade)
 221642                        .IsRequired();
 221643
 221644                    b.Navigation("Item");
 221645                });
 1646
 221647            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221648                {
 221649                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221650                        .WithMany("LinkedChildOfEntities")
 221651                        .HasForeignKey("ChildId")
 221652                        .OnDelete(DeleteBehavior.NoAction)
 221653                        .IsRequired();
 221654
 221655                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221656                        .WithMany("LinkedChildEntities")
 221657                        .HasForeignKey("ParentId")
 221658                        .OnDelete(DeleteBehavior.NoAction)
 221659                        .IsRequired();
 221660
 221661                    b.Navigation("Child");
 221662
 221663                    b.Navigation("Parent");
 221664                });
 1665
 221666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221667                {
 221668                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221669                        .WithMany("MediaStreams")
 221670                        .HasForeignKey("ItemId")
 221671                        .OnDelete(DeleteBehavior.Cascade)
 221672                        .IsRequired();
 221673
 221674                    b.Navigation("Item");
 221675                });
 1676
 221677            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221678                {
 221679                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221680                        .WithMany("Peoples")
 221681                        .HasForeignKey("ItemId")
 221682                        .OnDelete(DeleteBehavior.Cascade)
 221683                        .IsRequired();
 221684
 221685                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221686                        .WithMany("BaseItems")
 221687                        .HasForeignKey("PeopleId")
 221688                        .OnDelete(DeleteBehavior.Cascade)
 221689                        .IsRequired();
 221690
 221691                    b.Navigation("Item");
 221692
 221693                    b.Navigation("People");
 221694                });
 1695
 221696            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221697                {
 221698                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221699                        .WithMany("Permissions")
 221700                        .HasForeignKey("UserId")
 221701                        .OnDelete(DeleteBehavior.Cascade);
 221702                });
 1703
 221704            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221705                {
 221706                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221707                        .WithMany("Preferences")
 221708                        .HasForeignKey("UserId")
 221709                        .OnDelete(DeleteBehavior.Cascade);
 221710                });
 1711
 221712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221713                {
 221714                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221715                        .WithMany()
 221716                        .HasForeignKey("UserId")
 221717                        .OnDelete(DeleteBehavior.Cascade)
 221718                        .IsRequired();
 221719
 221720                    b.Navigation("User");
 221721                });
 1722
 221723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221724                {
 221725                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221726                        .WithMany("UserData")
 221727                        .HasForeignKey("ItemId")
 221728                        .OnDelete(DeleteBehavior.Cascade)
 221729                        .IsRequired();
 221730
 221731                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221732                        .WithMany()
 221733                        .HasForeignKey("UserId")
 221734                        .OnDelete(DeleteBehavior.Cascade)
 221735                        .IsRequired();
 221736
 221737                    b.Navigation("Item");
 221738
 221739                    b.Navigation("User");
 221740                });
 1741
 221742            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221743                {
 221744                    b.Navigation("Chapters");
 221745
 221746                    b.Navigation("Children");
 221747
 221748                    b.Navigation("DirectChildren");
 221749
 221750                    b.Navigation("Extras");
 221751
 221752                    b.Navigation("Images");
 221753
 221754                    b.Navigation("ItemValues");
 221755
 221756                    b.Navigation("LinkedChildEntities");
 221757
 221758                    b.Navigation("LinkedChildOfEntities");
 221759
 221760                    b.Navigation("LockedFields");
 221761
 221762                    b.Navigation("MediaStreams");
 221763
 221764                    b.Navigation("Parents");
 221765
 221766                    b.Navigation("Peoples");
 221767
 221768                    b.Navigation("Provider");
 221769
 221770                    b.Navigation("TrailerTypes");
 221771
 221772                    b.Navigation("UserData");
 221773                });
 1774
 221775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221776                {
 221777                    b.Navigation("HomeSections");
 221778                });
 1779
 221780            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221781                {
 221782                    b.Navigation("BaseItemsMap");
 221783                });
 1784
 221785            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221786                {
 221787                    b.Navigation("BaseItems");
 221788                });
 1789
 221790            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221791                {
 221792                    b.Navigation("AccessSchedules");
 221793
 221794                    b.Navigation("DisplayPreferences");
 221795
 221796                    b.Navigation("ItemDisplayPreferences");
 221797
 221798                    b.Navigation("Permissions");
 221799
 221800                    b.Navigation("Preferences");
 221801
 221802                    b.Navigation("ProfileImage");
 221803                });
 1804#pragma warning restore 612, 618
 221805        }
 1806    }
 1807}