< Summary - Jellyfin

Line coverage
99%
Covered lines: 1734
Uncovered lines: 5
Coverable lines: 1739
Total lines: 1839
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: 18368/11/2026 - 12:17:00 AM Line coverage: 99.7% (1734/1739) Total lines: 1839

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/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        {
 2713            migrationBuilder.AddColumn<string>(
 2714                name: "NormalizedUsername",
 2715                table: "Users",
 2716                type: "TEXT",
 2717                maxLength: 255,
 2718                nullable: false,
 2719                defaultValue: string.Empty);
 2720        }
 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
 2721            modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
 22
 2723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2724                {
 2725                    b.Property<int>("Id")
 2726                        .ValueGeneratedOnAdd()
 2727                        .HasColumnType("INTEGER");
 2728
 2729                    b.Property<int>("DayOfWeek")
 2730                        .HasColumnType("INTEGER");
 2731
 2732                    b.Property<double>("EndHour")
 2733                        .HasColumnType("REAL");
 2734
 2735                    b.Property<double>("StartHour")
 2736                        .HasColumnType("REAL");
 2737
 2738                    b.Property<Guid>("UserId")
 2739                        .HasColumnType("TEXT");
 2740
 2741                    b.HasKey("Id");
 2742
 2743                    b.HasIndex("UserId");
 2744
 2745                    b.ToTable("AccessSchedules");
 2746
 2747                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2748                });
 49
 2750            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2751                {
 2752                    b.Property<int>("Id")
 2753                        .ValueGeneratedOnAdd()
 2754                        .HasColumnType("INTEGER");
 2755
 2756                    b.Property<DateTime>("DateCreated")
 2757                        .HasColumnType("TEXT");
 2758
 2759                    b.Property<string>("ItemId")
 2760                        .HasMaxLength(256)
 2761                        .HasColumnType("TEXT");
 2762
 2763                    b.Property<int>("LogSeverity")
 2764                        .HasColumnType("INTEGER");
 2765
 2766                    b.Property<string>("Name")
 2767                        .IsRequired()
 2768                        .HasMaxLength(512)
 2769                        .HasColumnType("TEXT");
 2770
 2771                    b.Property<string>("Overview")
 2772                        .HasMaxLength(512)
 2773                        .HasColumnType("TEXT");
 2774
 2775                    b.Property<uint>("RowVersion")
 2776                        .IsConcurrencyToken()
 2777                        .HasColumnType("INTEGER");
 2778
 2779                    b.Property<string>("ShortOverview")
 2780                        .HasMaxLength(512)
 2781                        .HasColumnType("TEXT");
 2782
 2783                    b.Property<string>("Type")
 2784                        .IsRequired()
 2785                        .HasMaxLength(256)
 2786                        .HasColumnType("TEXT");
 2787
 2788                    b.Property<Guid>("UserId")
 2789                        .HasColumnType("TEXT");
 2790
 2791                    b.HasKey("Id");
 2792
 2793                    b.HasIndex("DateCreated");
 2794
 2795                    b.ToTable("ActivityLogs");
 2796
 2797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2798                });
 99
 27100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 27101                {
 27102                    b.Property<Guid>("ItemId")
 27103                        .HasColumnType("TEXT");
 27104
 27105                    b.Property<Guid>("ParentItemId")
 27106                        .HasColumnType("TEXT");
 27107
 27108                    b.HasKey("ItemId", "ParentItemId");
 27109
 27110                    b.HasIndex("ParentItemId");
 27111
 27112                    b.ToTable("AncestorIds");
 27113
 27114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27115                });
 116
 27117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 27118                {
 27119                    b.Property<Guid>("ItemId")
 27120                        .HasColumnType("TEXT");
 27121
 27122                    b.Property<int>("Index")
 27123                        .HasColumnType("INTEGER");
 27124
 27125                    b.Property<string>("Codec")
 27126                        .HasColumnType("TEXT");
 27127
 27128                    b.Property<string>("CodecTag")
 27129                        .HasColumnType("TEXT");
 27130
 27131                    b.Property<string>("Comment")
 27132                        .HasColumnType("TEXT");
 27133
 27134                    b.Property<string>("Filename")
 27135                        .HasColumnType("TEXT");
 27136
 27137                    b.Property<string>("MimeType")
 27138                        .HasColumnType("TEXT");
 27139
 27140                    b.HasKey("ItemId", "Index");
 27141
 27142                    b.ToTable("AttachmentStreamInfos");
 27143
 27144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27145                });
 146
 27147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 27148                {
 27149                    b.Property<Guid>("Id")
 27150                        .ValueGeneratedOnAdd()
 27151                        .HasColumnType("TEXT");
 27152
 27153                    b.Property<string>("Album")
 27154                        .HasColumnType("TEXT");
 27155
 27156                    b.Property<string>("AlbumArtists")
 27157                        .HasColumnType("TEXT");
 27158
 27159                    b.Property<string>("Artists")
 27160                        .HasColumnType("TEXT");
 27161
 27162                    b.Property<int?>("Audio")
 27163                        .HasColumnType("INTEGER");
 27164
 27165                    b.Property<Guid?>("ChannelId")
 27166                        .HasColumnType("TEXT");
 27167
 27168                    b.Property<string>("CleanName")
 27169                        .HasColumnType("TEXT");
 27170
 27171                    b.Property<float?>("CommunityRating")
 27172                        .HasColumnType("REAL");
 27173
 27174                    b.Property<float?>("CriticRating")
 27175                        .HasColumnType("REAL");
 27176
 27177                    b.Property<string>("CustomRating")
 27178                        .HasColumnType("TEXT");
 27179
 27180                    b.Property<string>("Data")
 27181                        .HasColumnType("TEXT");
 27182
 27183                    b.Property<DateTime?>("DateCreated")
 27184                        .HasColumnType("TEXT");
 27185
 27186                    b.Property<DateTime?>("DateLastMediaAdded")
 27187                        .HasColumnType("TEXT");
 27188
 27189                    b.Property<DateTime?>("DateLastRefreshed")
 27190                        .HasColumnType("TEXT");
 27191
 27192                    b.Property<DateTime?>("DateLastSaved")
 27193                        .HasColumnType("TEXT");
 27194
 27195                    b.Property<DateTime?>("DateModified")
 27196                        .HasColumnType("TEXT");
 27197
 27198                    b.Property<DateTime?>("EndDate")
 27199                        .HasColumnType("TEXT");
 27200
 27201                    b.Property<string>("EpisodeTitle")
 27202                        .HasColumnType("TEXT");
 27203
 27204                    b.Property<string>("ExternalId")
 27205                        .HasColumnType("TEXT");
 27206
 27207                    b.Property<string>("ExternalSeriesId")
 27208                        .HasColumnType("TEXT");
 27209
 27210                    b.Property<string>("ExternalServiceId")
 27211                        .HasColumnType("TEXT");
 27212
 27213                    b.Property<int?>("ExtraType")
 27214                        .HasColumnType("INTEGER");
 27215
 27216                    b.Property<string>("ForcedSortName")
 27217                        .HasColumnType("TEXT");
 27218
 27219                    b.Property<string>("Genres")
 27220                        .HasColumnType("TEXT");
 27221
 27222                    b.Property<int?>("Height")
 27223                        .HasColumnType("INTEGER");
 27224
 27225                    b.Property<int?>("IndexNumber")
 27226                        .HasColumnType("INTEGER");
 27227
 27228                    b.Property<int?>("InheritedParentalRatingSubValue")
 27229                        .HasColumnType("INTEGER");
 27230
 27231                    b.Property<int?>("InheritedParentalRatingValue")
 27232                        .HasColumnType("INTEGER");
 27233
 27234                    b.Property<bool>("IsFolder")
 27235                        .HasColumnType("INTEGER");
 27236
 27237                    b.Property<bool>("IsInMixedFolder")
 27238                        .HasColumnType("INTEGER");
 27239
 27240                    b.Property<bool>("IsLocked")
 27241                        .HasColumnType("INTEGER");
 27242
 27243                    b.Property<bool>("IsMovie")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<bool>("IsRepeat")
 27247                        .HasColumnType("INTEGER");
 27248
 27249                    b.Property<bool>("IsSeries")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("IsVirtualItem")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<float?>("LUFS")
 27256                        .HasColumnType("REAL");
 27257
 27258                    b.Property<string>("MediaType")
 27259                        .HasColumnType("TEXT");
 27260
 27261                    b.Property<string>("Name")
 27262                        .HasColumnType("TEXT");
 27263
 27264                    b.Property<float?>("NormalizationGain")
 27265                        .HasColumnType("REAL");
 27266
 27267                    b.Property<string>("OfficialRating")
 27268                        .HasColumnType("TEXT");
 27269
 27270                    b.Property<string>("OriginalLanguage")
 27271                        .HasColumnType("TEXT");
 27272
 27273                    b.Property<string>("OriginalTitle")
 27274                        .HasColumnType("TEXT");
 27275
 27276                    b.Property<string>("Overview")
 27277                        .HasColumnType("TEXT");
 27278
 27279                    b.Property<Guid?>("OwnerId")
 27280                        .HasColumnType("TEXT");
 27281
 27282                    b.Property<Guid?>("ParentId")
 27283                        .HasColumnType("TEXT");
 27284
 27285                    b.Property<int?>("ParentIndexNumber")
 27286                        .HasColumnType("INTEGER");
 27287
 27288                    b.Property<string>("Path")
 27289                        .HasColumnType("TEXT");
 27290
 27291                    b.Property<string>("PreferredMetadataCountryCode")
 27292                        .HasColumnType("TEXT");
 27293
 27294                    b.Property<string>("PreferredMetadataLanguage")
 27295                        .HasColumnType("TEXT");
 27296
 27297                    b.Property<DateTime?>("PremiereDate")
 27298                        .HasColumnType("TEXT");
 27299
 27300                    b.Property<string>("PresentationUniqueKey")
 27301                        .HasColumnType("TEXT");
 27302
 27303                    b.Property<Guid?>("PrimaryVersionId")
 27304                        .HasColumnType("TEXT");
 27305
 27306                    b.Property<string>("ProductionLocations")
 27307                        .HasColumnType("TEXT");
 27308
 27309                    b.Property<int?>("ProductionYear")
 27310                        .HasColumnType("INTEGER");
 27311
 27312                    b.Property<long?>("RunTimeTicks")
 27313                        .HasColumnType("INTEGER");
 27314
 27315                    b.Property<Guid?>("SeasonId")
 27316                        .HasColumnType("TEXT");
 27317
 27318                    b.Property<string>("SeasonName")
 27319                        .HasColumnType("TEXT");
 27320
 27321                    b.Property<Guid?>("SeriesId")
 27322                        .HasColumnType("TEXT");
 27323
 27324                    b.Property<string>("SeriesName")
 27325                        .HasColumnType("TEXT");
 27326
 27327                    b.Property<string>("SeriesPresentationUniqueKey")
 27328                        .HasColumnType("TEXT");
 27329
 27330                    b.Property<string>("ShowId")
 27331                        .HasColumnType("TEXT");
 27332
 27333                    b.Property<long?>("Size")
 27334                        .HasColumnType("INTEGER");
 27335
 27336                    b.Property<string>("SortName")
 27337                        .HasColumnType("TEXT");
 27338
 27339                    b.Property<DateTime?>("StartDate")
 27340                        .HasColumnType("TEXT");
 27341
 27342                    b.Property<string>("Studios")
 27343                        .HasColumnType("TEXT");
 27344
 27345                    b.Property<string>("Tagline")
 27346                        .HasColumnType("TEXT");
 27347
 27348                    b.Property<string>("Tags")
 27349                        .HasColumnType("TEXT");
 27350
 27351                    b.Property<Guid?>("TopParentId")
 27352                        .HasColumnType("TEXT");
 27353
 27354                    b.Property<int?>("TotalBitrate")
 27355                        .HasColumnType("INTEGER");
 27356
 27357                    b.Property<string>("Type")
 27358                        .IsRequired()
 27359                        .HasColumnType("TEXT");
 27360
 27361                    b.Property<string>("UnratedType")
 27362                        .HasColumnType("TEXT");
 27363
 27364                    b.Property<int?>("Width")
 27365                        .HasColumnType("INTEGER");
 27366
 27367                    b.HasKey("Id");
 27368
 27369                    b.HasIndex("Name");
 27370
 27371                    b.HasIndex("OwnerId");
 27372
 27373                    b.HasIndex("ParentId");
 27374
 27375                    b.HasIndex("Path");
 27376
 27377                    b.HasIndex("PresentationUniqueKey");
 27378
 27379                    b.HasIndex("SeasonId");
 27380
 27381                    b.HasIndex("SeriesId");
 27382
 27383                    b.HasIndex("SeriesName");
 27384
 27385                    b.HasIndex("ExtraType", "OwnerId");
 27386
 27387                    b.HasIndex("TopParentId", "Id");
 27388
 27389                    b.HasIndex("Type", "CleanName");
 27390
 27391                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 27392                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 27393
 27394                    b.HasIndex("Type", "TopParentId", "Id");
 27395
 27396                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27397
 27398                    b.HasIndex("Type", "TopParentId", "SortName");
 27399
 27400                    b.HasIndex("Type", "TopParentId", "StartDate");
 27401
 27402                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27403
 27404                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 27405
 27406                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 27407
 27408                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 27409
 27410                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27411
 27412                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 27413
 27414                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27415
 27416                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27417
 27418                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27419
 27420                    b.ToTable("BaseItems");
 27421
 27422                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27423
 27424                    b.HasData(
 27425                        new
 27426                        {
 27427                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27428                            IsFolder = false,
 27429                            IsInMixedFolder = false,
 27430                            IsLocked = false,
 27431                            IsMovie = false,
 27432                            IsRepeat = false,
 27433                            IsSeries = false,
 27434                            IsVirtualItem = false,
 27435                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 27436                            Type = "PLACEHOLDER"
 27437                        });
 27438                });
 439
 27440            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27441                {
 27442                    b.Property<Guid>("Id")
 27443                        .ValueGeneratedOnAdd()
 27444                        .HasColumnType("TEXT");
 27445
 27446                    b.Property<byte[]>("Blurhash")
 27447                        .HasColumnType("BLOB");
 27448
 27449                    b.Property<DateTime?>("DateModified")
 27450                        .HasColumnType("TEXT");
 27451
 27452                    b.Property<int>("Height")
 27453                        .HasColumnType("INTEGER");
 27454
 27455                    b.Property<int>("ImageType")
 27456                        .HasColumnType("INTEGER");
 27457
 27458                    b.Property<Guid>("ItemId")
 27459                        .HasColumnType("TEXT");
 27460
 27461                    b.Property<string>("Path")
 27462                        .IsRequired()
 27463                        .HasColumnType("TEXT");
 27464
 27465                    b.Property<int>("Width")
 27466                        .HasColumnType("INTEGER");
 27467
 27468                    b.HasKey("Id");
 27469
 27470                    b.HasIndex("ItemId", "ImageType");
 27471
 27472                    b.ToTable("BaseItemImageInfos");
 27473
 27474                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27475                });
 476
 27477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27478                {
 27479                    b.Property<int>("Id")
 27480                        .HasColumnType("INTEGER");
 27481
 27482                    b.Property<Guid>("ItemId")
 27483                        .HasColumnType("TEXT");
 27484
 27485                    b.HasKey("Id", "ItemId");
 27486
 27487                    b.HasIndex("ItemId");
 27488
 27489                    b.ToTable("BaseItemMetadataFields");
 27490
 27491                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27492                });
 493
 27494            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27495                {
 27496                    b.Property<Guid>("ItemId")
 27497                        .HasColumnType("TEXT");
 27498
 27499                    b.Property<string>("ProviderId")
 27500                        .HasColumnType("TEXT");
 27501
 27502                    b.Property<string>("ProviderValue")
 27503                        .IsRequired()
 27504                        .HasColumnType("TEXT");
 27505
 27506                    b.HasKey("ItemId", "ProviderId");
 27507
 27508                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 27509
 27510                    b.ToTable("BaseItemProviders");
 27511
 27512                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27513                });
 514
 27515            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27516                {
 27517                    b.Property<int>("Id")
 27518                        .HasColumnType("INTEGER");
 27519
 27520                    b.Property<Guid>("ItemId")
 27521                        .HasColumnType("TEXT");
 27522
 27523                    b.HasKey("Id", "ItemId");
 27524
 27525                    b.HasIndex("ItemId");
 27526
 27527                    b.ToTable("BaseItemTrailerTypes");
 27528
 27529                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27530                });
 531
 27532            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27533                {
 27534                    b.Property<Guid>("ItemId")
 27535                        .HasColumnType("TEXT");
 27536
 27537                    b.Property<int>("ChapterIndex")
 27538                        .HasColumnType("INTEGER");
 27539
 27540                    b.Property<DateTime?>("ImageDateModified")
 27541                        .HasColumnType("TEXT");
 27542
 27543                    b.Property<string>("ImagePath")
 27544                        .HasColumnType("TEXT");
 27545
 27546                    b.Property<string>("Name")
 27547                        .HasColumnType("TEXT");
 27548
 27549                    b.Property<long>("StartPositionTicks")
 27550                        .HasColumnType("INTEGER");
 27551
 27552                    b.HasKey("ItemId", "ChapterIndex");
 27553
 27554                    b.ToTable("Chapters");
 27555
 27556                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27557                });
 558
 27559            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27560                {
 27561                    b.Property<int>("Id")
 27562                        .ValueGeneratedOnAdd()
 27563                        .HasColumnType("INTEGER");
 27564
 27565                    b.Property<string>("Client")
 27566                        .IsRequired()
 27567                        .HasMaxLength(32)
 27568                        .HasColumnType("TEXT");
 27569
 27570                    b.Property<Guid>("ItemId")
 27571                        .HasColumnType("TEXT");
 27572
 27573                    b.Property<string>("Key")
 27574                        .IsRequired()
 27575                        .HasColumnType("TEXT");
 27576
 27577                    b.Property<Guid>("UserId")
 27578                        .HasColumnType("TEXT");
 27579
 27580                    b.Property<string>("Value")
 27581                        .HasColumnType("TEXT");
 27582
 27583                    b.HasKey("Id");
 27584
 27585                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27586                        .IsUnique();
 27587
 27588                    b.ToTable("CustomItemDisplayPreferences");
 27589
 27590                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27591                });
 592
 27593            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27594                {
 27595                    b.Property<int>("Id")
 27596                        .ValueGeneratedOnAdd()
 27597                        .HasColumnType("INTEGER");
 27598
 27599                    b.Property<int>("ChromecastVersion")
 27600                        .HasColumnType("INTEGER");
 27601
 27602                    b.Property<string>("Client")
 27603                        .IsRequired()
 27604                        .HasMaxLength(32)
 27605                        .HasColumnType("TEXT");
 27606
 27607                    b.Property<string>("DashboardTheme")
 27608                        .HasMaxLength(32)
 27609                        .HasColumnType("TEXT");
 27610
 27611                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27612                        .HasColumnType("INTEGER");
 27613
 27614                    b.Property<int?>("IndexBy")
 27615                        .HasColumnType("INTEGER");
 27616
 27617                    b.Property<Guid>("ItemId")
 27618                        .HasColumnType("TEXT");
 27619
 27620                    b.Property<int>("ScrollDirection")
 27621                        .HasColumnType("INTEGER");
 27622
 27623                    b.Property<bool>("ShowBackdrop")
 27624                        .HasColumnType("INTEGER");
 27625
 27626                    b.Property<bool>("ShowSidebar")
 27627                        .HasColumnType("INTEGER");
 27628
 27629                    b.Property<int>("SkipBackwardLength")
 27630                        .HasColumnType("INTEGER");
 27631
 27632                    b.Property<int>("SkipForwardLength")
 27633                        .HasColumnType("INTEGER");
 27634
 27635                    b.Property<string>("TvHome")
 27636                        .HasMaxLength(32)
 27637                        .HasColumnType("TEXT");
 27638
 27639                    b.Property<Guid>("UserId")
 27640                        .HasColumnType("TEXT");
 27641
 27642                    b.HasKey("Id");
 27643
 27644                    b.HasIndex("UserId", "ItemId", "Client")
 27645                        .IsUnique();
 27646
 27647                    b.ToTable("DisplayPreferences");
 27648
 27649                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27650                });
 651
 27652            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27653                {
 27654                    b.Property<int>("Id")
 27655                        .ValueGeneratedOnAdd()
 27656                        .HasColumnType("INTEGER");
 27657
 27658                    b.Property<int>("DisplayPreferencesId")
 27659                        .HasColumnType("INTEGER");
 27660
 27661                    b.Property<int>("Order")
 27662                        .HasColumnType("INTEGER");
 27663
 27664                    b.Property<int>("Type")
 27665                        .HasColumnType("INTEGER");
 27666
 27667                    b.HasKey("Id");
 27668
 27669                    b.HasIndex("DisplayPreferencesId");
 27670
 27671                    b.ToTable("HomeSection");
 27672
 27673                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27674                });
 675
 27676            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27677                {
 27678                    b.Property<int>("Id")
 27679                        .ValueGeneratedOnAdd()
 27680                        .HasColumnType("INTEGER");
 27681
 27682                    b.Property<DateTime>("LastModified")
 27683                        .HasColumnType("TEXT");
 27684
 27685                    b.Property<string>("Path")
 27686                        .IsRequired()
 27687                        .HasMaxLength(512)
 27688                        .HasColumnType("TEXT");
 27689
 27690                    b.Property<Guid?>("UserId")
 27691                        .HasColumnType("TEXT");
 27692
 27693                    b.HasKey("Id");
 27694
 27695                    b.HasIndex("UserId")
 27696                        .IsUnique();
 27697
 27698                    b.ToTable("ImageInfos");
 27699
 27700                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27701                });
 702
 27703            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27704                {
 27705                    b.Property<int>("Id")
 27706                        .ValueGeneratedOnAdd()
 27707                        .HasColumnType("INTEGER");
 27708
 27709                    b.Property<string>("Client")
 27710                        .IsRequired()
 27711                        .HasMaxLength(32)
 27712                        .HasColumnType("TEXT");
 27713
 27714                    b.Property<int?>("IndexBy")
 27715                        .HasColumnType("INTEGER");
 27716
 27717                    b.Property<Guid>("ItemId")
 27718                        .HasColumnType("TEXT");
 27719
 27720                    b.Property<bool>("RememberIndexing")
 27721                        .HasColumnType("INTEGER");
 27722
 27723                    b.Property<bool>("RememberSorting")
 27724                        .HasColumnType("INTEGER");
 27725
 27726                    b.Property<string>("SortBy")
 27727                        .IsRequired()
 27728                        .HasMaxLength(64)
 27729                        .HasColumnType("TEXT");
 27730
 27731                    b.Property<int>("SortOrder")
 27732                        .HasColumnType("INTEGER");
 27733
 27734                    b.Property<Guid>("UserId")
 27735                        .HasColumnType("TEXT");
 27736
 27737                    b.Property<int>("ViewType")
 27738                        .HasColumnType("INTEGER");
 27739
 27740                    b.HasKey("Id");
 27741
 27742                    b.HasIndex("UserId");
 27743
 27744                    b.ToTable("ItemDisplayPreferences");
 27745
 27746                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27747                });
 748
 27749            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27750                {
 27751                    b.Property<Guid>("ItemValueId")
 27752                        .ValueGeneratedOnAdd()
 27753                        .HasColumnType("TEXT");
 27754
 27755                    b.Property<string>("CleanValue")
 27756                        .IsRequired()
 27757                        .HasColumnType("TEXT");
 27758
 27759                    b.Property<int>("Type")
 27760                        .HasColumnType("INTEGER");
 27761
 27762                    b.Property<string>("Value")
 27763                        .IsRequired()
 27764                        .HasColumnType("TEXT");
 27765
 27766                    b.HasKey("ItemValueId");
 27767
 27768                    b.HasIndex("Type", "CleanValue");
 27769
 27770                    b.HasIndex("Type", "Value")
 27771                        .IsUnique();
 27772
 27773                    b.ToTable("ItemValues");
 27774
 27775                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27776                });
 777
 27778            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27779                {
 27780                    b.Property<Guid>("ItemValueId")
 27781                        .HasColumnType("TEXT");
 27782
 27783                    b.Property<Guid>("ItemId")
 27784                        .HasColumnType("TEXT");
 27785
 27786                    b.HasKey("ItemValueId", "ItemId");
 27787
 27788                    b.HasIndex("ItemId");
 27789
 27790                    b.ToTable("ItemValuesMap");
 27791
 27792                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27793                });
 794
 27795            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27796                {
 27797                    b.Property<Guid>("ItemId")
 27798                        .HasColumnType("TEXT");
 27799
 27800                    b.PrimitiveCollection<string>("KeyframeTicks")
 27801                        .HasColumnType("TEXT");
 27802
 27803                    b.Property<long>("TotalDuration")
 27804                        .HasColumnType("INTEGER");
 27805
 27806                    b.HasKey("ItemId");
 27807
 27808                    b.ToTable("KeyframeData");
 27809
 27810                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27811                });
 812
 27813            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 27814                {
 27815                    b.Property<Guid>("ParentId")
 27816                        .HasColumnType("TEXT");
 27817
 27818                    b.Property<Guid>("ChildId")
 27819                        .HasColumnType("TEXT");
 27820
 27821                    b.Property<int>("ChildType")
 27822                        .HasColumnType("INTEGER");
 27823
 27824                    b.Property<int?>("SortOrder")
 27825                        .HasColumnType("INTEGER");
 27826
 27827                    b.HasKey("ParentId", "ChildId");
 27828
 27829                    b.HasIndex("ChildId", "ChildType");
 27830
 27831                    b.HasIndex("ParentId", "ChildType");
 27832
 27833                    b.HasIndex("ParentId", "SortOrder");
 27834
 27835                    b.ToTable("LinkedChildren", (string)null);
 27836
 27837                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27838                });
 839
 27840            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27841                {
 27842                    b.Property<Guid>("Id")
 27843                        .ValueGeneratedOnAdd()
 27844                        .HasColumnType("TEXT");
 27845
 27846                    b.Property<long>("EndTicks")
 27847                        .HasColumnType("INTEGER");
 27848
 27849                    b.Property<Guid>("ItemId")
 27850                        .HasColumnType("TEXT");
 27851
 27852                    b.Property<string>("SegmentProviderId")
 27853                        .IsRequired()
 27854                        .HasColumnType("TEXT");
 27855
 27856                    b.Property<long>("StartTicks")
 27857                        .HasColumnType("INTEGER");
 27858
 27859                    b.Property<int>("Type")
 27860                        .HasColumnType("INTEGER");
 27861
 27862                    b.HasKey("Id");
 27863
 27864                    b.ToTable("MediaSegments");
 27865
 27866                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27867                });
 868
 27869            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27870                {
 27871                    b.Property<Guid>("ItemId")
 27872                        .HasColumnType("TEXT");
 27873
 27874                    b.Property<int>("StreamIndex")
 27875                        .HasColumnType("INTEGER");
 27876
 27877                    b.Property<string>("AspectRatio")
 27878                        .HasColumnType("TEXT");
 27879
 27880                    b.Property<float?>("AverageFrameRate")
 27881                        .HasColumnType("REAL");
 27882
 27883                    b.Property<int?>("BitDepth")
 27884                        .HasColumnType("INTEGER");
 27885
 27886                    b.Property<int?>("BitRate")
 27887                        .HasColumnType("INTEGER");
 27888
 27889                    b.Property<int?>("BlPresentFlag")
 27890                        .HasColumnType("INTEGER");
 27891
 27892                    b.Property<string>("ChannelLayout")
 27893                        .HasColumnType("TEXT");
 27894
 27895                    b.Property<int?>("Channels")
 27896                        .HasColumnType("INTEGER");
 27897
 27898                    b.Property<string>("Codec")
 27899                        .HasColumnType("TEXT");
 27900
 27901                    b.Property<string>("CodecTag")
 27902                        .HasColumnType("TEXT");
 27903
 27904                    b.Property<string>("CodecTimeBase")
 27905                        .HasColumnType("TEXT");
 27906
 27907                    b.Property<string>("ColorPrimaries")
 27908                        .HasColumnType("TEXT");
 27909
 27910                    b.Property<string>("ColorSpace")
 27911                        .HasColumnType("TEXT");
 27912
 27913                    b.Property<string>("ColorTransfer")
 27914                        .HasColumnType("TEXT");
 27915
 27916                    b.Property<string>("Comment")
 27917                        .HasColumnType("TEXT");
 27918
 27919                    b.Property<int?>("DvBlSignalCompatibilityId")
 27920                        .HasColumnType("INTEGER");
 27921
 27922                    b.Property<int?>("DvLevel")
 27923                        .HasColumnType("INTEGER");
 27924
 27925                    b.Property<int?>("DvProfile")
 27926                        .HasColumnType("INTEGER");
 27927
 27928                    b.Property<int?>("DvVersionMajor")
 27929                        .HasColumnType("INTEGER");
 27930
 27931                    b.Property<int?>("DvVersionMinor")
 27932                        .HasColumnType("INTEGER");
 27933
 27934                    b.Property<int?>("ElPresentFlag")
 27935                        .HasColumnType("INTEGER");
 27936
 27937                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27938                        .HasColumnType("INTEGER");
 27939
 27940                    b.Property<int?>("Height")
 27941                        .HasColumnType("INTEGER");
 27942
 27943                    b.Property<bool?>("IsAnamorphic")
 27944                        .HasColumnType("INTEGER");
 27945
 27946                    b.Property<bool?>("IsAvc")
 27947                        .HasColumnType("INTEGER");
 27948
 27949                    b.Property<bool>("IsDefault")
 27950                        .HasColumnType("INTEGER");
 27951
 27952                    b.Property<bool>("IsExternal")
 27953                        .HasColumnType("INTEGER");
 27954
 27955                    b.Property<bool>("IsForced")
 27956                        .HasColumnType("INTEGER");
 27957
 27958                    b.Property<bool?>("IsHearingImpaired")
 27959                        .HasColumnType("INTEGER");
 27960
 27961                    b.Property<bool?>("IsInterlaced")
 27962                        .HasColumnType("INTEGER");
 27963
 27964                    b.Property<bool>("IsOriginal")
 27965                        .HasColumnType("INTEGER");
 27966
 27967                    b.Property<string>("KeyFrames")
 27968                        .HasColumnType("TEXT");
 27969
 27970                    b.Property<string>("Language")
 27971                        .HasColumnType("TEXT");
 27972
 27973                    b.Property<float?>("Level")
 27974                        .HasColumnType("REAL");
 27975
 27976                    b.Property<string>("NalLengthSize")
 27977                        .HasColumnType("TEXT");
 27978
 27979                    b.Property<string>("Path")
 27980                        .HasColumnType("TEXT");
 27981
 27982                    b.Property<string>("PixelFormat")
 27983                        .HasColumnType("TEXT");
 27984
 27985                    b.Property<string>("Profile")
 27986                        .HasColumnType("TEXT");
 27987
 27988                    b.Property<float?>("RealFrameRate")
 27989                        .HasColumnType("REAL");
 27990
 27991                    b.Property<int?>("RefFrames")
 27992                        .HasColumnType("INTEGER");
 27993
 27994                    b.Property<int?>("Rotation")
 27995                        .HasColumnType("INTEGER");
 27996
 27997                    b.Property<int?>("RpuPresentFlag")
 27998                        .HasColumnType("INTEGER");
 27999
 271000                    b.Property<int?>("SampleRate")
 271001                        .HasColumnType("INTEGER");
 271002
 271003                    b.Property<int>("StreamType")
 271004                        .HasColumnType("INTEGER");
 271005
 271006                    b.Property<string>("TimeBase")
 271007                        .HasColumnType("TEXT");
 271008
 271009                    b.Property<string>("Title")
 271010                        .HasColumnType("TEXT");
 271011
 271012                    b.Property<int?>("Width")
 271013                        .HasColumnType("INTEGER");
 271014
 271015                    b.HasKey("ItemId", "StreamIndex");
 271016
 271017                    b.ToTable("MediaStreamInfos");
 271018
 271019                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271020                });
 1021
 271022            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271023                {
 271024                    b.Property<Guid>("Id")
 271025                        .ValueGeneratedOnAdd()
 271026                        .HasColumnType("TEXT");
 271027
 271028                    b.Property<string>("Name")
 271029                        .IsRequired()
 271030                        .HasColumnType("TEXT");
 271031
 271032                    b.Property<string>("PersonType")
 271033                        .HasColumnType("TEXT");
 271034
 271035                    b.HasKey("Id");
 271036
 271037                    b.HasIndex("Name");
 271038
 271039                    b.ToTable("Peoples");
 271040
 271041                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271042                });
 1043
 271044            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271045                {
 271046                    b.Property<Guid>("ItemId")
 271047                        .HasColumnType("TEXT");
 271048
 271049                    b.Property<Guid>("PeopleId")
 271050                        .HasColumnType("TEXT");
 271051
 271052                    b.Property<string>("Role")
 271053                        .HasColumnType("TEXT");
 271054
 271055                    b.Property<int?>("ListOrder")
 271056                        .HasColumnType("INTEGER");
 271057
 271058                    b.Property<int?>("SortOrder")
 271059                        .HasColumnType("INTEGER");
 271060
 271061                    b.HasKey("ItemId", "PeopleId", "Role");
 271062
 271063                    b.HasIndex("PeopleId");
 271064
 271065                    b.HasIndex("ItemId", "ListOrder");
 271066
 271067                    b.HasIndex("ItemId", "SortOrder");
 271068
 271069                    b.ToTable("PeopleBaseItemMap");
 271070
 271071                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271072                });
 1073
 271074            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271075                {
 271076                    b.Property<int>("Id")
 271077                        .ValueGeneratedOnAdd()
 271078                        .HasColumnType("INTEGER");
 271079
 271080                    b.Property<int>("Kind")
 271081                        .HasColumnType("INTEGER");
 271082
 271083                    b.Property<Guid?>("Permission_Permissions_Guid")
 271084                        .HasColumnType("TEXT");
 271085
 271086                    b.Property<uint>("RowVersion")
 271087                        .IsConcurrencyToken()
 271088                        .HasColumnType("INTEGER");
 271089
 271090                    b.Property<Guid?>("UserId")
 271091                        .HasColumnType("TEXT");
 271092
 271093                    b.Property<bool>("Value")
 271094                        .HasColumnType("INTEGER");
 271095
 271096                    b.HasKey("Id");
 271097
 271098                    b.HasIndex("UserId", "Kind")
 271099                        .IsUnique()
 271100                        .HasFilter("[UserId] IS NOT NULL");
 271101
 271102                    b.ToTable("Permissions");
 271103
 271104                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271105                });
 1106
 271107            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271108                {
 271109                    b.Property<int>("Id")
 271110                        .ValueGeneratedOnAdd()
 271111                        .HasColumnType("INTEGER");
 271112
 271113                    b.Property<int>("Kind")
 271114                        .HasColumnType("INTEGER");
 271115
 271116                    b.Property<Guid?>("Preference_Preferences_Guid")
 271117                        .HasColumnType("TEXT");
 271118
 271119                    b.Property<uint>("RowVersion")
 271120                        .IsConcurrencyToken()
 271121                        .HasColumnType("INTEGER");
 271122
 271123                    b.Property<Guid?>("UserId")
 271124                        .HasColumnType("TEXT");
 271125
 271126                    b.Property<string>("Value")
 271127                        .IsRequired()
 271128                        .HasMaxLength(65535)
 271129                        .HasColumnType("TEXT");
 271130
 271131                    b.HasKey("Id");
 271132
 271133                    b.HasIndex("UserId", "Kind")
 271134                        .IsUnique()
 271135                        .HasFilter("[UserId] IS NOT NULL");
 271136
 271137                    b.ToTable("Preferences");
 271138
 271139                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271140                });
 1141
 271142            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271143                {
 271144                    b.Property<int>("Id")
 271145                        .ValueGeneratedOnAdd()
 271146                        .HasColumnType("INTEGER");
 271147
 271148                    b.Property<string>("AccessToken")
 271149                        .IsRequired()
 271150                        .HasColumnType("TEXT");
 271151
 271152                    b.Property<DateTime>("DateCreated")
 271153                        .HasColumnType("TEXT");
 271154
 271155                    b.Property<DateTime>("DateLastActivity")
 271156                        .HasColumnType("TEXT");
 271157
 271158                    b.Property<string>("Name")
 271159                        .IsRequired()
 271160                        .HasMaxLength(64)
 271161                        .HasColumnType("TEXT");
 271162
 271163                    b.HasKey("Id");
 271164
 271165                    b.HasIndex("AccessToken")
 271166                        .IsUnique();
 271167
 271168                    b.ToTable("ApiKeys");
 271169
 271170                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271171                });
 1172
 271173            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271174                {
 271175                    b.Property<int>("Id")
 271176                        .ValueGeneratedOnAdd()
 271177                        .HasColumnType("INTEGER");
 271178
 271179                    b.Property<string>("AccessToken")
 271180                        .IsRequired()
 271181                        .HasColumnType("TEXT");
 271182
 271183                    b.Property<string>("AppName")
 271184                        .IsRequired()
 271185                        .HasMaxLength(64)
 271186                        .HasColumnType("TEXT");
 271187
 271188                    b.Property<string>("AppVersion")
 271189                        .IsRequired()
 271190                        .HasMaxLength(32)
 271191                        .HasColumnType("TEXT");
 271192
 271193                    b.Property<DateTime>("DateCreated")
 271194                        .HasColumnType("TEXT");
 271195
 271196                    b.Property<DateTime>("DateLastActivity")
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.Property<DateTime>("DateModified")
 271200                        .HasColumnType("TEXT");
 271201
 271202                    b.Property<string>("DeviceId")
 271203                        .IsRequired()
 271204                        .HasMaxLength(256)
 271205                        .HasColumnType("TEXT");
 271206
 271207                    b.Property<string>("DeviceName")
 271208                        .IsRequired()
 271209                        .HasMaxLength(64)
 271210                        .HasColumnType("TEXT");
 271211
 271212                    b.Property<bool>("IsActive")
 271213                        .HasColumnType("INTEGER");
 271214
 271215                    b.Property<Guid>("UserId")
 271216                        .HasColumnType("TEXT");
 271217
 271218                    b.HasKey("Id");
 271219
 271220                    b.HasIndex("AccessToken", "DateLastActivity");
 271221
 271222                    b.HasIndex("DeviceId", "DateLastActivity");
 271223
 271224                    b.HasIndex("UserId", "DeviceId");
 271225
 271226                    b.ToTable("Devices");
 271227
 271228                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271229                });
 1230
 271231            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271232                {
 271233                    b.Property<int>("Id")
 271234                        .ValueGeneratedOnAdd()
 271235                        .HasColumnType("INTEGER");
 271236
 271237                    b.Property<string>("CustomName")
 271238                        .HasColumnType("TEXT");
 271239
 271240                    b.Property<string>("DeviceId")
 271241                        .IsRequired()
 271242                        .HasColumnType("TEXT");
 271243
 271244                    b.HasKey("Id");
 271245
 271246                    b.HasIndex("DeviceId")
 271247                        .IsUnique();
 271248
 271249                    b.ToTable("DeviceOptions");
 271250
 271251                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271252                });
 1253
 271254            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271255                {
 271256                    b.Property<Guid>("ItemId")
 271257                        .HasColumnType("TEXT");
 271258
 271259                    b.Property<int>("Width")
 271260                        .HasColumnType("INTEGER");
 271261
 271262                    b.Property<int>("Bandwidth")
 271263                        .HasColumnType("INTEGER");
 271264
 271265                    b.Property<int>("Height")
 271266                        .HasColumnType("INTEGER");
 271267
 271268                    b.Property<int>("Interval")
 271269                        .HasColumnType("INTEGER");
 271270
 271271                    b.Property<int>("ThumbnailCount")
 271272                        .HasColumnType("INTEGER");
 271273
 271274                    b.Property<int>("TileHeight")
 271275                        .HasColumnType("INTEGER");
 271276
 271277                    b.Property<int>("TileWidth")
 271278                        .HasColumnType("INTEGER");
 271279
 271280                    b.HasKey("ItemId", "Width");
 271281
 271282                    b.ToTable("TrickplayInfos");
 271283
 271284                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271285                });
 1286
 271287            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271288                {
 271289                    b.Property<Guid>("Id")
 271290                        .ValueGeneratedOnAdd()
 271291                        .HasColumnType("TEXT");
 271292
 271293                    b.Property<string>("AudioLanguagePreference")
 271294                        .HasMaxLength(255)
 271295                        .HasColumnType("TEXT");
 271296
 271297                    b.Property<string>("AuthenticationProviderId")
 271298                        .IsRequired()
 271299                        .HasMaxLength(255)
 271300                        .HasColumnType("TEXT");
 271301
 271302                    b.Property<string>("CastReceiverId")
 271303                        .HasMaxLength(32)
 271304                        .HasColumnType("TEXT");
 271305
 271306                    b.Property<bool>("DisplayCollectionsView")
 271307                        .HasColumnType("INTEGER");
 271308
 271309                    b.Property<bool>("DisplayMissingEpisodes")
 271310                        .HasColumnType("INTEGER");
 271311
 271312                    b.Property<bool>("EnableAutoLogin")
 271313                        .HasColumnType("INTEGER");
 271314
 271315                    b.Property<bool>("EnableLocalPassword")
 271316                        .HasColumnType("INTEGER");
 271317
 271318                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271319                        .HasColumnType("INTEGER");
 271320
 271321                    b.Property<bool>("EnableUserPreferenceAccess")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<bool>("HidePlayedInLatest")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<long>("InternalId")
 271328                        .HasColumnType("INTEGER");
 271329
 271330                    b.Property<int>("InvalidLoginAttemptCount")
 271331                        .HasColumnType("INTEGER");
 271332
 271333                    b.Property<DateTime?>("LastActivityDate")
 271334                        .HasColumnType("TEXT");
 271335
 271336                    b.Property<DateTime?>("LastLoginDate")
 271337                        .HasColumnType("TEXT");
 271338
 271339                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271340                        .HasColumnType("INTEGER");
 271341
 271342                    b.Property<int>("MaxActiveSessions")
 271343                        .HasColumnType("INTEGER");
 271344
 271345                    b.Property<int?>("MaxParentalRatingScore")
 271346                        .HasColumnType("INTEGER");
 271347
 271348                    b.Property<int?>("MaxParentalRatingSubScore")
 271349                        .HasColumnType("INTEGER");
 271350
 271351                    b.Property<bool>("MustUpdatePassword")
 271352                        .HasColumnType("INTEGER");
 271353
 271354                    b.Property<string>("NormalizedUsername")
 271355                        .IsRequired()
 271356                        .HasMaxLength(255)
 271357                        .HasColumnType("TEXT");
 271358
 271359                    b.Property<string>("Password")
 271360                        .HasMaxLength(65535)
 271361                        .HasColumnType("TEXT");
 271362
 271363                    b.Property<string>("PasswordResetProviderId")
 271364                        .IsRequired()
 271365                        .HasMaxLength(255)
 271366                        .HasColumnType("TEXT");
 271367
 271368                    b.Property<bool>("PlayDefaultAudioTrack")
 271369                        .HasColumnType("INTEGER");
 271370
 271371                    b.Property<bool>("RememberAudioSelections")
 271372                        .HasColumnType("INTEGER");
 271373
 271374                    b.Property<bool>("RememberSubtitleSelections")
 271375                        .HasColumnType("INTEGER");
 271376
 271377                    b.Property<int?>("RemoteClientBitrateLimit")
 271378                        .HasColumnType("INTEGER");
 271379
 271380                    b.Property<uint>("RowVersion")
 271381                        .IsConcurrencyToken()
 271382                        .HasColumnType("INTEGER");
 271383
 271384                    b.Property<string>("SubtitleLanguagePreference")
 271385                        .HasMaxLength(255)
 271386                        .HasColumnType("TEXT");
 271387
 271388                    b.Property<int>("SubtitleMode")
 271389                        .HasColumnType("INTEGER");
 271390
 271391                    b.Property<int>("SyncPlayAccess")
 271392                        .HasColumnType("INTEGER");
 271393
 271394                    b.Property<string>("Username")
 271395                        .IsRequired()
 271396                        .HasMaxLength(255)
 271397                        .HasColumnType("TEXT");
 271398
 271399                    b.HasKey("Id");
 271400
 271401                    b.HasIndex("Username")
 271402                        .IsUnique();
 271403
 271404                    b.ToTable("Users");
 271405
 271406                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271407                });
 1408
 271409            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271410                {
 271411                    b.Property<Guid>("ItemId")
 271412                        .HasColumnType("TEXT");
 271413
 271414                    b.Property<Guid>("UserId")
 271415                        .HasColumnType("TEXT");
 271416
 271417                    b.Property<string>("CustomDataKey")
 271418                        .HasColumnType("TEXT");
 271419
 271420                    b.Property<int?>("AudioStreamIndex")
 271421                        .HasColumnType("INTEGER");
 271422
 271423                    b.Property<bool>("IsFavorite")
 271424                        .HasColumnType("INTEGER");
 271425
 271426                    b.Property<DateTime?>("LastPlayedDate")
 271427                        .HasColumnType("TEXT");
 271428
 271429                    b.Property<bool?>("Likes")
 271430                        .HasColumnType("INTEGER");
 271431
 271432                    b.Property<int>("PlayCount")
 271433                        .HasColumnType("INTEGER");
 271434
 271435                    b.Property<long>("PlaybackPositionTicks")
 271436                        .HasColumnType("INTEGER");
 271437
 271438                    b.Property<bool>("Played")
 271439                        .HasColumnType("INTEGER");
 271440
 271441                    b.Property<double?>("Rating")
 271442                        .HasColumnType("REAL");
 271443
 271444                    b.Property<DateTime?>("RetentionDate")
 271445                        .HasColumnType("TEXT");
 271446
 271447                    b.Property<int?>("SubtitleStreamIndex")
 271448                        .HasColumnType("INTEGER");
 271449
 271450                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271451
 271452                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271453
 271454                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271455
 271456                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271457
 271458                    b.HasIndex("ItemId", "UserId", "Played");
 271459
 271460                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 271461
 271462                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 271463
 271464                    b.HasIndex("UserId", "Played", "ItemId");
 271465
 271466                    b.ToTable("UserData");
 271467
 271468                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271469                });
 1470
 271471            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271472                {
 271473                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271474                        .WithMany("AccessSchedules")
 271475                        .HasForeignKey("UserId")
 271476                        .OnDelete(DeleteBehavior.Cascade)
 271477                        .IsRequired();
 271478                });
 1479
 271480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271481                {
 271482                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271483                        .WithMany("Parents")
 271484                        .HasForeignKey("ItemId")
 271485                        .OnDelete(DeleteBehavior.Cascade)
 271486                        .IsRequired();
 271487
 271488                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271489                        .WithMany("Children")
 271490                        .HasForeignKey("ParentItemId")
 271491                        .OnDelete(DeleteBehavior.Cascade)
 271492                        .IsRequired();
 271493
 271494                    b.Navigation("Item");
 271495
 271496                    b.Navigation("ParentItem");
 271497                });
 1498
 271499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271500                {
 271501                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271502                        .WithMany()
 271503                        .HasForeignKey("ItemId")
 271504                        .OnDelete(DeleteBehavior.Cascade)
 271505                        .IsRequired();
 271506
 271507                    b.Navigation("Item");
 271508                });
 1509
 271510            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271511                {
 271512                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 271513                        .WithMany("Extras")
 271514                        .HasForeignKey("OwnerId")
 271515                        .OnDelete(DeleteBehavior.NoAction);
 271516
 271517                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 271518                        .WithMany("DirectChildren")
 271519                        .HasForeignKey("ParentId")
 271520                        .OnDelete(DeleteBehavior.Cascade);
 271521
 271522                    b.Navigation("DirectParent");
 271523
 271524                    b.Navigation("Owner");
 271525                });
 1526
 271527            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271528                {
 271529                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271530                        .WithMany("Images")
 271531                        .HasForeignKey("ItemId")
 271532                        .OnDelete(DeleteBehavior.Cascade)
 271533                        .IsRequired();
 271534
 271535                    b.Navigation("Item");
 271536                });
 1537
 271538            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271539                {
 271540                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271541                        .WithMany("LockedFields")
 271542                        .HasForeignKey("ItemId")
 271543                        .OnDelete(DeleteBehavior.Cascade)
 271544                        .IsRequired();
 271545
 271546                    b.Navigation("Item");
 271547                });
 1548
 271549            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271550                {
 271551                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271552                        .WithMany("Provider")
 271553                        .HasForeignKey("ItemId")
 271554                        .OnDelete(DeleteBehavior.Cascade)
 271555                        .IsRequired();
 271556
 271557                    b.Navigation("Item");
 271558                });
 1559
 271560            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271561                {
 271562                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271563                        .WithMany("TrailerTypes")
 271564                        .HasForeignKey("ItemId")
 271565                        .OnDelete(DeleteBehavior.Cascade)
 271566                        .IsRequired();
 271567
 271568                    b.Navigation("Item");
 271569                });
 1570
 271571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271572                {
 271573                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271574                        .WithMany("Chapters")
 271575                        .HasForeignKey("ItemId")
 271576                        .OnDelete(DeleteBehavior.Cascade)
 271577                        .IsRequired();
 271578
 271579                    b.Navigation("Item");
 271580                });
 1581
 271582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271583                {
 271584                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271585                        .WithMany("DisplayPreferences")
 271586                        .HasForeignKey("UserId")
 271587                        .OnDelete(DeleteBehavior.Cascade)
 271588                        .IsRequired();
 271589                });
 1590
 271591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271592                {
 271593                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271594                        .WithMany("HomeSections")
 271595                        .HasForeignKey("DisplayPreferencesId")
 271596                        .OnDelete(DeleteBehavior.Cascade)
 271597                        .IsRequired();
 271598                });
 1599
 271600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271601                {
 271602                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271603                        .WithOne("ProfileImage")
 271604                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271605                        .OnDelete(DeleteBehavior.Cascade);
 271606                });
 1607
 271608            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271609                {
 271610                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271611                        .WithMany("ItemDisplayPreferences")
 271612                        .HasForeignKey("UserId")
 271613                        .OnDelete(DeleteBehavior.Cascade)
 271614                        .IsRequired();
 271615                });
 1616
 271617            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271618                {
 271619                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271620                        .WithMany("ItemValues")
 271621                        .HasForeignKey("ItemId")
 271622                        .OnDelete(DeleteBehavior.Cascade)
 271623                        .IsRequired();
 271624
 271625                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271626                        .WithMany("BaseItemsMap")
 271627                        .HasForeignKey("ItemValueId")
 271628                        .OnDelete(DeleteBehavior.Cascade)
 271629                        .IsRequired();
 271630
 271631                    b.Navigation("Item");
 271632
 271633                    b.Navigation("ItemValue");
 271634                });
 1635
 271636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271637                {
 271638                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271639                        .WithMany()
 271640                        .HasForeignKey("ItemId")
 271641                        .OnDelete(DeleteBehavior.Cascade)
 271642                        .IsRequired();
 271643
 271644                    b.Navigation("Item");
 271645                });
 1646
 271647            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 271648                {
 271649                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 271650                        .WithMany("LinkedChildOfEntities")
 271651                        .HasForeignKey("ChildId")
 271652                        .OnDelete(DeleteBehavior.NoAction)
 271653                        .IsRequired();
 271654
 271655                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 271656                        .WithMany("LinkedChildEntities")
 271657                        .HasForeignKey("ParentId")
 271658                        .OnDelete(DeleteBehavior.NoAction)
 271659                        .IsRequired();
 271660
 271661                    b.Navigation("Child");
 271662
 271663                    b.Navigation("Parent");
 271664                });
 1665
 271666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271667                {
 271668                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271669                        .WithMany("MediaStreams")
 271670                        .HasForeignKey("ItemId")
 271671                        .OnDelete(DeleteBehavior.Cascade)
 271672                        .IsRequired();
 271673
 271674                    b.Navigation("Item");
 271675                });
 1676
 271677            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271678                {
 271679                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271680                        .WithMany("Peoples")
 271681                        .HasForeignKey("ItemId")
 271682                        .OnDelete(DeleteBehavior.Cascade)
 271683                        .IsRequired();
 271684
 271685                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271686                        .WithMany("BaseItems")
 271687                        .HasForeignKey("PeopleId")
 271688                        .OnDelete(DeleteBehavior.Cascade)
 271689                        .IsRequired();
 271690
 271691                    b.Navigation("Item");
 271692
 271693                    b.Navigation("People");
 271694                });
 1695
 271696            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271697                {
 271698                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271699                        .WithMany("Permissions")
 271700                        .HasForeignKey("UserId")
 271701                        .OnDelete(DeleteBehavior.Cascade);
 271702                });
 1703
 271704            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271705                {
 271706                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271707                        .WithMany("Preferences")
 271708                        .HasForeignKey("UserId")
 271709                        .OnDelete(DeleteBehavior.Cascade);
 271710                });
 1711
 271712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271713                {
 271714                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271715                        .WithMany()
 271716                        .HasForeignKey("UserId")
 271717                        .OnDelete(DeleteBehavior.Cascade)
 271718                        .IsRequired();
 271719
 271720                    b.Navigation("User");
 271721                });
 1722
 271723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271724                {
 271725                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271726                        .WithMany("UserData")
 271727                        .HasForeignKey("ItemId")
 271728                        .OnDelete(DeleteBehavior.Cascade)
 271729                        .IsRequired();
 271730
 271731                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271732                        .WithMany()
 271733                        .HasForeignKey("UserId")
 271734                        .OnDelete(DeleteBehavior.Cascade)
 271735                        .IsRequired();
 271736
 271737                    b.Navigation("Item");
 271738
 271739                    b.Navigation("User");
 271740                });
 1741
 271742            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271743                {
 271744                    b.Navigation("Chapters");
 271745
 271746                    b.Navigation("Children");
 271747
 271748                    b.Navigation("DirectChildren");
 271749
 271750                    b.Navigation("Extras");
 271751
 271752                    b.Navigation("Images");
 271753
 271754                    b.Navigation("ItemValues");
 271755
 271756                    b.Navigation("LinkedChildEntities");
 271757
 271758                    b.Navigation("LinkedChildOfEntities");
 271759
 271760                    b.Navigation("LockedFields");
 271761
 271762                    b.Navigation("MediaStreams");
 271763
 271764                    b.Navigation("Parents");
 271765
 271766                    b.Navigation("Peoples");
 271767
 271768                    b.Navigation("Provider");
 271769
 271770                    b.Navigation("TrailerTypes");
 271771
 271772                    b.Navigation("UserData");
 271773                });
 1774
 271775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271776                {
 271777                    b.Navigation("HomeSections");
 271778                });
 1779
 271780            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271781                {
 271782                    b.Navigation("BaseItemsMap");
 271783                });
 1784
 271785            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271786                {
 271787                    b.Navigation("BaseItems");
 271788                });
 1789
 271790            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271791                {
 271792                    b.Navigation("AccessSchedules");
 271793
 271794                    b.Navigation("DisplayPreferences");
 271795
 271796                    b.Navigation("ItemDisplayPreferences");
 271797
 271798                    b.Navigation("Permissions");
 271799
 271800                    b.Navigation("Preferences");
 271801
 271802                    b.Navigation("ProfileImage");
 271803                });
 1804#pragma warning restore 612, 618
 271805        }
 1806    }
 1807}