< Summary - Jellyfin

Line coverage
99%
Covered lines: 1720
Uncovered lines: 4
Coverable lines: 1724
Total lines: 1823
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/4/2026 - 12:15:16 AM Line coverage: 99.7% (1717/1721) Total lines: 18205/22/2026 - 12:15:17 AM Line coverage: 99.7% (1720/1724) Total lines: 1823

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/20260308123920_AddTypeCleanNameIndex.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 AddTypeCleanNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.CreateIndex(
 2214                name: "IX_BaseItems_Type_CleanName",
 2215                table: "BaseItems",
 2216                columns: new[] { "Type", "CleanName" });
 2217        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_BaseItems_Type_CleanName",
 024                table: "BaseItems");
 025        }
 26    }
 27}

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