< Summary - Jellyfin

Line coverage
99%
Covered lines: 1727
Uncovered lines: 4
Coverable lines: 1731
Total lines: 1830
Line coverage: 99.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 5/8/2026 - 12:15:13 AM Line coverage: 99.7% (1721/1725) Total lines: 18245/22/2026 - 12:15:17 AM Line coverage: 99.7% (1724/1728) Total lines: 18278/11/2026 - 12:17:00 AM Line coverage: 99.7% (1727/1731) Total lines: 1830

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/20260504075755_AddPartialIndexForItemCounts.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 AddPartialIndexForItemCounts : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.CreateIndex(
 2214                name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
 2215                table: "BaseItems",
 2216                columns: new[] { "TopParentId", "Type", "IsVirtualItem" },
 2217                filter: "\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)");
 2218        }
 19
 20        /// <inheritdoc />
 21        protected override void Down(MigrationBuilder migrationBuilder)
 22        {
 023            migrationBuilder.DropIndex(
 024                name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
 025                table: "BaseItems");
 026        }
 27    }
 28}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260504075755_AddPartialIndexForItemCounts.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("20260504075755_AddPartialIndexForItemCounts")]
 15    partial class AddPartialIndexForItemCounts
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
 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<Guid?>("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("Name");
 22370
 22371                    b.HasIndex("OwnerId");
 22372
 22373                    b.HasIndex("ParentId");
 22374
 22375                    b.HasIndex("Path");
 22376
 22377                    b.HasIndex("PresentationUniqueKey");
 22378
 22379                    b.HasIndex("SeasonId");
 22380
 22381                    b.HasIndex("SeriesId");
 22382
 22383                    b.HasIndex("SeriesName");
 22384
 22385                    b.HasIndex("ExtraType", "OwnerId");
 22386
 22387                    b.HasIndex("TopParentId", "Id");
 22388
 22389                    b.HasIndex("Type", "CleanName");
 22390
 22391                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 22392                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 22393
 22394                    b.HasIndex("Type", "TopParentId", "Id");
 22395
 22396                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22397
 22398                    b.HasIndex("Type", "TopParentId", "SortName");
 22399
 22400                    b.HasIndex("Type", "TopParentId", "StartDate");
 22401
 22402                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22403
 22404                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22405
 22406                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22407
 22408                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22409
 22410                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22411
 22412                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 22413
 22414                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22415
 22416                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22417
 22418                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22419
 22420                    b.ToTable("BaseItems");
 22421
 22422                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22423
 22424                    b.HasData(
 22425                        new
 22426                        {
 22427                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22428                            IsFolder = false,
 22429                            IsInMixedFolder = false,
 22430                            IsLocked = false,
 22431                            IsMovie = false,
 22432                            IsRepeat = false,
 22433                            IsSeries = false,
 22434                            IsVirtualItem = false,
 22435                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22436                            Type = "PLACEHOLDER"
 22437                        });
 22438                });
 439
 22440            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22441                {
 22442                    b.Property<Guid>("Id")
 22443                        .ValueGeneratedOnAdd()
 22444                        .HasColumnType("TEXT");
 22445
 22446                    b.Property<byte[]>("Blurhash")
 22447                        .HasColumnType("BLOB");
 22448
 22449                    b.Property<DateTime?>("DateModified")
 22450                        .HasColumnType("TEXT");
 22451
 22452                    b.Property<int>("Height")
 22453                        .HasColumnType("INTEGER");
 22454
 22455                    b.Property<int>("ImageType")
 22456                        .HasColumnType("INTEGER");
 22457
 22458                    b.Property<Guid>("ItemId")
 22459                        .HasColumnType("TEXT");
 22460
 22461                    b.Property<string>("Path")
 22462                        .IsRequired()
 22463                        .HasColumnType("TEXT");
 22464
 22465                    b.Property<int>("Width")
 22466                        .HasColumnType("INTEGER");
 22467
 22468                    b.HasKey("Id");
 22469
 22470                    b.HasIndex("ItemId", "ImageType");
 22471
 22472                    b.ToTable("BaseItemImageInfos");
 22473
 22474                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22475                });
 476
 22477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22478                {
 22479                    b.Property<int>("Id")
 22480                        .HasColumnType("INTEGER");
 22481
 22482                    b.Property<Guid>("ItemId")
 22483                        .HasColumnType("TEXT");
 22484
 22485                    b.HasKey("Id", "ItemId");
 22486
 22487                    b.HasIndex("ItemId");
 22488
 22489                    b.ToTable("BaseItemMetadataFields");
 22490
 22491                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22492                });
 493
 22494            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22495                {
 22496                    b.Property<Guid>("ItemId")
 22497                        .HasColumnType("TEXT");
 22498
 22499                    b.Property<string>("ProviderId")
 22500                        .HasColumnType("TEXT");
 22501
 22502                    b.Property<string>("ProviderValue")
 22503                        .IsRequired()
 22504                        .HasColumnType("TEXT");
 22505
 22506                    b.HasKey("ItemId", "ProviderId");
 22507
 22508                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 22509
 22510                    b.ToTable("BaseItemProviders");
 22511
 22512                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22513                });
 514
 22515            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22516                {
 22517                    b.Property<int>("Id")
 22518                        .HasColumnType("INTEGER");
 22519
 22520                    b.Property<Guid>("ItemId")
 22521                        .HasColumnType("TEXT");
 22522
 22523                    b.HasKey("Id", "ItemId");
 22524
 22525                    b.HasIndex("ItemId");
 22526
 22527                    b.ToTable("BaseItemTrailerTypes");
 22528
 22529                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22530                });
 531
 22532            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22533                {
 22534                    b.Property<Guid>("ItemId")
 22535                        .HasColumnType("TEXT");
 22536
 22537                    b.Property<int>("ChapterIndex")
 22538                        .HasColumnType("INTEGER");
 22539
 22540                    b.Property<DateTime?>("ImageDateModified")
 22541                        .HasColumnType("TEXT");
 22542
 22543                    b.Property<string>("ImagePath")
 22544                        .HasColumnType("TEXT");
 22545
 22546                    b.Property<string>("Name")
 22547                        .HasColumnType("TEXT");
 22548
 22549                    b.Property<long>("StartPositionTicks")
 22550                        .HasColumnType("INTEGER");
 22551
 22552                    b.HasKey("ItemId", "ChapterIndex");
 22553
 22554                    b.ToTable("Chapters");
 22555
 22556                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22557                });
 558
 22559            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22560                {
 22561                    b.Property<int>("Id")
 22562                        .ValueGeneratedOnAdd()
 22563                        .HasColumnType("INTEGER");
 22564
 22565                    b.Property<string>("Client")
 22566                        .IsRequired()
 22567                        .HasMaxLength(32)
 22568                        .HasColumnType("TEXT");
 22569
 22570                    b.Property<Guid>("ItemId")
 22571                        .HasColumnType("TEXT");
 22572
 22573                    b.Property<string>("Key")
 22574                        .IsRequired()
 22575                        .HasColumnType("TEXT");
 22576
 22577                    b.Property<Guid>("UserId")
 22578                        .HasColumnType("TEXT");
 22579
 22580                    b.Property<string>("Value")
 22581                        .HasColumnType("TEXT");
 22582
 22583                    b.HasKey("Id");
 22584
 22585                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22586                        .IsUnique();
 22587
 22588                    b.ToTable("CustomItemDisplayPreferences");
 22589
 22590                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22591                });
 592
 22593            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22594                {
 22595                    b.Property<int>("Id")
 22596                        .ValueGeneratedOnAdd()
 22597                        .HasColumnType("INTEGER");
 22598
 22599                    b.Property<int>("ChromecastVersion")
 22600                        .HasColumnType("INTEGER");
 22601
 22602                    b.Property<string>("Client")
 22603                        .IsRequired()
 22604                        .HasMaxLength(32)
 22605                        .HasColumnType("TEXT");
 22606
 22607                    b.Property<string>("DashboardTheme")
 22608                        .HasMaxLength(32)
 22609                        .HasColumnType("TEXT");
 22610
 22611                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22612                        .HasColumnType("INTEGER");
 22613
 22614                    b.Property<int?>("IndexBy")
 22615                        .HasColumnType("INTEGER");
 22616
 22617                    b.Property<Guid>("ItemId")
 22618                        .HasColumnType("TEXT");
 22619
 22620                    b.Property<int>("ScrollDirection")
 22621                        .HasColumnType("INTEGER");
 22622
 22623                    b.Property<bool>("ShowBackdrop")
 22624                        .HasColumnType("INTEGER");
 22625
 22626                    b.Property<bool>("ShowSidebar")
 22627                        .HasColumnType("INTEGER");
 22628
 22629                    b.Property<int>("SkipBackwardLength")
 22630                        .HasColumnType("INTEGER");
 22631
 22632                    b.Property<int>("SkipForwardLength")
 22633                        .HasColumnType("INTEGER");
 22634
 22635                    b.Property<string>("TvHome")
 22636                        .HasMaxLength(32)
 22637                        .HasColumnType("TEXT");
 22638
 22639                    b.Property<Guid>("UserId")
 22640                        .HasColumnType("TEXT");
 22641
 22642                    b.HasKey("Id");
 22643
 22644                    b.HasIndex("UserId", "ItemId", "Client")
 22645                        .IsUnique();
 22646
 22647                    b.ToTable("DisplayPreferences");
 22648
 22649                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22650                });
 651
 22652            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22653                {
 22654                    b.Property<int>("Id")
 22655                        .ValueGeneratedOnAdd()
 22656                        .HasColumnType("INTEGER");
 22657
 22658                    b.Property<int>("DisplayPreferencesId")
 22659                        .HasColumnType("INTEGER");
 22660
 22661                    b.Property<int>("Order")
 22662                        .HasColumnType("INTEGER");
 22663
 22664                    b.Property<int>("Type")
 22665                        .HasColumnType("INTEGER");
 22666
 22667                    b.HasKey("Id");
 22668
 22669                    b.HasIndex("DisplayPreferencesId");
 22670
 22671                    b.ToTable("HomeSection");
 22672
 22673                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22674                });
 675
 22676            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22677                {
 22678                    b.Property<int>("Id")
 22679                        .ValueGeneratedOnAdd()
 22680                        .HasColumnType("INTEGER");
 22681
 22682                    b.Property<DateTime>("LastModified")
 22683                        .HasColumnType("TEXT");
 22684
 22685                    b.Property<string>("Path")
 22686                        .IsRequired()
 22687                        .HasMaxLength(512)
 22688                        .HasColumnType("TEXT");
 22689
 22690                    b.Property<Guid?>("UserId")
 22691                        .HasColumnType("TEXT");
 22692
 22693                    b.HasKey("Id");
 22694
 22695                    b.HasIndex("UserId")
 22696                        .IsUnique();
 22697
 22698                    b.ToTable("ImageInfos");
 22699
 22700                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22701                });
 702
 22703            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22704                {
 22705                    b.Property<int>("Id")
 22706                        .ValueGeneratedOnAdd()
 22707                        .HasColumnType("INTEGER");
 22708
 22709                    b.Property<string>("Client")
 22710                        .IsRequired()
 22711                        .HasMaxLength(32)
 22712                        .HasColumnType("TEXT");
 22713
 22714                    b.Property<int?>("IndexBy")
 22715                        .HasColumnType("INTEGER");
 22716
 22717                    b.Property<Guid>("ItemId")
 22718                        .HasColumnType("TEXT");
 22719
 22720                    b.Property<bool>("RememberIndexing")
 22721                        .HasColumnType("INTEGER");
 22722
 22723                    b.Property<bool>("RememberSorting")
 22724                        .HasColumnType("INTEGER");
 22725
 22726                    b.Property<string>("SortBy")
 22727                        .IsRequired()
 22728                        .HasMaxLength(64)
 22729                        .HasColumnType("TEXT");
 22730
 22731                    b.Property<int>("SortOrder")
 22732                        .HasColumnType("INTEGER");
 22733
 22734                    b.Property<Guid>("UserId")
 22735                        .HasColumnType("TEXT");
 22736
 22737                    b.Property<int>("ViewType")
 22738                        .HasColumnType("INTEGER");
 22739
 22740                    b.HasKey("Id");
 22741
 22742                    b.HasIndex("UserId");
 22743
 22744                    b.ToTable("ItemDisplayPreferences");
 22745
 22746                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22747                });
 748
 22749            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22750                {
 22751                    b.Property<Guid>("ItemValueId")
 22752                        .ValueGeneratedOnAdd()
 22753                        .HasColumnType("TEXT");
 22754
 22755                    b.Property<string>("CleanValue")
 22756                        .IsRequired()
 22757                        .HasColumnType("TEXT");
 22758
 22759                    b.Property<int>("Type")
 22760                        .HasColumnType("INTEGER");
 22761
 22762                    b.Property<string>("Value")
 22763                        .IsRequired()
 22764                        .HasColumnType("TEXT");
 22765
 22766                    b.HasKey("ItemValueId");
 22767
 22768                    b.HasIndex("Type", "CleanValue");
 22769
 22770                    b.HasIndex("Type", "Value")
 22771                        .IsUnique();
 22772
 22773                    b.ToTable("ItemValues");
 22774
 22775                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22776                });
 777
 22778            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22779                {
 22780                    b.Property<Guid>("ItemValueId")
 22781                        .HasColumnType("TEXT");
 22782
 22783                    b.Property<Guid>("ItemId")
 22784                        .HasColumnType("TEXT");
 22785
 22786                    b.HasKey("ItemValueId", "ItemId");
 22787
 22788                    b.HasIndex("ItemId");
 22789
 22790                    b.ToTable("ItemValuesMap");
 22791
 22792                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22793                });
 794
 22795            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22796                {
 22797                    b.Property<Guid>("ItemId")
 22798                        .HasColumnType("TEXT");
 22799
 22800                    b.PrimitiveCollection<string>("KeyframeTicks")
 22801                        .HasColumnType("TEXT");
 22802
 22803                    b.Property<long>("TotalDuration")
 22804                        .HasColumnType("INTEGER");
 22805
 22806                    b.HasKey("ItemId");
 22807
 22808                    b.ToTable("KeyframeData");
 22809
 22810                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22811                });
 812
 22813            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22814                {
 22815                    b.Property<Guid>("ParentId")
 22816                        .HasColumnType("TEXT");
 22817
 22818                    b.Property<Guid>("ChildId")
 22819                        .HasColumnType("TEXT");
 22820
 22821                    b.Property<int>("ChildType")
 22822                        .HasColumnType("INTEGER");
 22823
 22824                    b.Property<int?>("SortOrder")
 22825                        .HasColumnType("INTEGER");
 22826
 22827                    b.HasKey("ParentId", "ChildId");
 22828
 22829                    b.HasIndex("ChildId", "ChildType");
 22830
 22831                    b.HasIndex("ParentId", "ChildType");
 22832
 22833                    b.HasIndex("ParentId", "SortOrder");
 22834
 22835                    b.ToTable("LinkedChildren", (string)null);
 22836
 22837                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22838                });
 839
 22840            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22841                {
 22842                    b.Property<Guid>("Id")
 22843                        .ValueGeneratedOnAdd()
 22844                        .HasColumnType("TEXT");
 22845
 22846                    b.Property<long>("EndTicks")
 22847                        .HasColumnType("INTEGER");
 22848
 22849                    b.Property<Guid>("ItemId")
 22850                        .HasColumnType("TEXT");
 22851
 22852                    b.Property<string>("SegmentProviderId")
 22853                        .IsRequired()
 22854                        .HasColumnType("TEXT");
 22855
 22856                    b.Property<long>("StartTicks")
 22857                        .HasColumnType("INTEGER");
 22858
 22859                    b.Property<int>("Type")
 22860                        .HasColumnType("INTEGER");
 22861
 22862                    b.HasKey("Id");
 22863
 22864                    b.ToTable("MediaSegments");
 22865
 22866                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22867                });
 868
 22869            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22870                {
 22871                    b.Property<Guid>("ItemId")
 22872                        .HasColumnType("TEXT");
 22873
 22874                    b.Property<int>("StreamIndex")
 22875                        .HasColumnType("INTEGER");
 22876
 22877                    b.Property<string>("AspectRatio")
 22878                        .HasColumnType("TEXT");
 22879
 22880                    b.Property<float?>("AverageFrameRate")
 22881                        .HasColumnType("REAL");
 22882
 22883                    b.Property<int?>("BitDepth")
 22884                        .HasColumnType("INTEGER");
 22885
 22886                    b.Property<int?>("BitRate")
 22887                        .HasColumnType("INTEGER");
 22888
 22889                    b.Property<int?>("BlPresentFlag")
 22890                        .HasColumnType("INTEGER");
 22891
 22892                    b.Property<string>("ChannelLayout")
 22893                        .HasColumnType("TEXT");
 22894
 22895                    b.Property<int?>("Channels")
 22896                        .HasColumnType("INTEGER");
 22897
 22898                    b.Property<string>("Codec")
 22899                        .HasColumnType("TEXT");
 22900
 22901                    b.Property<string>("CodecTag")
 22902                        .HasColumnType("TEXT");
 22903
 22904                    b.Property<string>("CodecTimeBase")
 22905                        .HasColumnType("TEXT");
 22906
 22907                    b.Property<string>("ColorPrimaries")
 22908                        .HasColumnType("TEXT");
 22909
 22910                    b.Property<string>("ColorSpace")
 22911                        .HasColumnType("TEXT");
 22912
 22913                    b.Property<string>("ColorTransfer")
 22914                        .HasColumnType("TEXT");
 22915
 22916                    b.Property<string>("Comment")
 22917                        .HasColumnType("TEXT");
 22918
 22919                    b.Property<int?>("DvBlSignalCompatibilityId")
 22920                        .HasColumnType("INTEGER");
 22921
 22922                    b.Property<int?>("DvLevel")
 22923                        .HasColumnType("INTEGER");
 22924
 22925                    b.Property<int?>("DvProfile")
 22926                        .HasColumnType("INTEGER");
 22927
 22928                    b.Property<int?>("DvVersionMajor")
 22929                        .HasColumnType("INTEGER");
 22930
 22931                    b.Property<int?>("DvVersionMinor")
 22932                        .HasColumnType("INTEGER");
 22933
 22934                    b.Property<int?>("ElPresentFlag")
 22935                        .HasColumnType("INTEGER");
 22936
 22937                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22938                        .HasColumnType("INTEGER");
 22939
 22940                    b.Property<int?>("Height")
 22941                        .HasColumnType("INTEGER");
 22942
 22943                    b.Property<bool?>("IsAnamorphic")
 22944                        .HasColumnType("INTEGER");
 22945
 22946                    b.Property<bool?>("IsAvc")
 22947                        .HasColumnType("INTEGER");
 22948
 22949                    b.Property<bool>("IsDefault")
 22950                        .HasColumnType("INTEGER");
 22951
 22952                    b.Property<bool>("IsExternal")
 22953                        .HasColumnType("INTEGER");
 22954
 22955                    b.Property<bool>("IsForced")
 22956                        .HasColumnType("INTEGER");
 22957
 22958                    b.Property<bool?>("IsHearingImpaired")
 22959                        .HasColumnType("INTEGER");
 22960
 22961                    b.Property<bool?>("IsInterlaced")
 22962                        .HasColumnType("INTEGER");
 22963
 22964                    b.Property<bool>("IsOriginal")
 22965                        .HasColumnType("INTEGER");
 22966
 22967                    b.Property<string>("KeyFrames")
 22968                        .HasColumnType("TEXT");
 22969
 22970                    b.Property<string>("Language")
 22971                        .HasColumnType("TEXT");
 22972
 22973                    b.Property<float?>("Level")
 22974                        .HasColumnType("REAL");
 22975
 22976                    b.Property<string>("NalLengthSize")
 22977                        .HasColumnType("TEXT");
 22978
 22979                    b.Property<string>("Path")
 22980                        .HasColumnType("TEXT");
 22981
 22982                    b.Property<string>("PixelFormat")
 22983                        .HasColumnType("TEXT");
 22984
 22985                    b.Property<string>("Profile")
 22986                        .HasColumnType("TEXT");
 22987
 22988                    b.Property<float?>("RealFrameRate")
 22989                        .HasColumnType("REAL");
 22990
 22991                    b.Property<int?>("RefFrames")
 22992                        .HasColumnType("INTEGER");
 22993
 22994                    b.Property<int?>("Rotation")
 22995                        .HasColumnType("INTEGER");
 22996
 22997                    b.Property<int?>("RpuPresentFlag")
 22998                        .HasColumnType("INTEGER");
 22999
 221000                    b.Property<int?>("SampleRate")
 221001                        .HasColumnType("INTEGER");
 221002
 221003                    b.Property<int>("StreamType")
 221004                        .HasColumnType("INTEGER");
 221005
 221006                    b.Property<string>("TimeBase")
 221007                        .HasColumnType("TEXT");
 221008
 221009                    b.Property<string>("Title")
 221010                        .HasColumnType("TEXT");
 221011
 221012                    b.Property<int?>("Width")
 221013                        .HasColumnType("INTEGER");
 221014
 221015                    b.HasKey("ItemId", "StreamIndex");
 221016
 221017                    b.ToTable("MediaStreamInfos");
 221018
 221019                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221020                });
 1021
 221022            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221023                {
 221024                    b.Property<Guid>("Id")
 221025                        .ValueGeneratedOnAdd()
 221026                        .HasColumnType("TEXT");
 221027
 221028                    b.Property<string>("Name")
 221029                        .IsRequired()
 221030                        .HasColumnType("TEXT");
 221031
 221032                    b.Property<string>("PersonType")
 221033                        .HasColumnType("TEXT");
 221034
 221035                    b.HasKey("Id");
 221036
 221037                    b.HasIndex("Name");
 221038
 221039                    b.ToTable("Peoples");
 221040
 221041                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221042                });
 1043
 221044            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221045                {
 221046                    b.Property<Guid>("ItemId")
 221047                        .HasColumnType("TEXT");
 221048
 221049                    b.Property<Guid>("PeopleId")
 221050                        .HasColumnType("TEXT");
 221051
 221052                    b.Property<string>("Role")
 221053                        .HasColumnType("TEXT");
 221054
 221055                    b.Property<int?>("ListOrder")
 221056                        .HasColumnType("INTEGER");
 221057
 221058                    b.Property<int?>("SortOrder")
 221059                        .HasColumnType("INTEGER");
 221060
 221061                    b.HasKey("ItemId", "PeopleId", "Role");
 221062
 221063                    b.HasIndex("PeopleId");
 221064
 221065                    b.HasIndex("ItemId", "ListOrder");
 221066
 221067                    b.HasIndex("ItemId", "SortOrder");
 221068
 221069                    b.ToTable("PeopleBaseItemMap");
 221070
 221071                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221072                });
 1073
 221074            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221075                {
 221076                    b.Property<int>("Id")
 221077                        .ValueGeneratedOnAdd()
 221078                        .HasColumnType("INTEGER");
 221079
 221080                    b.Property<int>("Kind")
 221081                        .HasColumnType("INTEGER");
 221082
 221083                    b.Property<Guid?>("Permission_Permissions_Guid")
 221084                        .HasColumnType("TEXT");
 221085
 221086                    b.Property<uint>("RowVersion")
 221087                        .IsConcurrencyToken()
 221088                        .HasColumnType("INTEGER");
 221089
 221090                    b.Property<Guid?>("UserId")
 221091                        .HasColumnType("TEXT");
 221092
 221093                    b.Property<bool>("Value")
 221094                        .HasColumnType("INTEGER");
 221095
 221096                    b.HasKey("Id");
 221097
 221098                    b.HasIndex("UserId", "Kind")
 221099                        .IsUnique()
 221100                        .HasFilter("[UserId] IS NOT NULL");
 221101
 221102                    b.ToTable("Permissions");
 221103
 221104                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221105                });
 1106
 221107            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221108                {
 221109                    b.Property<int>("Id")
 221110                        .ValueGeneratedOnAdd()
 221111                        .HasColumnType("INTEGER");
 221112
 221113                    b.Property<int>("Kind")
 221114                        .HasColumnType("INTEGER");
 221115
 221116                    b.Property<Guid?>("Preference_Preferences_Guid")
 221117                        .HasColumnType("TEXT");
 221118
 221119                    b.Property<uint>("RowVersion")
 221120                        .IsConcurrencyToken()
 221121                        .HasColumnType("INTEGER");
 221122
 221123                    b.Property<Guid?>("UserId")
 221124                        .HasColumnType("TEXT");
 221125
 221126                    b.Property<string>("Value")
 221127                        .IsRequired()
 221128                        .HasMaxLength(65535)
 221129                        .HasColumnType("TEXT");
 221130
 221131                    b.HasKey("Id");
 221132
 221133                    b.HasIndex("UserId", "Kind")
 221134                        .IsUnique()
 221135                        .HasFilter("[UserId] IS NOT NULL");
 221136
 221137                    b.ToTable("Preferences");
 221138
 221139                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221140                });
 1141
 221142            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221143                {
 221144                    b.Property<int>("Id")
 221145                        .ValueGeneratedOnAdd()
 221146                        .HasColumnType("INTEGER");
 221147
 221148                    b.Property<string>("AccessToken")
 221149                        .IsRequired()
 221150                        .HasColumnType("TEXT");
 221151
 221152                    b.Property<DateTime>("DateCreated")
 221153                        .HasColumnType("TEXT");
 221154
 221155                    b.Property<DateTime>("DateLastActivity")
 221156                        .HasColumnType("TEXT");
 221157
 221158                    b.Property<string>("Name")
 221159                        .IsRequired()
 221160                        .HasMaxLength(64)
 221161                        .HasColumnType("TEXT");
 221162
 221163                    b.HasKey("Id");
 221164
 221165                    b.HasIndex("AccessToken")
 221166                        .IsUnique();
 221167
 221168                    b.ToTable("ApiKeys");
 221169
 221170                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221171                });
 1172
 221173            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221174                {
 221175                    b.Property<int>("Id")
 221176                        .ValueGeneratedOnAdd()
 221177                        .HasColumnType("INTEGER");
 221178
 221179                    b.Property<string>("AccessToken")
 221180                        .IsRequired()
 221181                        .HasColumnType("TEXT");
 221182
 221183                    b.Property<string>("AppName")
 221184                        .IsRequired()
 221185                        .HasMaxLength(64)
 221186                        .HasColumnType("TEXT");
 221187
 221188                    b.Property<string>("AppVersion")
 221189                        .IsRequired()
 221190                        .HasMaxLength(32)
 221191                        .HasColumnType("TEXT");
 221192
 221193                    b.Property<DateTime>("DateCreated")
 221194                        .HasColumnType("TEXT");
 221195
 221196                    b.Property<DateTime>("DateLastActivity")
 221197                        .HasColumnType("TEXT");
 221198
 221199                    b.Property<DateTime>("DateModified")
 221200                        .HasColumnType("TEXT");
 221201
 221202                    b.Property<string>("DeviceId")
 221203                        .IsRequired()
 221204                        .HasMaxLength(256)
 221205                        .HasColumnType("TEXT");
 221206
 221207                    b.Property<string>("DeviceName")
 221208                        .IsRequired()
 221209                        .HasMaxLength(64)
 221210                        .HasColumnType("TEXT");
 221211
 221212                    b.Property<bool>("IsActive")
 221213                        .HasColumnType("INTEGER");
 221214
 221215                    b.Property<Guid>("UserId")
 221216                        .HasColumnType("TEXT");
 221217
 221218                    b.HasKey("Id");
 221219
 221220                    b.HasIndex("AccessToken", "DateLastActivity");
 221221
 221222                    b.HasIndex("DeviceId", "DateLastActivity");
 221223
 221224                    b.HasIndex("UserId", "DeviceId");
 221225
 221226                    b.ToTable("Devices");
 221227
 221228                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221229                });
 1230
 221231            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221232                {
 221233                    b.Property<int>("Id")
 221234                        .ValueGeneratedOnAdd()
 221235                        .HasColumnType("INTEGER");
 221236
 221237                    b.Property<string>("CustomName")
 221238                        .HasColumnType("TEXT");
 221239
 221240                    b.Property<string>("DeviceId")
 221241                        .IsRequired()
 221242                        .HasColumnType("TEXT");
 221243
 221244                    b.HasKey("Id");
 221245
 221246                    b.HasIndex("DeviceId")
 221247                        .IsUnique();
 221248
 221249                    b.ToTable("DeviceOptions");
 221250
 221251                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221252                });
 1253
 221254            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221255                {
 221256                    b.Property<Guid>("ItemId")
 221257                        .HasColumnType("TEXT");
 221258
 221259                    b.Property<int>("Width")
 221260                        .HasColumnType("INTEGER");
 221261
 221262                    b.Property<int>("Bandwidth")
 221263                        .HasColumnType("INTEGER");
 221264
 221265                    b.Property<int>("Height")
 221266                        .HasColumnType("INTEGER");
 221267
 221268                    b.Property<int>("Interval")
 221269                        .HasColumnType("INTEGER");
 221270
 221271                    b.Property<int>("ThumbnailCount")
 221272                        .HasColumnType("INTEGER");
 221273
 221274                    b.Property<int>("TileHeight")
 221275                        .HasColumnType("INTEGER");
 221276
 221277                    b.Property<int>("TileWidth")
 221278                        .HasColumnType("INTEGER");
 221279
 221280                    b.HasKey("ItemId", "Width");
 221281
 221282                    b.ToTable("TrickplayInfos");
 221283
 221284                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221285                });
 1286
 221287            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221288                {
 221289                    b.Property<Guid>("Id")
 221290                        .ValueGeneratedOnAdd()
 221291                        .HasColumnType("TEXT");
 221292
 221293                    b.Property<string>("AudioLanguagePreference")
 221294                        .HasMaxLength(255)
 221295                        .HasColumnType("TEXT");
 221296
 221297                    b.Property<string>("AuthenticationProviderId")
 221298                        .IsRequired()
 221299                        .HasMaxLength(255)
 221300                        .HasColumnType("TEXT");
 221301
 221302                    b.Property<string>("CastReceiverId")
 221303                        .HasMaxLength(32)
 221304                        .HasColumnType("TEXT");
 221305
 221306                    b.Property<bool>("DisplayCollectionsView")
 221307                        .HasColumnType("INTEGER");
 221308
 221309                    b.Property<bool>("DisplayMissingEpisodes")
 221310                        .HasColumnType("INTEGER");
 221311
 221312                    b.Property<bool>("EnableAutoLogin")
 221313                        .HasColumnType("INTEGER");
 221314
 221315                    b.Property<bool>("EnableLocalPassword")
 221316                        .HasColumnType("INTEGER");
 221317
 221318                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221319                        .HasColumnType("INTEGER");
 221320
 221321                    b.Property<bool>("EnableUserPreferenceAccess")
 221322                        .HasColumnType("INTEGER");
 221323
 221324                    b.Property<bool>("HidePlayedInLatest")
 221325                        .HasColumnType("INTEGER");
 221326
 221327                    b.Property<long>("InternalId")
 221328                        .HasColumnType("INTEGER");
 221329
 221330                    b.Property<int>("InvalidLoginAttemptCount")
 221331                        .HasColumnType("INTEGER");
 221332
 221333                    b.Property<DateTime?>("LastActivityDate")
 221334                        .HasColumnType("TEXT");
 221335
 221336                    b.Property<DateTime?>("LastLoginDate")
 221337                        .HasColumnType("TEXT");
 221338
 221339                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221340                        .HasColumnType("INTEGER");
 221341
 221342                    b.Property<int>("MaxActiveSessions")
 221343                        .HasColumnType("INTEGER");
 221344
 221345                    b.Property<int?>("MaxParentalRatingScore")
 221346                        .HasColumnType("INTEGER");
 221347
 221348                    b.Property<int?>("MaxParentalRatingSubScore")
 221349                        .HasColumnType("INTEGER");
 221350
 221351                    b.Property<bool>("MustUpdatePassword")
 221352                        .HasColumnType("INTEGER");
 221353
 221354                    b.Property<string>("Password")
 221355                        .HasMaxLength(65535)
 221356                        .HasColumnType("TEXT");
 221357
 221358                    b.Property<string>("PasswordResetProviderId")
 221359                        .IsRequired()
 221360                        .HasMaxLength(255)
 221361                        .HasColumnType("TEXT");
 221362
 221363                    b.Property<bool>("PlayDefaultAudioTrack")
 221364                        .HasColumnType("INTEGER");
 221365
 221366                    b.Property<bool>("RememberAudioSelections")
 221367                        .HasColumnType("INTEGER");
 221368
 221369                    b.Property<bool>("RememberSubtitleSelections")
 221370                        .HasColumnType("INTEGER");
 221371
 221372                    b.Property<int?>("RemoteClientBitrateLimit")
 221373                        .HasColumnType("INTEGER");
 221374
 221375                    b.Property<uint>("RowVersion")
 221376                        .IsConcurrencyToken()
 221377                        .HasColumnType("INTEGER");
 221378
 221379                    b.Property<string>("SubtitleLanguagePreference")
 221380                        .HasMaxLength(255)
 221381                        .HasColumnType("TEXT");
 221382
 221383                    b.Property<int>("SubtitleMode")
 221384                        .HasColumnType("INTEGER");
 221385
 221386                    b.Property<int>("SyncPlayAccess")
 221387                        .HasColumnType("INTEGER");
 221388
 221389                    b.Property<string>("Username")
 221390                        .IsRequired()
 221391                        .HasMaxLength(255)
 221392                        .HasColumnType("TEXT");
 221393
 221394                    b.HasKey("Id");
 221395
 221396                    b.HasIndex("Username")
 221397                        .IsUnique();
 221398
 221399                    b.ToTable("Users");
 221400
 221401                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221402                });
 1403
 221404            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221405                {
 221406                    b.Property<Guid>("ItemId")
 221407                        .HasColumnType("TEXT");
 221408
 221409                    b.Property<Guid>("UserId")
 221410                        .HasColumnType("TEXT");
 221411
 221412                    b.Property<string>("CustomDataKey")
 221413                        .HasColumnType("TEXT");
 221414
 221415                    b.Property<int?>("AudioStreamIndex")
 221416                        .HasColumnType("INTEGER");
 221417
 221418                    b.Property<bool>("IsFavorite")
 221419                        .HasColumnType("INTEGER");
 221420
 221421                    b.Property<DateTime?>("LastPlayedDate")
 221422                        .HasColumnType("TEXT");
 221423
 221424                    b.Property<bool?>("Likes")
 221425                        .HasColumnType("INTEGER");
 221426
 221427                    b.Property<int>("PlayCount")
 221428                        .HasColumnType("INTEGER");
 221429
 221430                    b.Property<long>("PlaybackPositionTicks")
 221431                        .HasColumnType("INTEGER");
 221432
 221433                    b.Property<bool>("Played")
 221434                        .HasColumnType("INTEGER");
 221435
 221436                    b.Property<double?>("Rating")
 221437                        .HasColumnType("REAL");
 221438
 221439                    b.Property<DateTime?>("RetentionDate")
 221440                        .HasColumnType("TEXT");
 221441
 221442                    b.Property<int?>("SubtitleStreamIndex")
 221443                        .HasColumnType("INTEGER");
 221444
 221445                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221446
 221447                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221448
 221449                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221450
 221451                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221452
 221453                    b.HasIndex("ItemId", "UserId", "Played");
 221454
 221455                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 221456
 221457                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 221458
 221459                    b.HasIndex("UserId", "Played", "ItemId");
 221460
 221461                    b.ToTable("UserData");
 221462
 221463                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221464                });
 1465
 221466            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221467                {
 221468                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221469                        .WithMany("AccessSchedules")
 221470                        .HasForeignKey("UserId")
 221471                        .OnDelete(DeleteBehavior.Cascade)
 221472                        .IsRequired();
 221473                });
 1474
 221475            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221476                {
 221477                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221478                        .WithMany("Parents")
 221479                        .HasForeignKey("ItemId")
 221480                        .OnDelete(DeleteBehavior.Cascade)
 221481                        .IsRequired();
 221482
 221483                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221484                        .WithMany("Children")
 221485                        .HasForeignKey("ParentItemId")
 221486                        .OnDelete(DeleteBehavior.Cascade)
 221487                        .IsRequired();
 221488
 221489                    b.Navigation("Item");
 221490
 221491                    b.Navigation("ParentItem");
 221492                });
 1493
 221494            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221495                {
 221496                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221497                        .WithMany()
 221498                        .HasForeignKey("ItemId")
 221499                        .OnDelete(DeleteBehavior.Cascade)
 221500                        .IsRequired();
 221501
 221502                    b.Navigation("Item");
 221503                });
 1504
 221505            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221506                {
 221507                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221508                        .WithMany("Extras")
 221509                        .HasForeignKey("OwnerId")
 221510                        .OnDelete(DeleteBehavior.NoAction);
 221511
 221512                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221513                        .WithMany("DirectChildren")
 221514                        .HasForeignKey("ParentId")
 221515                        .OnDelete(DeleteBehavior.Cascade);
 221516
 221517                    b.Navigation("DirectParent");
 221518
 221519                    b.Navigation("Owner");
 221520                });
 1521
 221522            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221523                {
 221524                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221525                        .WithMany("Images")
 221526                        .HasForeignKey("ItemId")
 221527                        .OnDelete(DeleteBehavior.Cascade)
 221528                        .IsRequired();
 221529
 221530                    b.Navigation("Item");
 221531                });
 1532
 221533            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221534                {
 221535                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221536                        .WithMany("LockedFields")
 221537                        .HasForeignKey("ItemId")
 221538                        .OnDelete(DeleteBehavior.Cascade)
 221539                        .IsRequired();
 221540
 221541                    b.Navigation("Item");
 221542                });
 1543
 221544            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221545                {
 221546                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221547                        .WithMany("Provider")
 221548                        .HasForeignKey("ItemId")
 221549                        .OnDelete(DeleteBehavior.Cascade)
 221550                        .IsRequired();
 221551
 221552                    b.Navigation("Item");
 221553                });
 1554
 221555            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221556                {
 221557                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221558                        .WithMany("TrailerTypes")
 221559                        .HasForeignKey("ItemId")
 221560                        .OnDelete(DeleteBehavior.Cascade)
 221561                        .IsRequired();
 221562
 221563                    b.Navigation("Item");
 221564                });
 1565
 221566            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221567                {
 221568                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221569                        .WithMany("Chapters")
 221570                        .HasForeignKey("ItemId")
 221571                        .OnDelete(DeleteBehavior.Cascade)
 221572                        .IsRequired();
 221573
 221574                    b.Navigation("Item");
 221575                });
 1576
 221577            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221578                {
 221579                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221580                        .WithMany("DisplayPreferences")
 221581                        .HasForeignKey("UserId")
 221582                        .OnDelete(DeleteBehavior.Cascade)
 221583                        .IsRequired();
 221584                });
 1585
 221586            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221587                {
 221588                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221589                        .WithMany("HomeSections")
 221590                        .HasForeignKey("DisplayPreferencesId")
 221591                        .OnDelete(DeleteBehavior.Cascade)
 221592                        .IsRequired();
 221593                });
 1594
 221595            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221596                {
 221597                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221598                        .WithOne("ProfileImage")
 221599                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221600                        .OnDelete(DeleteBehavior.Cascade);
 221601                });
 1602
 221603            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221604                {
 221605                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221606                        .WithMany("ItemDisplayPreferences")
 221607                        .HasForeignKey("UserId")
 221608                        .OnDelete(DeleteBehavior.Cascade)
 221609                        .IsRequired();
 221610                });
 1611
 221612            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221613                {
 221614                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221615                        .WithMany("ItemValues")
 221616                        .HasForeignKey("ItemId")
 221617                        .OnDelete(DeleteBehavior.Cascade)
 221618                        .IsRequired();
 221619
 221620                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221621                        .WithMany("BaseItemsMap")
 221622                        .HasForeignKey("ItemValueId")
 221623                        .OnDelete(DeleteBehavior.Cascade)
 221624                        .IsRequired();
 221625
 221626                    b.Navigation("Item");
 221627
 221628                    b.Navigation("ItemValue");
 221629                });
 1630
 221631            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221632                {
 221633                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221634                        .WithMany()
 221635                        .HasForeignKey("ItemId")
 221636                        .OnDelete(DeleteBehavior.Cascade)
 221637                        .IsRequired();
 221638
 221639                    b.Navigation("Item");
 221640                });
 1641
 221642            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221643                {
 221644                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221645                        .WithMany("LinkedChildOfEntities")
 221646                        .HasForeignKey("ChildId")
 221647                        .OnDelete(DeleteBehavior.NoAction)
 221648                        .IsRequired();
 221649
 221650                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221651                        .WithMany("LinkedChildEntities")
 221652                        .HasForeignKey("ParentId")
 221653                        .OnDelete(DeleteBehavior.NoAction)
 221654                        .IsRequired();
 221655
 221656                    b.Navigation("Child");
 221657
 221658                    b.Navigation("Parent");
 221659                });
 1660
 221661            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221662                {
 221663                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221664                        .WithMany("MediaStreams")
 221665                        .HasForeignKey("ItemId")
 221666                        .OnDelete(DeleteBehavior.Cascade)
 221667                        .IsRequired();
 221668
 221669                    b.Navigation("Item");
 221670                });
 1671
 221672            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221673                {
 221674                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221675                        .WithMany("Peoples")
 221676                        .HasForeignKey("ItemId")
 221677                        .OnDelete(DeleteBehavior.Cascade)
 221678                        .IsRequired();
 221679
 221680                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221681                        .WithMany("BaseItems")
 221682                        .HasForeignKey("PeopleId")
 221683                        .OnDelete(DeleteBehavior.Cascade)
 221684                        .IsRequired();
 221685
 221686                    b.Navigation("Item");
 221687
 221688                    b.Navigation("People");
 221689                });
 1690
 221691            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221692                {
 221693                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221694                        .WithMany("Permissions")
 221695                        .HasForeignKey("UserId")
 221696                        .OnDelete(DeleteBehavior.Cascade);
 221697                });
 1698
 221699            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221700                {
 221701                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221702                        .WithMany("Preferences")
 221703                        .HasForeignKey("UserId")
 221704                        .OnDelete(DeleteBehavior.Cascade);
 221705                });
 1706
 221707            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221708                {
 221709                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221710                        .WithMany()
 221711                        .HasForeignKey("UserId")
 221712                        .OnDelete(DeleteBehavior.Cascade)
 221713                        .IsRequired();
 221714
 221715                    b.Navigation("User");
 221716                });
 1717
 221718            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221719                {
 221720                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221721                        .WithMany("UserData")
 221722                        .HasForeignKey("ItemId")
 221723                        .OnDelete(DeleteBehavior.Cascade)
 221724                        .IsRequired();
 221725
 221726                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221727                        .WithMany()
 221728                        .HasForeignKey("UserId")
 221729                        .OnDelete(DeleteBehavior.Cascade)
 221730                        .IsRequired();
 221731
 221732                    b.Navigation("Item");
 221733
 221734                    b.Navigation("User");
 221735                });
 1736
 221737            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221738                {
 221739                    b.Navigation("Chapters");
 221740
 221741                    b.Navigation("Children");
 221742
 221743                    b.Navigation("DirectChildren");
 221744
 221745                    b.Navigation("Extras");
 221746
 221747                    b.Navigation("Images");
 221748
 221749                    b.Navigation("ItemValues");
 221750
 221751                    b.Navigation("LinkedChildEntities");
 221752
 221753                    b.Navigation("LinkedChildOfEntities");
 221754
 221755                    b.Navigation("LockedFields");
 221756
 221757                    b.Navigation("MediaStreams");
 221758
 221759                    b.Navigation("Parents");
 221760
 221761                    b.Navigation("Peoples");
 221762
 221763                    b.Navigation("Provider");
 221764
 221765                    b.Navigation("TrailerTypes");
 221766
 221767                    b.Navigation("UserData");
 221768                });
 1769
 221770            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221771                {
 221772                    b.Navigation("HomeSections");
 221773                });
 1774
 221775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221776                {
 221777                    b.Navigation("BaseItemsMap");
 221778                });
 1779
 221780            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221781                {
 221782                    b.Navigation("BaseItems");
 221783                });
 1784
 221785            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221786                {
 221787                    b.Navigation("AccessSchedules");
 221788
 221789                    b.Navigation("DisplayPreferences");
 221790
 221791                    b.Navigation("ItemDisplayPreferences");
 221792
 221793                    b.Navigation("Permissions");
 221794
 221795                    b.Navigation("Preferences");
 221796
 221797                    b.Navigation("ProfileImage");
 221798                });
 1799#pragma warning restore 612, 618
 221800        }
 1801    }
 1802}