< Summary - Jellyfin

Line coverage
99%
Covered lines: 1722
Uncovered lines: 4
Coverable lines: 1726
Total lines: 1825
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% (1719/1723) Total lines: 18225/22/2026 - 12:15:17 AM Line coverage: 99.7% (1722/1726) Total lines: 1825

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/20260118182305_AddIndicesToImageInfo.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 AddIndicesToImageInfo : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.CreateIndex(
 2214                name: "IX_BaseItemImageInfos_ItemId_ImageType",
 2215                table: "BaseItemImageInfos",
 2216                columns: new[] { "ItemId", "ImageType" });
 2217        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_BaseItemImageInfos_ItemId_ImageType",
 024                table: "BaseItemImageInfos");
 025        }
 26    }
 27}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260118182305_AddIndicesToImageInfo.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("20260118182305_AddIndicesToImageInfo")]
 15    partial class AddIndicesToImageInfo
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2223            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246
 2247                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2248                });
 49
 2250            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2251                {
 2252                    b.Property<int>("Id")
 2253                        .ValueGeneratedOnAdd()
 2254                        .HasColumnType("INTEGER");
 2255
 2256                    b.Property<DateTime>("DateCreated")
 2257                        .HasColumnType("TEXT");
 2258
 2259                    b.Property<string>("ItemId")
 2260                        .HasMaxLength(256)
 2261                        .HasColumnType("TEXT");
 2262
 2263                    b.Property<int>("LogSeverity")
 2264                        .HasColumnType("INTEGER");
 2265
 2266                    b.Property<string>("Name")
 2267                        .IsRequired()
 2268                        .HasMaxLength(512)
 2269                        .HasColumnType("TEXT");
 2270
 2271                    b.Property<string>("Overview")
 2272                        .HasMaxLength(512)
 2273                        .HasColumnType("TEXT");
 2274
 2275                    b.Property<uint>("RowVersion")
 2276                        .IsConcurrencyToken()
 2277                        .HasColumnType("INTEGER");
 2278
 2279                    b.Property<string>("ShortOverview")
 2280                        .HasMaxLength(512)
 2281                        .HasColumnType("TEXT");
 2282
 2283                    b.Property<string>("Type")
 2284                        .IsRequired()
 2285                        .HasMaxLength(256)
 2286                        .HasColumnType("TEXT");
 2287
 2288                    b.Property<Guid>("UserId")
 2289                        .HasColumnType("TEXT");
 2290
 2291                    b.HasKey("Id");
 2292
 2293                    b.HasIndex("DateCreated");
 2294
 2295                    b.ToTable("ActivityLogs");
 2296
 2297                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2298                });
 99
 22100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 22101                {
 22102                    b.Property<Guid>("ItemId")
 22103                        .HasColumnType("TEXT");
 22104
 22105                    b.Property<Guid>("ParentItemId")
 22106                        .HasColumnType("TEXT");
 22107
 22108                    b.HasKey("ItemId", "ParentItemId");
 22109
 22110                    b.HasIndex("ParentItemId");
 22111
 22112                    b.ToTable("AncestorIds");
 22113
 22114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22115                });
 116
 22117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 22118                {
 22119                    b.Property<Guid>("ItemId")
 22120                        .HasColumnType("TEXT");
 22121
 22122                    b.Property<int>("Index")
 22123                        .HasColumnType("INTEGER");
 22124
 22125                    b.Property<string>("Codec")
 22126                        .HasColumnType("TEXT");
 22127
 22128                    b.Property<string>("CodecTag")
 22129                        .HasColumnType("TEXT");
 22130
 22131                    b.Property<string>("Comment")
 22132                        .HasColumnType("TEXT");
 22133
 22134                    b.Property<string>("Filename")
 22135                        .HasColumnType("TEXT");
 22136
 22137                    b.Property<string>("MimeType")
 22138                        .HasColumnType("TEXT");
 22139
 22140                    b.HasKey("ItemId", "Index");
 22141
 22142                    b.ToTable("AttachmentStreamInfos");
 22143
 22144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22145                });
 146
 22147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 22148                {
 22149                    b.Property<Guid>("Id")
 22150                        .ValueGeneratedOnAdd()
 22151                        .HasColumnType("TEXT");
 22152
 22153                    b.Property<string>("Album")
 22154                        .HasColumnType("TEXT");
 22155
 22156                    b.Property<string>("AlbumArtists")
 22157                        .HasColumnType("TEXT");
 22158
 22159                    b.Property<string>("Artists")
 22160                        .HasColumnType("TEXT");
 22161
 22162                    b.Property<int?>("Audio")
 22163                        .HasColumnType("INTEGER");
 22164
 22165                    b.Property<Guid?>("ChannelId")
 22166                        .HasColumnType("TEXT");
 22167
 22168                    b.Property<string>("CleanName")
 22169                        .HasColumnType("TEXT");
 22170
 22171                    b.Property<float?>("CommunityRating")
 22172                        .HasColumnType("REAL");
 22173
 22174                    b.Property<float?>("CriticRating")
 22175                        .HasColumnType("REAL");
 22176
 22177                    b.Property<string>("CustomRating")
 22178                        .HasColumnType("TEXT");
 22179
 22180                    b.Property<string>("Data")
 22181                        .HasColumnType("TEXT");
 22182
 22183                    b.Property<DateTime?>("DateCreated")
 22184                        .HasColumnType("TEXT");
 22185
 22186                    b.Property<DateTime?>("DateLastMediaAdded")
 22187                        .HasColumnType("TEXT");
 22188
 22189                    b.Property<DateTime?>("DateLastRefreshed")
 22190                        .HasColumnType("TEXT");
 22191
 22192                    b.Property<DateTime?>("DateLastSaved")
 22193                        .HasColumnType("TEXT");
 22194
 22195                    b.Property<DateTime?>("DateModified")
 22196                        .HasColumnType("TEXT");
 22197
 22198                    b.Property<DateTime?>("EndDate")
 22199                        .HasColumnType("TEXT");
 22200
 22201                    b.Property<string>("EpisodeTitle")
 22202                        .HasColumnType("TEXT");
 22203
 22204                    b.Property<string>("ExternalId")
 22205                        .HasColumnType("TEXT");
 22206
 22207                    b.Property<string>("ExternalSeriesId")
 22208                        .HasColumnType("TEXT");
 22209
 22210                    b.Property<string>("ExternalServiceId")
 22211                        .HasColumnType("TEXT");
 22212
 22213                    b.Property<int?>("ExtraType")
 22214                        .HasColumnType("INTEGER");
 22215
 22216                    b.Property<string>("ForcedSortName")
 22217                        .HasColumnType("TEXT");
 22218
 22219                    b.Property<string>("Genres")
 22220                        .HasColumnType("TEXT");
 22221
 22222                    b.Property<int?>("Height")
 22223                        .HasColumnType("INTEGER");
 22224
 22225                    b.Property<int?>("IndexNumber")
 22226                        .HasColumnType("INTEGER");
 22227
 22228                    b.Property<int?>("InheritedParentalRatingSubValue")
 22229                        .HasColumnType("INTEGER");
 22230
 22231                    b.Property<int?>("InheritedParentalRatingValue")
 22232                        .HasColumnType("INTEGER");
 22233
 22234                    b.Property<bool>("IsFolder")
 22235                        .HasColumnType("INTEGER");
 22236
 22237                    b.Property<bool>("IsInMixedFolder")
 22238                        .HasColumnType("INTEGER");
 22239
 22240                    b.Property<bool>("IsLocked")
 22241                        .HasColumnType("INTEGER");
 22242
 22243                    b.Property<bool>("IsMovie")
 22244                        .HasColumnType("INTEGER");
 22245
 22246                    b.Property<bool>("IsRepeat")
 22247                        .HasColumnType("INTEGER");
 22248
 22249                    b.Property<bool>("IsSeries")
 22250                        .HasColumnType("INTEGER");
 22251
 22252                    b.Property<bool>("IsVirtualItem")
 22253                        .HasColumnType("INTEGER");
 22254
 22255                    b.Property<float?>("LUFS")
 22256                        .HasColumnType("REAL");
 22257
 22258                    b.Property<string>("MediaType")
 22259                        .HasColumnType("TEXT");
 22260
 22261                    b.Property<string>("Name")
 22262                        .HasColumnType("TEXT");
 22263
 22264                    b.Property<float?>("NormalizationGain")
 22265                        .HasColumnType("REAL");
 22266
 22267                    b.Property<string>("OfficialRating")
 22268                        .HasColumnType("TEXT");
 22269
 22270                    b.Property<string>("OriginalLanguage")
 22271                        .HasColumnType("TEXT");
 22272
 22273                    b.Property<string>("OriginalTitle")
 22274                        .HasColumnType("TEXT");
 22275
 22276                    b.Property<string>("Overview")
 22277                        .HasColumnType("TEXT");
 22278
 22279                    b.Property<Guid?>("OwnerId")
 22280                        .HasColumnType("TEXT");
 22281
 22282                    b.Property<Guid?>("ParentId")
 22283                        .HasColumnType("TEXT");
 22284
 22285                    b.Property<int?>("ParentIndexNumber")
 22286                        .HasColumnType("INTEGER");
 22287
 22288                    b.Property<string>("Path")
 22289                        .HasColumnType("TEXT");
 22290
 22291                    b.Property<string>("PreferredMetadataCountryCode")
 22292                        .HasColumnType("TEXT");
 22293
 22294                    b.Property<string>("PreferredMetadataLanguage")
 22295                        .HasColumnType("TEXT");
 22296
 22297                    b.Property<DateTime?>("PremiereDate")
 22298                        .HasColumnType("TEXT");
 22299
 22300                    b.Property<string>("PresentationUniqueKey")
 22301                        .HasColumnType("TEXT");
 22302
 22303                    b.Property<string>("PrimaryVersionId")
 22304                        .HasColumnType("TEXT");
 22305
 22306                    b.Property<string>("ProductionLocations")
 22307                        .HasColumnType("TEXT");
 22308
 22309                    b.Property<int?>("ProductionYear")
 22310                        .HasColumnType("INTEGER");
 22311
 22312                    b.Property<long?>("RunTimeTicks")
 22313                        .HasColumnType("INTEGER");
 22314
 22315                    b.Property<Guid?>("SeasonId")
 22316                        .HasColumnType("TEXT");
 22317
 22318                    b.Property<string>("SeasonName")
 22319                        .HasColumnType("TEXT");
 22320
 22321                    b.Property<Guid?>("SeriesId")
 22322                        .HasColumnType("TEXT");
 22323
 22324                    b.Property<string>("SeriesName")
 22325                        .HasColumnType("TEXT");
 22326
 22327                    b.Property<string>("SeriesPresentationUniqueKey")
 22328                        .HasColumnType("TEXT");
 22329
 22330                    b.Property<string>("ShowId")
 22331                        .HasColumnType("TEXT");
 22332
 22333                    b.Property<long?>("Size")
 22334                        .HasColumnType("INTEGER");
 22335
 22336                    b.Property<string>("SortName")
 22337                        .HasColumnType("TEXT");
 22338
 22339                    b.Property<DateTime?>("StartDate")
 22340                        .HasColumnType("TEXT");
 22341
 22342                    b.Property<string>("Studios")
 22343                        .HasColumnType("TEXT");
 22344
 22345                    b.Property<string>("Tagline")
 22346                        .HasColumnType("TEXT");
 22347
 22348                    b.Property<string>("Tags")
 22349                        .HasColumnType("TEXT");
 22350
 22351                    b.Property<Guid?>("TopParentId")
 22352                        .HasColumnType("TEXT");
 22353
 22354                    b.Property<int?>("TotalBitrate")
 22355                        .HasColumnType("INTEGER");
 22356
 22357                    b.Property<string>("Type")
 22358                        .IsRequired()
 22359                        .HasColumnType("TEXT");
 22360
 22361                    b.Property<string>("UnratedType")
 22362                        .HasColumnType("TEXT");
 22363
 22364                    b.Property<int?>("Width")
 22365                        .HasColumnType("INTEGER");
 22366
 22367                    b.HasKey("Id");
 22368
 22369                    b.HasIndex("ExtraType");
 22370
 22371                    b.HasIndex("OwnerId");
 22372
 22373                    b.HasIndex("ParentId");
 22374
 22375                    b.HasIndex("Path");
 22376
 22377                    b.HasIndex("PresentationUniqueKey");
 22378
 22379                    b.HasIndex("ExtraType", "OwnerId");
 22380
 22381                    b.HasIndex("TopParentId", "Id");
 22382
 22383                    b.HasIndex("Type", "TopParentId", "Id");
 22384
 22385                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22386
 22387                    b.HasIndex("Type", "TopParentId", "StartDate");
 22388
 22389                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22390
 22391                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22392
 22393                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 22394
 22395                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 22396
 22397                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 22398
 22399                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22400
 22401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22402
 22403                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22404
 22405                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22406
 22407                    b.ToTable("BaseItems");
 22408
 22409                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22410
 22411                    b.HasData(
 22412                        new
 22413                        {
 22414                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 22415                            IsFolder = false,
 22416                            IsInMixedFolder = false,
 22417                            IsLocked = false,
 22418                            IsMovie = false,
 22419                            IsRepeat = false,
 22420                            IsSeries = false,
 22421                            IsVirtualItem = false,
 22422                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 22423                            Type = "PLACEHOLDER"
 22424                        });
 22425                });
 426
 22427            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 22428                {
 22429                    b.Property<Guid>("Id")
 22430                        .ValueGeneratedOnAdd()
 22431                        .HasColumnType("TEXT");
 22432
 22433                    b.Property<byte[]>("Blurhash")
 22434                        .HasColumnType("BLOB");
 22435
 22436                    b.Property<DateTime?>("DateModified")
 22437                        .HasColumnType("TEXT");
 22438
 22439                    b.Property<int>("Height")
 22440                        .HasColumnType("INTEGER");
 22441
 22442                    b.Property<int>("ImageType")
 22443                        .HasColumnType("INTEGER");
 22444
 22445                    b.Property<Guid>("ItemId")
 22446                        .HasColumnType("TEXT");
 22447
 22448                    b.Property<string>("Path")
 22449                        .IsRequired()
 22450                        .HasColumnType("TEXT");
 22451
 22452                    b.Property<int>("Width")
 22453                        .HasColumnType("INTEGER");
 22454
 22455                    b.HasKey("Id");
 22456
 22457                    b.HasIndex("ItemId");
 22458
 22459                    b.HasIndex("ItemId", "ImageType");
 22460
 22461                    b.ToTable("BaseItemImageInfos");
 22462
 22463                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22464                });
 465
 22466            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 22467                {
 22468                    b.Property<int>("Id")
 22469                        .HasColumnType("INTEGER");
 22470
 22471                    b.Property<Guid>("ItemId")
 22472                        .HasColumnType("TEXT");
 22473
 22474                    b.HasKey("Id", "ItemId");
 22475
 22476                    b.HasIndex("ItemId");
 22477
 22478                    b.ToTable("BaseItemMetadataFields");
 22479
 22480                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22481                });
 482
 22483            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 22484                {
 22485                    b.Property<Guid>("ItemId")
 22486                        .HasColumnType("TEXT");
 22487
 22488                    b.Property<string>("ProviderId")
 22489                        .HasColumnType("TEXT");
 22490
 22491                    b.Property<string>("ProviderValue")
 22492                        .IsRequired()
 22493                        .HasColumnType("TEXT");
 22494
 22495                    b.HasKey("ItemId", "ProviderId");
 22496
 22497                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22498
 22499                    b.ToTable("BaseItemProviders");
 22500
 22501                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22502                });
 503
 22504            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 22505                {
 22506                    b.Property<int>("Id")
 22507                        .HasColumnType("INTEGER");
 22508
 22509                    b.Property<Guid>("ItemId")
 22510                        .HasColumnType("TEXT");
 22511
 22512                    b.HasKey("Id", "ItemId");
 22513
 22514                    b.HasIndex("ItemId");
 22515
 22516                    b.ToTable("BaseItemTrailerTypes");
 22517
 22518                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22519                });
 520
 22521            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 22522                {
 22523                    b.Property<Guid>("ItemId")
 22524                        .HasColumnType("TEXT");
 22525
 22526                    b.Property<int>("ChapterIndex")
 22527                        .HasColumnType("INTEGER");
 22528
 22529                    b.Property<DateTime?>("ImageDateModified")
 22530                        .HasColumnType("TEXT");
 22531
 22532                    b.Property<string>("ImagePath")
 22533                        .HasColumnType("TEXT");
 22534
 22535                    b.Property<string>("Name")
 22536                        .HasColumnType("TEXT");
 22537
 22538                    b.Property<long>("StartPositionTicks")
 22539                        .HasColumnType("INTEGER");
 22540
 22541                    b.HasKey("ItemId", "ChapterIndex");
 22542
 22543                    b.ToTable("Chapters");
 22544
 22545                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22546                });
 547
 22548            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 22549                {
 22550                    b.Property<int>("Id")
 22551                        .ValueGeneratedOnAdd()
 22552                        .HasColumnType("INTEGER");
 22553
 22554                    b.Property<string>("Client")
 22555                        .IsRequired()
 22556                        .HasMaxLength(32)
 22557                        .HasColumnType("TEXT");
 22558
 22559                    b.Property<Guid>("ItemId")
 22560                        .HasColumnType("TEXT");
 22561
 22562                    b.Property<string>("Key")
 22563                        .IsRequired()
 22564                        .HasColumnType("TEXT");
 22565
 22566                    b.Property<Guid>("UserId")
 22567                        .HasColumnType("TEXT");
 22568
 22569                    b.Property<string>("Value")
 22570                        .HasColumnType("TEXT");
 22571
 22572                    b.HasKey("Id");
 22573
 22574                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22575                        .IsUnique();
 22576
 22577                    b.ToTable("CustomItemDisplayPreferences");
 22578
 22579                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22580                });
 581
 22582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 22583                {
 22584                    b.Property<int>("Id")
 22585                        .ValueGeneratedOnAdd()
 22586                        .HasColumnType("INTEGER");
 22587
 22588                    b.Property<int>("ChromecastVersion")
 22589                        .HasColumnType("INTEGER");
 22590
 22591                    b.Property<string>("Client")
 22592                        .IsRequired()
 22593                        .HasMaxLength(32)
 22594                        .HasColumnType("TEXT");
 22595
 22596                    b.Property<string>("DashboardTheme")
 22597                        .HasMaxLength(32)
 22598                        .HasColumnType("TEXT");
 22599
 22600                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22601                        .HasColumnType("INTEGER");
 22602
 22603                    b.Property<int?>("IndexBy")
 22604                        .HasColumnType("INTEGER");
 22605
 22606                    b.Property<Guid>("ItemId")
 22607                        .HasColumnType("TEXT");
 22608
 22609                    b.Property<int>("ScrollDirection")
 22610                        .HasColumnType("INTEGER");
 22611
 22612                    b.Property<bool>("ShowBackdrop")
 22613                        .HasColumnType("INTEGER");
 22614
 22615                    b.Property<bool>("ShowSidebar")
 22616                        .HasColumnType("INTEGER");
 22617
 22618                    b.Property<int>("SkipBackwardLength")
 22619                        .HasColumnType("INTEGER");
 22620
 22621                    b.Property<int>("SkipForwardLength")
 22622                        .HasColumnType("INTEGER");
 22623
 22624                    b.Property<string>("TvHome")
 22625                        .HasMaxLength(32)
 22626                        .HasColumnType("TEXT");
 22627
 22628                    b.Property<Guid>("UserId")
 22629                        .HasColumnType("TEXT");
 22630
 22631                    b.HasKey("Id");
 22632
 22633                    b.HasIndex("UserId", "ItemId", "Client")
 22634                        .IsUnique();
 22635
 22636                    b.ToTable("DisplayPreferences");
 22637
 22638                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22639                });
 640
 22641            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 22642                {
 22643                    b.Property<int>("Id")
 22644                        .ValueGeneratedOnAdd()
 22645                        .HasColumnType("INTEGER");
 22646
 22647                    b.Property<int>("DisplayPreferencesId")
 22648                        .HasColumnType("INTEGER");
 22649
 22650                    b.Property<int>("Order")
 22651                        .HasColumnType("INTEGER");
 22652
 22653                    b.Property<int>("Type")
 22654                        .HasColumnType("INTEGER");
 22655
 22656                    b.HasKey("Id");
 22657
 22658                    b.HasIndex("DisplayPreferencesId");
 22659
 22660                    b.ToTable("HomeSection");
 22661
 22662                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22663                });
 664
 22665            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 22666                {
 22667                    b.Property<int>("Id")
 22668                        .ValueGeneratedOnAdd()
 22669                        .HasColumnType("INTEGER");
 22670
 22671                    b.Property<DateTime>("LastModified")
 22672                        .HasColumnType("TEXT");
 22673
 22674                    b.Property<string>("Path")
 22675                        .IsRequired()
 22676                        .HasMaxLength(512)
 22677                        .HasColumnType("TEXT");
 22678
 22679                    b.Property<Guid?>("UserId")
 22680                        .HasColumnType("TEXT");
 22681
 22682                    b.HasKey("Id");
 22683
 22684                    b.HasIndex("UserId")
 22685                        .IsUnique();
 22686
 22687                    b.ToTable("ImageInfos");
 22688
 22689                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22690                });
 691
 22692            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 22693                {
 22694                    b.Property<int>("Id")
 22695                        .ValueGeneratedOnAdd()
 22696                        .HasColumnType("INTEGER");
 22697
 22698                    b.Property<string>("Client")
 22699                        .IsRequired()
 22700                        .HasMaxLength(32)
 22701                        .HasColumnType("TEXT");
 22702
 22703                    b.Property<int?>("IndexBy")
 22704                        .HasColumnType("INTEGER");
 22705
 22706                    b.Property<Guid>("ItemId")
 22707                        .HasColumnType("TEXT");
 22708
 22709                    b.Property<bool>("RememberIndexing")
 22710                        .HasColumnType("INTEGER");
 22711
 22712                    b.Property<bool>("RememberSorting")
 22713                        .HasColumnType("INTEGER");
 22714
 22715                    b.Property<string>("SortBy")
 22716                        .IsRequired()
 22717                        .HasMaxLength(64)
 22718                        .HasColumnType("TEXT");
 22719
 22720                    b.Property<int>("SortOrder")
 22721                        .HasColumnType("INTEGER");
 22722
 22723                    b.Property<Guid>("UserId")
 22724                        .HasColumnType("TEXT");
 22725
 22726                    b.Property<int>("ViewType")
 22727                        .HasColumnType("INTEGER");
 22728
 22729                    b.HasKey("Id");
 22730
 22731                    b.HasIndex("UserId");
 22732
 22733                    b.ToTable("ItemDisplayPreferences");
 22734
 22735                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22736                });
 737
 22738            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 22739                {
 22740                    b.Property<Guid>("ItemValueId")
 22741                        .ValueGeneratedOnAdd()
 22742                        .HasColumnType("TEXT");
 22743
 22744                    b.Property<string>("CleanValue")
 22745                        .IsRequired()
 22746                        .HasColumnType("TEXT");
 22747
 22748                    b.Property<int>("Type")
 22749                        .HasColumnType("INTEGER");
 22750
 22751                    b.Property<string>("Value")
 22752                        .IsRequired()
 22753                        .HasColumnType("TEXT");
 22754
 22755                    b.HasKey("ItemValueId");
 22756
 22757                    b.HasIndex("Type", "CleanValue");
 22758
 22759                    b.HasIndex("Type", "Value")
 22760                        .IsUnique();
 22761
 22762                    b.ToTable("ItemValues");
 22763
 22764                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22765                });
 766
 22767            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22768                {
 22769                    b.Property<Guid>("ItemValueId")
 22770                        .HasColumnType("TEXT");
 22771
 22772                    b.Property<Guid>("ItemId")
 22773                        .HasColumnType("TEXT");
 22774
 22775                    b.HasKey("ItemValueId", "ItemId");
 22776
 22777                    b.HasIndex("ItemId");
 22778
 22779                    b.ToTable("ItemValuesMap");
 22780
 22781                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22782                });
 783
 22784            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22785                {
 22786                    b.Property<Guid>("ItemId")
 22787                        .HasColumnType("TEXT");
 22788
 22789                    b.PrimitiveCollection<string>("KeyframeTicks")
 22790                        .HasColumnType("TEXT");
 22791
 22792                    b.Property<long>("TotalDuration")
 22793                        .HasColumnType("INTEGER");
 22794
 22795                    b.HasKey("ItemId");
 22796
 22797                    b.ToTable("KeyframeData");
 22798
 22799                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22800                });
 801
 22802            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 22803                {
 22804                    b.Property<Guid>("ParentId")
 22805                        .HasColumnType("TEXT");
 22806
 22807                    b.Property<Guid>("ChildId")
 22808                        .HasColumnType("TEXT");
 22809
 22810                    b.Property<int>("ChildType")
 22811                        .HasColumnType("INTEGER");
 22812
 22813                    b.Property<int?>("SortOrder")
 22814                        .HasColumnType("INTEGER");
 22815
 22816                    b.HasKey("ParentId", "ChildId");
 22817
 22818                    b.HasIndex("ChildId");
 22819
 22820                    b.HasIndex("ParentId");
 22821
 22822                    b.HasIndex("ChildId", "ChildType");
 22823
 22824                    b.HasIndex("ParentId", "ChildType");
 22825
 22826                    b.HasIndex("ParentId", "SortOrder");
 22827
 22828                    b.ToTable("LinkedChildren", (string)null);
 22829
 22830                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22831                });
 832
 22833            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22834                {
 22835                    b.Property<Guid>("Id")
 22836                        .ValueGeneratedOnAdd()
 22837                        .HasColumnType("TEXT");
 22838
 22839                    b.Property<long>("EndTicks")
 22840                        .HasColumnType("INTEGER");
 22841
 22842                    b.Property<Guid>("ItemId")
 22843                        .HasColumnType("TEXT");
 22844
 22845                    b.Property<string>("SegmentProviderId")
 22846                        .IsRequired()
 22847                        .HasColumnType("TEXT");
 22848
 22849                    b.Property<long>("StartTicks")
 22850                        .HasColumnType("INTEGER");
 22851
 22852                    b.Property<int>("Type")
 22853                        .HasColumnType("INTEGER");
 22854
 22855                    b.HasKey("Id");
 22856
 22857                    b.ToTable("MediaSegments");
 22858
 22859                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22860                });
 861
 22862            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22863                {
 22864                    b.Property<Guid>("ItemId")
 22865                        .HasColumnType("TEXT");
 22866
 22867                    b.Property<int>("StreamIndex")
 22868                        .HasColumnType("INTEGER");
 22869
 22870                    b.Property<string>("AspectRatio")
 22871                        .HasColumnType("TEXT");
 22872
 22873                    b.Property<float?>("AverageFrameRate")
 22874                        .HasColumnType("REAL");
 22875
 22876                    b.Property<int?>("BitDepth")
 22877                        .HasColumnType("INTEGER");
 22878
 22879                    b.Property<int?>("BitRate")
 22880                        .HasColumnType("INTEGER");
 22881
 22882                    b.Property<int?>("BlPresentFlag")
 22883                        .HasColumnType("INTEGER");
 22884
 22885                    b.Property<string>("ChannelLayout")
 22886                        .HasColumnType("TEXT");
 22887
 22888                    b.Property<int?>("Channels")
 22889                        .HasColumnType("INTEGER");
 22890
 22891                    b.Property<string>("Codec")
 22892                        .HasColumnType("TEXT");
 22893
 22894                    b.Property<string>("CodecTag")
 22895                        .HasColumnType("TEXT");
 22896
 22897                    b.Property<string>("CodecTimeBase")
 22898                        .HasColumnType("TEXT");
 22899
 22900                    b.Property<string>("ColorPrimaries")
 22901                        .HasColumnType("TEXT");
 22902
 22903                    b.Property<string>("ColorSpace")
 22904                        .HasColumnType("TEXT");
 22905
 22906                    b.Property<string>("ColorTransfer")
 22907                        .HasColumnType("TEXT");
 22908
 22909                    b.Property<string>("Comment")
 22910                        .HasColumnType("TEXT");
 22911
 22912                    b.Property<int?>("DvBlSignalCompatibilityId")
 22913                        .HasColumnType("INTEGER");
 22914
 22915                    b.Property<int?>("DvLevel")
 22916                        .HasColumnType("INTEGER");
 22917
 22918                    b.Property<int?>("DvProfile")
 22919                        .HasColumnType("INTEGER");
 22920
 22921                    b.Property<int?>("DvVersionMajor")
 22922                        .HasColumnType("INTEGER");
 22923
 22924                    b.Property<int?>("DvVersionMinor")
 22925                        .HasColumnType("INTEGER");
 22926
 22927                    b.Property<int?>("ElPresentFlag")
 22928                        .HasColumnType("INTEGER");
 22929
 22930                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22931                        .HasColumnType("INTEGER");
 22932
 22933                    b.Property<int?>("Height")
 22934                        .HasColumnType("INTEGER");
 22935
 22936                    b.Property<bool?>("IsAnamorphic")
 22937                        .HasColumnType("INTEGER");
 22938
 22939                    b.Property<bool?>("IsAvc")
 22940                        .HasColumnType("INTEGER");
 22941
 22942                    b.Property<bool>("IsDefault")
 22943                        .HasColumnType("INTEGER");
 22944
 22945                    b.Property<bool>("IsExternal")
 22946                        .HasColumnType("INTEGER");
 22947
 22948                    b.Property<bool>("IsForced")
 22949                        .HasColumnType("INTEGER");
 22950
 22951                    b.Property<bool?>("IsHearingImpaired")
 22952                        .HasColumnType("INTEGER");
 22953
 22954                    b.Property<bool?>("IsInterlaced")
 22955                        .HasColumnType("INTEGER");
 22956
 22957                    b.Property<string>("KeyFrames")
 22958                        .HasColumnType("TEXT");
 22959
 22960                    b.Property<string>("Language")
 22961                        .HasColumnType("TEXT");
 22962
 22963                    b.Property<float?>("Level")
 22964                        .HasColumnType("REAL");
 22965
 22966                    b.Property<string>("NalLengthSize")
 22967                        .HasColumnType("TEXT");
 22968
 22969                    b.Property<string>("Path")
 22970                        .HasColumnType("TEXT");
 22971
 22972                    b.Property<string>("PixelFormat")
 22973                        .HasColumnType("TEXT");
 22974
 22975                    b.Property<string>("Profile")
 22976                        .HasColumnType("TEXT");
 22977
 22978                    b.Property<float?>("RealFrameRate")
 22979                        .HasColumnType("REAL");
 22980
 22981                    b.Property<int?>("RefFrames")
 22982                        .HasColumnType("INTEGER");
 22983
 22984                    b.Property<int?>("Rotation")
 22985                        .HasColumnType("INTEGER");
 22986
 22987                    b.Property<int?>("RpuPresentFlag")
 22988                        .HasColumnType("INTEGER");
 22989
 22990                    b.Property<int?>("SampleRate")
 22991                        .HasColumnType("INTEGER");
 22992
 22993                    b.Property<int>("StreamType")
 22994                        .HasColumnType("INTEGER");
 22995
 22996                    b.Property<string>("TimeBase")
 22997                        .HasColumnType("TEXT");
 22998
 22999                    b.Property<string>("Title")
 221000                        .HasColumnType("TEXT");
 221001
 221002                    b.Property<int?>("Width")
 221003                        .HasColumnType("INTEGER");
 221004
 221005                    b.HasKey("ItemId", "StreamIndex");
 221006
 221007                    b.HasIndex("StreamIndex");
 221008
 221009                    b.HasIndex("StreamType");
 221010
 221011                    b.HasIndex("StreamIndex", "StreamType");
 221012
 221013                    b.HasIndex("StreamIndex", "StreamType", "Language");
 221014
 221015                    b.ToTable("MediaStreamInfos");
 221016
 221017                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221018                });
 1019
 221020            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221021                {
 221022                    b.Property<Guid>("Id")
 221023                        .ValueGeneratedOnAdd()
 221024                        .HasColumnType("TEXT");
 221025
 221026                    b.Property<string>("Name")
 221027                        .IsRequired()
 221028                        .HasColumnType("TEXT");
 221029
 221030                    b.Property<string>("PersonType")
 221031                        .HasColumnType("TEXT");
 221032
 221033                    b.HasKey("Id");
 221034
 221035                    b.HasIndex("Name");
 221036
 221037                    b.ToTable("Peoples");
 221038
 221039                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221040                });
 1041
 221042            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221043                {
 221044                    b.Property<Guid>("ItemId")
 221045                        .HasColumnType("TEXT");
 221046
 221047                    b.Property<Guid>("PeopleId")
 221048                        .HasColumnType("TEXT");
 221049
 221050                    b.Property<string>("Role")
 221051                        .HasColumnType("TEXT");
 221052
 221053                    b.Property<int?>("ListOrder")
 221054                        .HasColumnType("INTEGER");
 221055
 221056                    b.Property<int?>("SortOrder")
 221057                        .HasColumnType("INTEGER");
 221058
 221059                    b.HasKey("ItemId", "PeopleId", "Role");
 221060
 221061                    b.HasIndex("PeopleId");
 221062
 221063                    b.HasIndex("ItemId", "ListOrder");
 221064
 221065                    b.HasIndex("ItemId", "SortOrder");
 221066
 221067                    b.ToTable("PeopleBaseItemMap");
 221068
 221069                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221070                });
 1071
 221072            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221073                {
 221074                    b.Property<int>("Id")
 221075                        .ValueGeneratedOnAdd()
 221076                        .HasColumnType("INTEGER");
 221077
 221078                    b.Property<int>("Kind")
 221079                        .HasColumnType("INTEGER");
 221080
 221081                    b.Property<Guid?>("Permission_Permissions_Guid")
 221082                        .HasColumnType("TEXT");
 221083
 221084                    b.Property<uint>("RowVersion")
 221085                        .IsConcurrencyToken()
 221086                        .HasColumnType("INTEGER");
 221087
 221088                    b.Property<Guid?>("UserId")
 221089                        .HasColumnType("TEXT");
 221090
 221091                    b.Property<bool>("Value")
 221092                        .HasColumnType("INTEGER");
 221093
 221094                    b.HasKey("Id");
 221095
 221096                    b.HasIndex("UserId", "Kind")
 221097                        .IsUnique()
 221098                        .HasFilter("[UserId] IS NOT NULL");
 221099
 221100                    b.ToTable("Permissions");
 221101
 221102                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221103                });
 1104
 221105            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221106                {
 221107                    b.Property<int>("Id")
 221108                        .ValueGeneratedOnAdd()
 221109                        .HasColumnType("INTEGER");
 221110
 221111                    b.Property<int>("Kind")
 221112                        .HasColumnType("INTEGER");
 221113
 221114                    b.Property<Guid?>("Preference_Preferences_Guid")
 221115                        .HasColumnType("TEXT");
 221116
 221117                    b.Property<uint>("RowVersion")
 221118                        .IsConcurrencyToken()
 221119                        .HasColumnType("INTEGER");
 221120
 221121                    b.Property<Guid?>("UserId")
 221122                        .HasColumnType("TEXT");
 221123
 221124                    b.Property<string>("Value")
 221125                        .IsRequired()
 221126                        .HasMaxLength(65535)
 221127                        .HasColumnType("TEXT");
 221128
 221129                    b.HasKey("Id");
 221130
 221131                    b.HasIndex("UserId", "Kind")
 221132                        .IsUnique()
 221133                        .HasFilter("[UserId] IS NOT NULL");
 221134
 221135                    b.ToTable("Preferences");
 221136
 221137                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221138                });
 1139
 221140            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221141                {
 221142                    b.Property<int>("Id")
 221143                        .ValueGeneratedOnAdd()
 221144                        .HasColumnType("INTEGER");
 221145
 221146                    b.Property<string>("AccessToken")
 221147                        .IsRequired()
 221148                        .HasColumnType("TEXT");
 221149
 221150                    b.Property<DateTime>("DateCreated")
 221151                        .HasColumnType("TEXT");
 221152
 221153                    b.Property<DateTime>("DateLastActivity")
 221154                        .HasColumnType("TEXT");
 221155
 221156                    b.Property<string>("Name")
 221157                        .IsRequired()
 221158                        .HasMaxLength(64)
 221159                        .HasColumnType("TEXT");
 221160
 221161                    b.HasKey("Id");
 221162
 221163                    b.HasIndex("AccessToken")
 221164                        .IsUnique();
 221165
 221166                    b.ToTable("ApiKeys");
 221167
 221168                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221169                });
 1170
 221171            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221172                {
 221173                    b.Property<int>("Id")
 221174                        .ValueGeneratedOnAdd()
 221175                        .HasColumnType("INTEGER");
 221176
 221177                    b.Property<string>("AccessToken")
 221178                        .IsRequired()
 221179                        .HasColumnType("TEXT");
 221180
 221181                    b.Property<string>("AppName")
 221182                        .IsRequired()
 221183                        .HasMaxLength(64)
 221184                        .HasColumnType("TEXT");
 221185
 221186                    b.Property<string>("AppVersion")
 221187                        .IsRequired()
 221188                        .HasMaxLength(32)
 221189                        .HasColumnType("TEXT");
 221190
 221191                    b.Property<DateTime>("DateCreated")
 221192                        .HasColumnType("TEXT");
 221193
 221194                    b.Property<DateTime>("DateLastActivity")
 221195                        .HasColumnType("TEXT");
 221196
 221197                    b.Property<DateTime>("DateModified")
 221198                        .HasColumnType("TEXT");
 221199
 221200                    b.Property<string>("DeviceId")
 221201                        .IsRequired()
 221202                        .HasMaxLength(256)
 221203                        .HasColumnType("TEXT");
 221204
 221205                    b.Property<string>("DeviceName")
 221206                        .IsRequired()
 221207                        .HasMaxLength(64)
 221208                        .HasColumnType("TEXT");
 221209
 221210                    b.Property<bool>("IsActive")
 221211                        .HasColumnType("INTEGER");
 221212
 221213                    b.Property<Guid>("UserId")
 221214                        .HasColumnType("TEXT");
 221215
 221216                    b.HasKey("Id");
 221217
 221218                    b.HasIndex("DeviceId");
 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", "ItemId", "LastPlayedDate");
 221456
 221457                    b.ToTable("UserData");
 221458
 221459                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221460                });
 1461
 221462            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221463                {
 221464                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221465                        .WithMany("AccessSchedules")
 221466                        .HasForeignKey("UserId")
 221467                        .OnDelete(DeleteBehavior.Cascade)
 221468                        .IsRequired();
 221469                });
 1470
 221471            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221472                {
 221473                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221474                        .WithMany("Parents")
 221475                        .HasForeignKey("ItemId")
 221476                        .OnDelete(DeleteBehavior.Cascade)
 221477                        .IsRequired();
 221478
 221479                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221480                        .WithMany("Children")
 221481                        .HasForeignKey("ParentItemId")
 221482                        .OnDelete(DeleteBehavior.Cascade)
 221483                        .IsRequired();
 221484
 221485                    b.Navigation("Item");
 221486
 221487                    b.Navigation("ParentItem");
 221488                });
 1489
 221490            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221491                {
 221492                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221493                        .WithMany()
 221494                        .HasForeignKey("ItemId")
 221495                        .OnDelete(DeleteBehavior.Cascade)
 221496                        .IsRequired();
 221497
 221498                    b.Navigation("Item");
 221499                });
 1500
 221501            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221502                {
 221503                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 221504                        .WithMany("Extras")
 221505                        .HasForeignKey("OwnerId")
 221506                        .OnDelete(DeleteBehavior.NoAction);
 221507
 221508                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 221509                        .WithMany("DirectChildren")
 221510                        .HasForeignKey("ParentId")
 221511                        .OnDelete(DeleteBehavior.Cascade);
 221512
 221513                    b.Navigation("DirectParent");
 221514
 221515                    b.Navigation("Owner");
 221516                });
 1517
 221518            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221519                {
 221520                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221521                        .WithMany("Images")
 221522                        .HasForeignKey("ItemId")
 221523                        .OnDelete(DeleteBehavior.Cascade)
 221524                        .IsRequired();
 221525
 221526                    b.Navigation("Item");
 221527                });
 1528
 221529            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221530                {
 221531                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221532                        .WithMany("LockedFields")
 221533                        .HasForeignKey("ItemId")
 221534                        .OnDelete(DeleteBehavior.Cascade)
 221535                        .IsRequired();
 221536
 221537                    b.Navigation("Item");
 221538                });
 1539
 221540            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221541                {
 221542                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221543                        .WithMany("Provider")
 221544                        .HasForeignKey("ItemId")
 221545                        .OnDelete(DeleteBehavior.Cascade)
 221546                        .IsRequired();
 221547
 221548                    b.Navigation("Item");
 221549                });
 1550
 221551            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221552                {
 221553                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221554                        .WithMany("TrailerTypes")
 221555                        .HasForeignKey("ItemId")
 221556                        .OnDelete(DeleteBehavior.Cascade)
 221557                        .IsRequired();
 221558
 221559                    b.Navigation("Item");
 221560                });
 1561
 221562            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221563                {
 221564                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221565                        .WithMany("Chapters")
 221566                        .HasForeignKey("ItemId")
 221567                        .OnDelete(DeleteBehavior.Cascade)
 221568                        .IsRequired();
 221569
 221570                    b.Navigation("Item");
 221571                });
 1572
 221573            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221574                {
 221575                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221576                        .WithMany("DisplayPreferences")
 221577                        .HasForeignKey("UserId")
 221578                        .OnDelete(DeleteBehavior.Cascade)
 221579                        .IsRequired();
 221580                });
 1581
 221582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221583                {
 221584                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221585                        .WithMany("HomeSections")
 221586                        .HasForeignKey("DisplayPreferencesId")
 221587                        .OnDelete(DeleteBehavior.Cascade)
 221588                        .IsRequired();
 221589                });
 1590
 221591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221592                {
 221593                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221594                        .WithOne("ProfileImage")
 221595                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221596                        .OnDelete(DeleteBehavior.Cascade);
 221597                });
 1598
 221599            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221600                {
 221601                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221602                        .WithMany("ItemDisplayPreferences")
 221603                        .HasForeignKey("UserId")
 221604                        .OnDelete(DeleteBehavior.Cascade)
 221605                        .IsRequired();
 221606                });
 1607
 221608            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221609                {
 221610                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221611                        .WithMany("ItemValues")
 221612                        .HasForeignKey("ItemId")
 221613                        .OnDelete(DeleteBehavior.Cascade)
 221614                        .IsRequired();
 221615
 221616                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221617                        .WithMany("BaseItemsMap")
 221618                        .HasForeignKey("ItemValueId")
 221619                        .OnDelete(DeleteBehavior.Cascade)
 221620                        .IsRequired();
 221621
 221622                    b.Navigation("Item");
 221623
 221624                    b.Navigation("ItemValue");
 221625                });
 1626
 221627            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221628                {
 221629                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221630                        .WithMany()
 221631                        .HasForeignKey("ItemId")
 221632                        .OnDelete(DeleteBehavior.Cascade)
 221633                        .IsRequired();
 221634
 221635                    b.Navigation("Item");
 221636                });
 1637
 221638            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 221639                {
 221640                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 221641                        .WithMany("LinkedChildOfEntities")
 221642                        .HasForeignKey("ChildId")
 221643                        .OnDelete(DeleteBehavior.NoAction)
 221644                        .IsRequired();
 221645
 221646                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 221647                        .WithMany("LinkedChildEntities")
 221648                        .HasForeignKey("ParentId")
 221649                        .OnDelete(DeleteBehavior.NoAction)
 221650                        .IsRequired();
 221651
 221652                    b.Navigation("Child");
 221653
 221654                    b.Navigation("Parent");
 221655                });
 1656
 221657            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221658                {
 221659                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221660                        .WithMany("MediaStreams")
 221661                        .HasForeignKey("ItemId")
 221662                        .OnDelete(DeleteBehavior.Cascade)
 221663                        .IsRequired();
 221664
 221665                    b.Navigation("Item");
 221666                });
 1667
 221668            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221669                {
 221670                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221671                        .WithMany("Peoples")
 221672                        .HasForeignKey("ItemId")
 221673                        .OnDelete(DeleteBehavior.Cascade)
 221674                        .IsRequired();
 221675
 221676                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221677                        .WithMany("BaseItems")
 221678                        .HasForeignKey("PeopleId")
 221679                        .OnDelete(DeleteBehavior.Cascade)
 221680                        .IsRequired();
 221681
 221682                    b.Navigation("Item");
 221683
 221684                    b.Navigation("People");
 221685                });
 1686
 221687            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221688                {
 221689                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221690                        .WithMany("Permissions")
 221691                        .HasForeignKey("UserId")
 221692                        .OnDelete(DeleteBehavior.Cascade);
 221693                });
 1694
 221695            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221696                {
 221697                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221698                        .WithMany("Preferences")
 221699                        .HasForeignKey("UserId")
 221700                        .OnDelete(DeleteBehavior.Cascade);
 221701                });
 1702
 221703            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221704                {
 221705                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221706                        .WithMany()
 221707                        .HasForeignKey("UserId")
 221708                        .OnDelete(DeleteBehavior.Cascade)
 221709                        .IsRequired();
 221710
 221711                    b.Navigation("User");
 221712                });
 1713
 221714            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221715                {
 221716                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221717                        .WithMany("UserData")
 221718                        .HasForeignKey("ItemId")
 221719                        .OnDelete(DeleteBehavior.Cascade)
 221720                        .IsRequired();
 221721
 221722                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221723                        .WithMany()
 221724                        .HasForeignKey("UserId")
 221725                        .OnDelete(DeleteBehavior.Cascade)
 221726                        .IsRequired();
 221727
 221728                    b.Navigation("Item");
 221729
 221730                    b.Navigation("User");
 221731                });
 1732
 221733            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221734                {
 221735                    b.Navigation("Chapters");
 221736
 221737                    b.Navigation("Children");
 221738
 221739                    b.Navigation("DirectChildren");
 221740
 221741                    b.Navigation("Extras");
 221742
 221743                    b.Navigation("Images");
 221744
 221745                    b.Navigation("ItemValues");
 221746
 221747                    b.Navigation("LinkedChildEntities");
 221748
 221749                    b.Navigation("LinkedChildOfEntities");
 221750
 221751                    b.Navigation("LockedFields");
 221752
 221753                    b.Navigation("MediaStreams");
 221754
 221755                    b.Navigation("Parents");
 221756
 221757                    b.Navigation("Peoples");
 221758
 221759                    b.Navigation("Provider");
 221760
 221761                    b.Navigation("TrailerTypes");
 221762
 221763                    b.Navigation("UserData");
 221764                });
 1765
 221766            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221767                {
 221768                    b.Navigation("HomeSections");
 221769                });
 1770
 221771            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221772                {
 221773                    b.Navigation("BaseItemsMap");
 221774                });
 1775
 221776            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221777                {
 221778                    b.Navigation("BaseItems");
 221779                });
 1780
 221781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221782                {
 221783                    b.Navigation("AccessSchedules");
 221784
 221785                    b.Navigation("DisplayPreferences");
 221786
 221787                    b.Navigation("ItemDisplayPreferences");
 221788
 221789                    b.Navigation("Permissions");
 221790
 221791                    b.Navigation("Preferences");
 221792
 221793                    b.Navigation("ProfileImage");
 221794                });
 1795#pragma warning restore 612, 618
 221796        }
 1797    }
 1798}