< Summary - Jellyfin

Line coverage
99%
Covered lines: 1731
Uncovered lines: 5
Coverable lines: 1736
Total lines: 1836
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/27/2026 - 12:15:38 AM Line coverage: 99.7% (1731/1736) Total lines: 1836

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/20260522092303_AddNormalizedUsername.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddNormalizedUsername : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.AddColumn<string>(
 2214                name: "NormalizedUsername",
 2215                table: "Users",
 2216                type: "TEXT",
 2217                maxLength: 255,
 2218                nullable: false,
 2219                defaultValue: string.Empty);
 2220        }
 21
 22        /// <inheritdoc />
 23        protected override void Down(MigrationBuilder migrationBuilder)
 24        {
 025            migrationBuilder.Sql("ALTER TABLE Users DROP COLUMN NormalizedUsername;");
 26
 027            migrationBuilder.Sql(
 028                @"DELETE FROM __EFMigrationsHistory
 029                  WHERE MigrationId = '20260522092304_UpdateNormalizedUsername'");
 030        }
 31    }
 32}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260522092303_AddNormalizedUsername.Designer.cs

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