< Summary - Jellyfin

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

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260308123920_AddTypeCleanNameIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddTypeCleanNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.CreateIndex(
 2714                name: "IX_BaseItems_Type_CleanName",
 2715                table: "BaseItems",
 2716                columns: new[] { "Type", "CleanName" });
 2717        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_BaseItems_Type_CleanName",
 024                table: "BaseItems");
 025        }
 26    }
 27}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260308123920_AddTypeCleanNameIndex.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260308123920_AddTypeCleanNameIndex")]
 15    partial class AddTypeCleanNameIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2721            modelBuilder.HasAnnotation("ProductVersion", "10.0.3");
 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("Type", "TopParentId", "Id");
 27392
 27393                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27394
 27395                    b.HasIndex("Type", "TopParentId", "SortName");
 27396
 27397                    b.HasIndex("Type", "TopParentId", "StartDate");
 27398
 27399                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27400
 27401                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 27402
 27403                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 27404
 27405                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 27406
 27407                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27408
 27409                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 27410
 27411                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27412
 27413                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27414
 27415                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27416
 27417                    b.ToTable("BaseItems");
 27418
 27419                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27420
 27421                    b.HasData(
 27422                        new
 27423                        {
 27424                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 27425                            IsFolder = false,
 27426                            IsInMixedFolder = false,
 27427                            IsLocked = false,
 27428                            IsMovie = false,
 27429                            IsRepeat = false,
 27430                            IsSeries = false,
 27431                            IsVirtualItem = false,
 27432                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 27433                            Type = "PLACEHOLDER"
 27434                        });
 27435                });
 436
 27437            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27438                {
 27439                    b.Property<Guid>("Id")
 27440                        .ValueGeneratedOnAdd()
 27441                        .HasColumnType("TEXT");
 27442
 27443                    b.Property<byte[]>("Blurhash")
 27444                        .HasColumnType("BLOB");
 27445
 27446                    b.Property<DateTime?>("DateModified")
 27447                        .HasColumnType("TEXT");
 27448
 27449                    b.Property<int>("Height")
 27450                        .HasColumnType("INTEGER");
 27451
 27452                    b.Property<int>("ImageType")
 27453                        .HasColumnType("INTEGER");
 27454
 27455                    b.Property<Guid>("ItemId")
 27456                        .HasColumnType("TEXT");
 27457
 27458                    b.Property<string>("Path")
 27459                        .IsRequired()
 27460                        .HasColumnType("TEXT");
 27461
 27462                    b.Property<int>("Width")
 27463                        .HasColumnType("INTEGER");
 27464
 27465                    b.HasKey("Id");
 27466
 27467                    b.HasIndex("ItemId", "ImageType");
 27468
 27469                    b.ToTable("BaseItemImageInfos");
 27470
 27471                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27472                });
 473
 27474            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27475                {
 27476                    b.Property<int>("Id")
 27477                        .HasColumnType("INTEGER");
 27478
 27479                    b.Property<Guid>("ItemId")
 27480                        .HasColumnType("TEXT");
 27481
 27482                    b.HasKey("Id", "ItemId");
 27483
 27484                    b.HasIndex("ItemId");
 27485
 27486                    b.ToTable("BaseItemMetadataFields");
 27487
 27488                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27489                });
 490
 27491            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27492                {
 27493                    b.Property<Guid>("ItemId")
 27494                        .HasColumnType("TEXT");
 27495
 27496                    b.Property<string>("ProviderId")
 27497                        .HasColumnType("TEXT");
 27498
 27499                    b.Property<string>("ProviderValue")
 27500                        .IsRequired()
 27501                        .HasColumnType("TEXT");
 27502
 27503                    b.HasKey("ItemId", "ProviderId");
 27504
 27505                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 27506
 27507                    b.ToTable("BaseItemProviders");
 27508
 27509                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27510                });
 511
 27512            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27513                {
 27514                    b.Property<int>("Id")
 27515                        .HasColumnType("INTEGER");
 27516
 27517                    b.Property<Guid>("ItemId")
 27518                        .HasColumnType("TEXT");
 27519
 27520                    b.HasKey("Id", "ItemId");
 27521
 27522                    b.HasIndex("ItemId");
 27523
 27524                    b.ToTable("BaseItemTrailerTypes");
 27525
 27526                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27527                });
 528
 27529            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27530                {
 27531                    b.Property<Guid>("ItemId")
 27532                        .HasColumnType("TEXT");
 27533
 27534                    b.Property<int>("ChapterIndex")
 27535                        .HasColumnType("INTEGER");
 27536
 27537                    b.Property<DateTime?>("ImageDateModified")
 27538                        .HasColumnType("TEXT");
 27539
 27540                    b.Property<string>("ImagePath")
 27541                        .HasColumnType("TEXT");
 27542
 27543                    b.Property<string>("Name")
 27544                        .HasColumnType("TEXT");
 27545
 27546                    b.Property<long>("StartPositionTicks")
 27547                        .HasColumnType("INTEGER");
 27548
 27549                    b.HasKey("ItemId", "ChapterIndex");
 27550
 27551                    b.ToTable("Chapters");
 27552
 27553                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27554                });
 555
 27556            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27557                {
 27558                    b.Property<int>("Id")
 27559                        .ValueGeneratedOnAdd()
 27560                        .HasColumnType("INTEGER");
 27561
 27562                    b.Property<string>("Client")
 27563                        .IsRequired()
 27564                        .HasMaxLength(32)
 27565                        .HasColumnType("TEXT");
 27566
 27567                    b.Property<Guid>("ItemId")
 27568                        .HasColumnType("TEXT");
 27569
 27570                    b.Property<string>("Key")
 27571                        .IsRequired()
 27572                        .HasColumnType("TEXT");
 27573
 27574                    b.Property<Guid>("UserId")
 27575                        .HasColumnType("TEXT");
 27576
 27577                    b.Property<string>("Value")
 27578                        .HasColumnType("TEXT");
 27579
 27580                    b.HasKey("Id");
 27581
 27582                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27583                        .IsUnique();
 27584
 27585                    b.ToTable("CustomItemDisplayPreferences");
 27586
 27587                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27588                });
 589
 27590            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27591                {
 27592                    b.Property<int>("Id")
 27593                        .ValueGeneratedOnAdd()
 27594                        .HasColumnType("INTEGER");
 27595
 27596                    b.Property<int>("ChromecastVersion")
 27597                        .HasColumnType("INTEGER");
 27598
 27599                    b.Property<string>("Client")
 27600                        .IsRequired()
 27601                        .HasMaxLength(32)
 27602                        .HasColumnType("TEXT");
 27603
 27604                    b.Property<string>("DashboardTheme")
 27605                        .HasMaxLength(32)
 27606                        .HasColumnType("TEXT");
 27607
 27608                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27609                        .HasColumnType("INTEGER");
 27610
 27611                    b.Property<int?>("IndexBy")
 27612                        .HasColumnType("INTEGER");
 27613
 27614                    b.Property<Guid>("ItemId")
 27615                        .HasColumnType("TEXT");
 27616
 27617                    b.Property<int>("ScrollDirection")
 27618                        .HasColumnType("INTEGER");
 27619
 27620                    b.Property<bool>("ShowBackdrop")
 27621                        .HasColumnType("INTEGER");
 27622
 27623                    b.Property<bool>("ShowSidebar")
 27624                        .HasColumnType("INTEGER");
 27625
 27626                    b.Property<int>("SkipBackwardLength")
 27627                        .HasColumnType("INTEGER");
 27628
 27629                    b.Property<int>("SkipForwardLength")
 27630                        .HasColumnType("INTEGER");
 27631
 27632                    b.Property<string>("TvHome")
 27633                        .HasMaxLength(32)
 27634                        .HasColumnType("TEXT");
 27635
 27636                    b.Property<Guid>("UserId")
 27637                        .HasColumnType("TEXT");
 27638
 27639                    b.HasKey("Id");
 27640
 27641                    b.HasIndex("UserId", "ItemId", "Client")
 27642                        .IsUnique();
 27643
 27644                    b.ToTable("DisplayPreferences");
 27645
 27646                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27647                });
 648
 27649            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27650                {
 27651                    b.Property<int>("Id")
 27652                        .ValueGeneratedOnAdd()
 27653                        .HasColumnType("INTEGER");
 27654
 27655                    b.Property<int>("DisplayPreferencesId")
 27656                        .HasColumnType("INTEGER");
 27657
 27658                    b.Property<int>("Order")
 27659                        .HasColumnType("INTEGER");
 27660
 27661                    b.Property<int>("Type")
 27662                        .HasColumnType("INTEGER");
 27663
 27664                    b.HasKey("Id");
 27665
 27666                    b.HasIndex("DisplayPreferencesId");
 27667
 27668                    b.ToTable("HomeSection");
 27669
 27670                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27671                });
 672
 27673            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27674                {
 27675                    b.Property<int>("Id")
 27676                        .ValueGeneratedOnAdd()
 27677                        .HasColumnType("INTEGER");
 27678
 27679                    b.Property<DateTime>("LastModified")
 27680                        .HasColumnType("TEXT");
 27681
 27682                    b.Property<string>("Path")
 27683                        .IsRequired()
 27684                        .HasMaxLength(512)
 27685                        .HasColumnType("TEXT");
 27686
 27687                    b.Property<Guid?>("UserId")
 27688                        .HasColumnType("TEXT");
 27689
 27690                    b.HasKey("Id");
 27691
 27692                    b.HasIndex("UserId")
 27693                        .IsUnique();
 27694
 27695                    b.ToTable("ImageInfos");
 27696
 27697                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27698                });
 699
 27700            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27701                {
 27702                    b.Property<int>("Id")
 27703                        .ValueGeneratedOnAdd()
 27704                        .HasColumnType("INTEGER");
 27705
 27706                    b.Property<string>("Client")
 27707                        .IsRequired()
 27708                        .HasMaxLength(32)
 27709                        .HasColumnType("TEXT");
 27710
 27711                    b.Property<int?>("IndexBy")
 27712                        .HasColumnType("INTEGER");
 27713
 27714                    b.Property<Guid>("ItemId")
 27715                        .HasColumnType("TEXT");
 27716
 27717                    b.Property<bool>("RememberIndexing")
 27718                        .HasColumnType("INTEGER");
 27719
 27720                    b.Property<bool>("RememberSorting")
 27721                        .HasColumnType("INTEGER");
 27722
 27723                    b.Property<string>("SortBy")
 27724                        .IsRequired()
 27725                        .HasMaxLength(64)
 27726                        .HasColumnType("TEXT");
 27727
 27728                    b.Property<int>("SortOrder")
 27729                        .HasColumnType("INTEGER");
 27730
 27731                    b.Property<Guid>("UserId")
 27732                        .HasColumnType("TEXT");
 27733
 27734                    b.Property<int>("ViewType")
 27735                        .HasColumnType("INTEGER");
 27736
 27737                    b.HasKey("Id");
 27738
 27739                    b.HasIndex("UserId");
 27740
 27741                    b.ToTable("ItemDisplayPreferences");
 27742
 27743                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27744                });
 745
 27746            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27747                {
 27748                    b.Property<Guid>("ItemValueId")
 27749                        .ValueGeneratedOnAdd()
 27750                        .HasColumnType("TEXT");
 27751
 27752                    b.Property<string>("CleanValue")
 27753                        .IsRequired()
 27754                        .HasColumnType("TEXT");
 27755
 27756                    b.Property<int>("Type")
 27757                        .HasColumnType("INTEGER");
 27758
 27759                    b.Property<string>("Value")
 27760                        .IsRequired()
 27761                        .HasColumnType("TEXT");
 27762
 27763                    b.HasKey("ItemValueId");
 27764
 27765                    b.HasIndex("Type", "CleanValue");
 27766
 27767                    b.HasIndex("Type", "Value")
 27768                        .IsUnique();
 27769
 27770                    b.ToTable("ItemValues");
 27771
 27772                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27773                });
 774
 27775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27776                {
 27777                    b.Property<Guid>("ItemValueId")
 27778                        .HasColumnType("TEXT");
 27779
 27780                    b.Property<Guid>("ItemId")
 27781                        .HasColumnType("TEXT");
 27782
 27783                    b.HasKey("ItemValueId", "ItemId");
 27784
 27785                    b.HasIndex("ItemId");
 27786
 27787                    b.ToTable("ItemValuesMap");
 27788
 27789                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27790                });
 791
 27792            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27793                {
 27794                    b.Property<Guid>("ItemId")
 27795                        .HasColumnType("TEXT");
 27796
 27797                    b.PrimitiveCollection<string>("KeyframeTicks")
 27798                        .HasColumnType("TEXT");
 27799
 27800                    b.Property<long>("TotalDuration")
 27801                        .HasColumnType("INTEGER");
 27802
 27803                    b.HasKey("ItemId");
 27804
 27805                    b.ToTable("KeyframeData");
 27806
 27807                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27808                });
 809
 27810            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 27811                {
 27812                    b.Property<Guid>("ParentId")
 27813                        .HasColumnType("TEXT");
 27814
 27815                    b.Property<Guid>("ChildId")
 27816                        .HasColumnType("TEXT");
 27817
 27818                    b.Property<int>("ChildType")
 27819                        .HasColumnType("INTEGER");
 27820
 27821                    b.Property<int?>("SortOrder")
 27822                        .HasColumnType("INTEGER");
 27823
 27824                    b.HasKey("ParentId", "ChildId");
 27825
 27826                    b.HasIndex("ChildId", "ChildType");
 27827
 27828                    b.HasIndex("ParentId", "ChildType");
 27829
 27830                    b.HasIndex("ParentId", "SortOrder");
 27831
 27832                    b.ToTable("LinkedChildren", (string)null);
 27833
 27834                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27835                });
 836
 27837            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27838                {
 27839                    b.Property<Guid>("Id")
 27840                        .ValueGeneratedOnAdd()
 27841                        .HasColumnType("TEXT");
 27842
 27843                    b.Property<long>("EndTicks")
 27844                        .HasColumnType("INTEGER");
 27845
 27846                    b.Property<Guid>("ItemId")
 27847                        .HasColumnType("TEXT");
 27848
 27849                    b.Property<string>("SegmentProviderId")
 27850                        .IsRequired()
 27851                        .HasColumnType("TEXT");
 27852
 27853                    b.Property<long>("StartTicks")
 27854                        .HasColumnType("INTEGER");
 27855
 27856                    b.Property<int>("Type")
 27857                        .HasColumnType("INTEGER");
 27858
 27859                    b.HasKey("Id");
 27860
 27861                    b.ToTable("MediaSegments");
 27862
 27863                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27864                });
 865
 27866            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27867                {
 27868                    b.Property<Guid>("ItemId")
 27869                        .HasColumnType("TEXT");
 27870
 27871                    b.Property<int>("StreamIndex")
 27872                        .HasColumnType("INTEGER");
 27873
 27874                    b.Property<string>("AspectRatio")
 27875                        .HasColumnType("TEXT");
 27876
 27877                    b.Property<float?>("AverageFrameRate")
 27878                        .HasColumnType("REAL");
 27879
 27880                    b.Property<int?>("BitDepth")
 27881                        .HasColumnType("INTEGER");
 27882
 27883                    b.Property<int?>("BitRate")
 27884                        .HasColumnType("INTEGER");
 27885
 27886                    b.Property<int?>("BlPresentFlag")
 27887                        .HasColumnType("INTEGER");
 27888
 27889                    b.Property<string>("ChannelLayout")
 27890                        .HasColumnType("TEXT");
 27891
 27892                    b.Property<int?>("Channels")
 27893                        .HasColumnType("INTEGER");
 27894
 27895                    b.Property<string>("Codec")
 27896                        .HasColumnType("TEXT");
 27897
 27898                    b.Property<string>("CodecTag")
 27899                        .HasColumnType("TEXT");
 27900
 27901                    b.Property<string>("CodecTimeBase")
 27902                        .HasColumnType("TEXT");
 27903
 27904                    b.Property<string>("ColorPrimaries")
 27905                        .HasColumnType("TEXT");
 27906
 27907                    b.Property<string>("ColorSpace")
 27908                        .HasColumnType("TEXT");
 27909
 27910                    b.Property<string>("ColorTransfer")
 27911                        .HasColumnType("TEXT");
 27912
 27913                    b.Property<string>("Comment")
 27914                        .HasColumnType("TEXT");
 27915
 27916                    b.Property<int?>("DvBlSignalCompatibilityId")
 27917                        .HasColumnType("INTEGER");
 27918
 27919                    b.Property<int?>("DvLevel")
 27920                        .HasColumnType("INTEGER");
 27921
 27922                    b.Property<int?>("DvProfile")
 27923                        .HasColumnType("INTEGER");
 27924
 27925                    b.Property<int?>("DvVersionMajor")
 27926                        .HasColumnType("INTEGER");
 27927
 27928                    b.Property<int?>("DvVersionMinor")
 27929                        .HasColumnType("INTEGER");
 27930
 27931                    b.Property<int?>("ElPresentFlag")
 27932                        .HasColumnType("INTEGER");
 27933
 27934                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27935                        .HasColumnType("INTEGER");
 27936
 27937                    b.Property<int?>("Height")
 27938                        .HasColumnType("INTEGER");
 27939
 27940                    b.Property<bool?>("IsAnamorphic")
 27941                        .HasColumnType("INTEGER");
 27942
 27943                    b.Property<bool?>("IsAvc")
 27944                        .HasColumnType("INTEGER");
 27945
 27946                    b.Property<bool>("IsDefault")
 27947                        .HasColumnType("INTEGER");
 27948
 27949                    b.Property<bool>("IsExternal")
 27950                        .HasColumnType("INTEGER");
 27951
 27952                    b.Property<bool>("IsForced")
 27953                        .HasColumnType("INTEGER");
 27954
 27955                    b.Property<bool?>("IsHearingImpaired")
 27956                        .HasColumnType("INTEGER");
 27957
 27958                    b.Property<bool?>("IsInterlaced")
 27959                        .HasColumnType("INTEGER");
 27960
 27961                    b.Property<bool>("IsOriginal")
 27962                        .HasColumnType("INTEGER");
 27963
 27964                    b.Property<string>("KeyFrames")
 27965                        .HasColumnType("TEXT");
 27966
 27967                    b.Property<string>("Language")
 27968                        .HasColumnType("TEXT");
 27969
 27970                    b.Property<float?>("Level")
 27971                        .HasColumnType("REAL");
 27972
 27973                    b.Property<string>("NalLengthSize")
 27974                        .HasColumnType("TEXT");
 27975
 27976                    b.Property<string>("Path")
 27977                        .HasColumnType("TEXT");
 27978
 27979                    b.Property<string>("PixelFormat")
 27980                        .HasColumnType("TEXT");
 27981
 27982                    b.Property<string>("Profile")
 27983                        .HasColumnType("TEXT");
 27984
 27985                    b.Property<float?>("RealFrameRate")
 27986                        .HasColumnType("REAL");
 27987
 27988                    b.Property<int?>("RefFrames")
 27989                        .HasColumnType("INTEGER");
 27990
 27991                    b.Property<int?>("Rotation")
 27992                        .HasColumnType("INTEGER");
 27993
 27994                    b.Property<int?>("RpuPresentFlag")
 27995                        .HasColumnType("INTEGER");
 27996
 27997                    b.Property<int?>("SampleRate")
 27998                        .HasColumnType("INTEGER");
 27999
 271000                    b.Property<int>("StreamType")
 271001                        .HasColumnType("INTEGER");
 271002
 271003                    b.Property<string>("TimeBase")
 271004                        .HasColumnType("TEXT");
 271005
 271006                    b.Property<string>("Title")
 271007                        .HasColumnType("TEXT");
 271008
 271009                    b.Property<int?>("Width")
 271010                        .HasColumnType("INTEGER");
 271011
 271012                    b.HasKey("ItemId", "StreamIndex");
 271013
 271014                    b.ToTable("MediaStreamInfos");
 271015
 271016                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271017                });
 1018
 271019            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271020                {
 271021                    b.Property<Guid>("Id")
 271022                        .ValueGeneratedOnAdd()
 271023                        .HasColumnType("TEXT");
 271024
 271025                    b.Property<string>("Name")
 271026                        .IsRequired()
 271027                        .HasColumnType("TEXT");
 271028
 271029                    b.Property<string>("PersonType")
 271030                        .HasColumnType("TEXT");
 271031
 271032                    b.HasKey("Id");
 271033
 271034                    b.HasIndex("Name");
 271035
 271036                    b.ToTable("Peoples");
 271037
 271038                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271039                });
 1040
 271041            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271042                {
 271043                    b.Property<Guid>("ItemId")
 271044                        .HasColumnType("TEXT");
 271045
 271046                    b.Property<Guid>("PeopleId")
 271047                        .HasColumnType("TEXT");
 271048
 271049                    b.Property<string>("Role")
 271050                        .HasColumnType("TEXT");
 271051
 271052                    b.Property<int?>("ListOrder")
 271053                        .HasColumnType("INTEGER");
 271054
 271055                    b.Property<int?>("SortOrder")
 271056                        .HasColumnType("INTEGER");
 271057
 271058                    b.HasKey("ItemId", "PeopleId", "Role");
 271059
 271060                    b.HasIndex("PeopleId");
 271061
 271062                    b.HasIndex("ItemId", "ListOrder");
 271063
 271064                    b.HasIndex("ItemId", "SortOrder");
 271065
 271066                    b.ToTable("PeopleBaseItemMap");
 271067
 271068                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271069                });
 1070
 271071            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271072                {
 271073                    b.Property<int>("Id")
 271074                        .ValueGeneratedOnAdd()
 271075                        .HasColumnType("INTEGER");
 271076
 271077                    b.Property<int>("Kind")
 271078                        .HasColumnType("INTEGER");
 271079
 271080                    b.Property<Guid?>("Permission_Permissions_Guid")
 271081                        .HasColumnType("TEXT");
 271082
 271083                    b.Property<uint>("RowVersion")
 271084                        .IsConcurrencyToken()
 271085                        .HasColumnType("INTEGER");
 271086
 271087                    b.Property<Guid?>("UserId")
 271088                        .HasColumnType("TEXT");
 271089
 271090                    b.Property<bool>("Value")
 271091                        .HasColumnType("INTEGER");
 271092
 271093                    b.HasKey("Id");
 271094
 271095                    b.HasIndex("UserId", "Kind")
 271096                        .IsUnique()
 271097                        .HasFilter("[UserId] IS NOT NULL");
 271098
 271099                    b.ToTable("Permissions");
 271100
 271101                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271102                });
 1103
 271104            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271105                {
 271106                    b.Property<int>("Id")
 271107                        .ValueGeneratedOnAdd()
 271108                        .HasColumnType("INTEGER");
 271109
 271110                    b.Property<int>("Kind")
 271111                        .HasColumnType("INTEGER");
 271112
 271113                    b.Property<Guid?>("Preference_Preferences_Guid")
 271114                        .HasColumnType("TEXT");
 271115
 271116                    b.Property<uint>("RowVersion")
 271117                        .IsConcurrencyToken()
 271118                        .HasColumnType("INTEGER");
 271119
 271120                    b.Property<Guid?>("UserId")
 271121                        .HasColumnType("TEXT");
 271122
 271123                    b.Property<string>("Value")
 271124                        .IsRequired()
 271125                        .HasMaxLength(65535)
 271126                        .HasColumnType("TEXT");
 271127
 271128                    b.HasKey("Id");
 271129
 271130                    b.HasIndex("UserId", "Kind")
 271131                        .IsUnique()
 271132                        .HasFilter("[UserId] IS NOT NULL");
 271133
 271134                    b.ToTable("Preferences");
 271135
 271136                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271137                });
 1138
 271139            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271140                {
 271141                    b.Property<int>("Id")
 271142                        .ValueGeneratedOnAdd()
 271143                        .HasColumnType("INTEGER");
 271144
 271145                    b.Property<string>("AccessToken")
 271146                        .IsRequired()
 271147                        .HasColumnType("TEXT");
 271148
 271149                    b.Property<DateTime>("DateCreated")
 271150                        .HasColumnType("TEXT");
 271151
 271152                    b.Property<DateTime>("DateLastActivity")
 271153                        .HasColumnType("TEXT");
 271154
 271155                    b.Property<string>("Name")
 271156                        .IsRequired()
 271157                        .HasMaxLength(64)
 271158                        .HasColumnType("TEXT");
 271159
 271160                    b.HasKey("Id");
 271161
 271162                    b.HasIndex("AccessToken")
 271163                        .IsUnique();
 271164
 271165                    b.ToTable("ApiKeys");
 271166
 271167                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271168                });
 1169
 271170            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271171                {
 271172                    b.Property<int>("Id")
 271173                        .ValueGeneratedOnAdd()
 271174                        .HasColumnType("INTEGER");
 271175
 271176                    b.Property<string>("AccessToken")
 271177                        .IsRequired()
 271178                        .HasColumnType("TEXT");
 271179
 271180                    b.Property<string>("AppName")
 271181                        .IsRequired()
 271182                        .HasMaxLength(64)
 271183                        .HasColumnType("TEXT");
 271184
 271185                    b.Property<string>("AppVersion")
 271186                        .IsRequired()
 271187                        .HasMaxLength(32)
 271188                        .HasColumnType("TEXT");
 271189
 271190                    b.Property<DateTime>("DateCreated")
 271191                        .HasColumnType("TEXT");
 271192
 271193                    b.Property<DateTime>("DateLastActivity")
 271194                        .HasColumnType("TEXT");
 271195
 271196                    b.Property<DateTime>("DateModified")
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.Property<string>("DeviceId")
 271200                        .IsRequired()
 271201                        .HasMaxLength(256)
 271202                        .HasColumnType("TEXT");
 271203
 271204                    b.Property<string>("DeviceName")
 271205                        .IsRequired()
 271206                        .HasMaxLength(64)
 271207                        .HasColumnType("TEXT");
 271208
 271209                    b.Property<bool>("IsActive")
 271210                        .HasColumnType("INTEGER");
 271211
 271212                    b.Property<Guid>("UserId")
 271213                        .HasColumnType("TEXT");
 271214
 271215                    b.HasKey("Id");
 271216
 271217                    b.HasIndex("AccessToken", "DateLastActivity");
 271218
 271219                    b.HasIndex("DeviceId", "DateLastActivity");
 271220
 271221                    b.HasIndex("UserId", "DeviceId");
 271222
 271223                    b.ToTable("Devices");
 271224
 271225                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271226                });
 1227
 271228            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271229                {
 271230                    b.Property<int>("Id")
 271231                        .ValueGeneratedOnAdd()
 271232                        .HasColumnType("INTEGER");
 271233
 271234                    b.Property<string>("CustomName")
 271235                        .HasColumnType("TEXT");
 271236
 271237                    b.Property<string>("DeviceId")
 271238                        .IsRequired()
 271239                        .HasColumnType("TEXT");
 271240
 271241                    b.HasKey("Id");
 271242
 271243                    b.HasIndex("DeviceId")
 271244                        .IsUnique();
 271245
 271246                    b.ToTable("DeviceOptions");
 271247
 271248                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271249                });
 1250
 271251            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271252                {
 271253                    b.Property<Guid>("ItemId")
 271254                        .HasColumnType("TEXT");
 271255
 271256                    b.Property<int>("Width")
 271257                        .HasColumnType("INTEGER");
 271258
 271259                    b.Property<int>("Bandwidth")
 271260                        .HasColumnType("INTEGER");
 271261
 271262                    b.Property<int>("Height")
 271263                        .HasColumnType("INTEGER");
 271264
 271265                    b.Property<int>("Interval")
 271266                        .HasColumnType("INTEGER");
 271267
 271268                    b.Property<int>("ThumbnailCount")
 271269                        .HasColumnType("INTEGER");
 271270
 271271                    b.Property<int>("TileHeight")
 271272                        .HasColumnType("INTEGER");
 271273
 271274                    b.Property<int>("TileWidth")
 271275                        .HasColumnType("INTEGER");
 271276
 271277                    b.HasKey("ItemId", "Width");
 271278
 271279                    b.ToTable("TrickplayInfos");
 271280
 271281                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271282                });
 1283
 271284            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271285                {
 271286                    b.Property<Guid>("Id")
 271287                        .ValueGeneratedOnAdd()
 271288                        .HasColumnType("TEXT");
 271289
 271290                    b.Property<string>("AudioLanguagePreference")
 271291                        .HasMaxLength(255)
 271292                        .HasColumnType("TEXT");
 271293
 271294                    b.Property<string>("AuthenticationProviderId")
 271295                        .IsRequired()
 271296                        .HasMaxLength(255)
 271297                        .HasColumnType("TEXT");
 271298
 271299                    b.Property<string>("CastReceiverId")
 271300                        .HasMaxLength(32)
 271301                        .HasColumnType("TEXT");
 271302
 271303                    b.Property<bool>("DisplayCollectionsView")
 271304                        .HasColumnType("INTEGER");
 271305
 271306                    b.Property<bool>("DisplayMissingEpisodes")
 271307                        .HasColumnType("INTEGER");
 271308
 271309                    b.Property<bool>("EnableAutoLogin")
 271310                        .HasColumnType("INTEGER");
 271311
 271312                    b.Property<bool>("EnableLocalPassword")
 271313                        .HasColumnType("INTEGER");
 271314
 271315                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271316                        .HasColumnType("INTEGER");
 271317
 271318                    b.Property<bool>("EnableUserPreferenceAccess")
 271319                        .HasColumnType("INTEGER");
 271320
 271321                    b.Property<bool>("HidePlayedInLatest")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<long>("InternalId")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<int>("InvalidLoginAttemptCount")
 271328                        .HasColumnType("INTEGER");
 271329
 271330                    b.Property<DateTime?>("LastActivityDate")
 271331                        .HasColumnType("TEXT");
 271332
 271333                    b.Property<DateTime?>("LastLoginDate")
 271334                        .HasColumnType("TEXT");
 271335
 271336                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271337                        .HasColumnType("INTEGER");
 271338
 271339                    b.Property<int>("MaxActiveSessions")
 271340                        .HasColumnType("INTEGER");
 271341
 271342                    b.Property<int?>("MaxParentalRatingScore")
 271343                        .HasColumnType("INTEGER");
 271344
 271345                    b.Property<int?>("MaxParentalRatingSubScore")
 271346                        .HasColumnType("INTEGER");
 271347
 271348                    b.Property<bool>("MustUpdatePassword")
 271349                        .HasColumnType("INTEGER");
 271350
 271351                    b.Property<string>("Password")
 271352                        .HasMaxLength(65535)
 271353                        .HasColumnType("TEXT");
 271354
 271355                    b.Property<string>("PasswordResetProviderId")
 271356                        .IsRequired()
 271357                        .HasMaxLength(255)
 271358                        .HasColumnType("TEXT");
 271359
 271360                    b.Property<bool>("PlayDefaultAudioTrack")
 271361                        .HasColumnType("INTEGER");
 271362
 271363                    b.Property<bool>("RememberAudioSelections")
 271364                        .HasColumnType("INTEGER");
 271365
 271366                    b.Property<bool>("RememberSubtitleSelections")
 271367                        .HasColumnType("INTEGER");
 271368
 271369                    b.Property<int?>("RemoteClientBitrateLimit")
 271370                        .HasColumnType("INTEGER");
 271371
 271372                    b.Property<uint>("RowVersion")
 271373                        .IsConcurrencyToken()
 271374                        .HasColumnType("INTEGER");
 271375
 271376                    b.Property<string>("SubtitleLanguagePreference")
 271377                        .HasMaxLength(255)
 271378                        .HasColumnType("TEXT");
 271379
 271380                    b.Property<int>("SubtitleMode")
 271381                        .HasColumnType("INTEGER");
 271382
 271383                    b.Property<int>("SyncPlayAccess")
 271384                        .HasColumnType("INTEGER");
 271385
 271386                    b.Property<string>("Username")
 271387                        .IsRequired()
 271388                        .HasMaxLength(255)
 271389                        .HasColumnType("TEXT");
 271390
 271391                    b.HasKey("Id");
 271392
 271393                    b.HasIndex("Username")
 271394                        .IsUnique();
 271395
 271396                    b.ToTable("Users");
 271397
 271398                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271399                });
 1400
 271401            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271402                {
 271403                    b.Property<Guid>("ItemId")
 271404                        .HasColumnType("TEXT");
 271405
 271406                    b.Property<Guid>("UserId")
 271407                        .HasColumnType("TEXT");
 271408
 271409                    b.Property<string>("CustomDataKey")
 271410                        .HasColumnType("TEXT");
 271411
 271412                    b.Property<int?>("AudioStreamIndex")
 271413                        .HasColumnType("INTEGER");
 271414
 271415                    b.Property<bool>("IsFavorite")
 271416                        .HasColumnType("INTEGER");
 271417
 271418                    b.Property<DateTime?>("LastPlayedDate")
 271419                        .HasColumnType("TEXT");
 271420
 271421                    b.Property<bool?>("Likes")
 271422                        .HasColumnType("INTEGER");
 271423
 271424                    b.Property<int>("PlayCount")
 271425                        .HasColumnType("INTEGER");
 271426
 271427                    b.Property<long>("PlaybackPositionTicks")
 271428                        .HasColumnType("INTEGER");
 271429
 271430                    b.Property<bool>("Played")
 271431                        .HasColumnType("INTEGER");
 271432
 271433                    b.Property<double?>("Rating")
 271434                        .HasColumnType("REAL");
 271435
 271436                    b.Property<DateTime?>("RetentionDate")
 271437                        .HasColumnType("TEXT");
 271438
 271439                    b.Property<int?>("SubtitleStreamIndex")
 271440                        .HasColumnType("INTEGER");
 271441
 271442                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271443
 271444                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271445
 271446                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271447
 271448                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271449
 271450                    b.HasIndex("ItemId", "UserId", "Played");
 271451
 271452                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 271453
 271454                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 271455
 271456                    b.HasIndex("UserId", "Played", "ItemId");
 271457
 271458                    b.ToTable("UserData");
 271459
 271460                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271461                });
 1462
 271463            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271464                {
 271465                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271466                        .WithMany("AccessSchedules")
 271467                        .HasForeignKey("UserId")
 271468                        .OnDelete(DeleteBehavior.Cascade)
 271469                        .IsRequired();
 271470                });
 1471
 271472            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271473                {
 271474                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271475                        .WithMany("Parents")
 271476                        .HasForeignKey("ItemId")
 271477                        .OnDelete(DeleteBehavior.Cascade)
 271478                        .IsRequired();
 271479
 271480                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271481                        .WithMany("Children")
 271482                        .HasForeignKey("ParentItemId")
 271483                        .OnDelete(DeleteBehavior.Cascade)
 271484                        .IsRequired();
 271485
 271486                    b.Navigation("Item");
 271487
 271488                    b.Navigation("ParentItem");
 271489                });
 1490
 271491            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271492                {
 271493                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271494                        .WithMany()
 271495                        .HasForeignKey("ItemId")
 271496                        .OnDelete(DeleteBehavior.Cascade)
 271497                        .IsRequired();
 271498
 271499                    b.Navigation("Item");
 271500                });
 1501
 271502            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271503                {
 271504                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 271505                        .WithMany("Extras")
 271506                        .HasForeignKey("OwnerId")
 271507                        .OnDelete(DeleteBehavior.NoAction);
 271508
 271509                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 271510                        .WithMany("DirectChildren")
 271511                        .HasForeignKey("ParentId")
 271512                        .OnDelete(DeleteBehavior.Cascade);
 271513
 271514                    b.Navigation("DirectParent");
 271515
 271516                    b.Navigation("Owner");
 271517                });
 1518
 271519            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271520                {
 271521                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271522                        .WithMany("Images")
 271523                        .HasForeignKey("ItemId")
 271524                        .OnDelete(DeleteBehavior.Cascade)
 271525                        .IsRequired();
 271526
 271527                    b.Navigation("Item");
 271528                });
 1529
 271530            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271531                {
 271532                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271533                        .WithMany("LockedFields")
 271534                        .HasForeignKey("ItemId")
 271535                        .OnDelete(DeleteBehavior.Cascade)
 271536                        .IsRequired();
 271537
 271538                    b.Navigation("Item");
 271539                });
 1540
 271541            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271542                {
 271543                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271544                        .WithMany("Provider")
 271545                        .HasForeignKey("ItemId")
 271546                        .OnDelete(DeleteBehavior.Cascade)
 271547                        .IsRequired();
 271548
 271549                    b.Navigation("Item");
 271550                });
 1551
 271552            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271553                {
 271554                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271555                        .WithMany("TrailerTypes")
 271556                        .HasForeignKey("ItemId")
 271557                        .OnDelete(DeleteBehavior.Cascade)
 271558                        .IsRequired();
 271559
 271560                    b.Navigation("Item");
 271561                });
 1562
 271563            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271564                {
 271565                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271566                        .WithMany("Chapters")
 271567                        .HasForeignKey("ItemId")
 271568                        .OnDelete(DeleteBehavior.Cascade)
 271569                        .IsRequired();
 271570
 271571                    b.Navigation("Item");
 271572                });
 1573
 271574            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271575                {
 271576                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271577                        .WithMany("DisplayPreferences")
 271578                        .HasForeignKey("UserId")
 271579                        .OnDelete(DeleteBehavior.Cascade)
 271580                        .IsRequired();
 271581                });
 1582
 271583            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271584                {
 271585                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271586                        .WithMany("HomeSections")
 271587                        .HasForeignKey("DisplayPreferencesId")
 271588                        .OnDelete(DeleteBehavior.Cascade)
 271589                        .IsRequired();
 271590                });
 1591
 271592            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271593                {
 271594                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271595                        .WithOne("ProfileImage")
 271596                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271597                        .OnDelete(DeleteBehavior.Cascade);
 271598                });
 1599
 271600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271601                {
 271602                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271603                        .WithMany("ItemDisplayPreferences")
 271604                        .HasForeignKey("UserId")
 271605                        .OnDelete(DeleteBehavior.Cascade)
 271606                        .IsRequired();
 271607                });
 1608
 271609            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271610                {
 271611                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271612                        .WithMany("ItemValues")
 271613                        .HasForeignKey("ItemId")
 271614                        .OnDelete(DeleteBehavior.Cascade)
 271615                        .IsRequired();
 271616
 271617                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271618                        .WithMany("BaseItemsMap")
 271619                        .HasForeignKey("ItemValueId")
 271620                        .OnDelete(DeleteBehavior.Cascade)
 271621                        .IsRequired();
 271622
 271623                    b.Navigation("Item");
 271624
 271625                    b.Navigation("ItemValue");
 271626                });
 1627
 271628            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271629                {
 271630                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271631                        .WithMany()
 271632                        .HasForeignKey("ItemId")
 271633                        .OnDelete(DeleteBehavior.Cascade)
 271634                        .IsRequired();
 271635
 271636                    b.Navigation("Item");
 271637                });
 1638
 271639            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 271640                {
 271641                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 271642                        .WithMany("LinkedChildOfEntities")
 271643                        .HasForeignKey("ChildId")
 271644                        .OnDelete(DeleteBehavior.NoAction)
 271645                        .IsRequired();
 271646
 271647                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 271648                        .WithMany("LinkedChildEntities")
 271649                        .HasForeignKey("ParentId")
 271650                        .OnDelete(DeleteBehavior.NoAction)
 271651                        .IsRequired();
 271652
 271653                    b.Navigation("Child");
 271654
 271655                    b.Navigation("Parent");
 271656                });
 1657
 271658            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271659                {
 271660                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271661                        .WithMany("MediaStreams")
 271662                        .HasForeignKey("ItemId")
 271663                        .OnDelete(DeleteBehavior.Cascade)
 271664                        .IsRequired();
 271665
 271666                    b.Navigation("Item");
 271667                });
 1668
 271669            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271670                {
 271671                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271672                        .WithMany("Peoples")
 271673                        .HasForeignKey("ItemId")
 271674                        .OnDelete(DeleteBehavior.Cascade)
 271675                        .IsRequired();
 271676
 271677                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271678                        .WithMany("BaseItems")
 271679                        .HasForeignKey("PeopleId")
 271680                        .OnDelete(DeleteBehavior.Cascade)
 271681                        .IsRequired();
 271682
 271683                    b.Navigation("Item");
 271684
 271685                    b.Navigation("People");
 271686                });
 1687
 271688            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271689                {
 271690                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271691                        .WithMany("Permissions")
 271692                        .HasForeignKey("UserId")
 271693                        .OnDelete(DeleteBehavior.Cascade);
 271694                });
 1695
 271696            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271697                {
 271698                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271699                        .WithMany("Preferences")
 271700                        .HasForeignKey("UserId")
 271701                        .OnDelete(DeleteBehavior.Cascade);
 271702                });
 1703
 271704            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271705                {
 271706                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271707                        .WithMany()
 271708                        .HasForeignKey("UserId")
 271709                        .OnDelete(DeleteBehavior.Cascade)
 271710                        .IsRequired();
 271711
 271712                    b.Navigation("User");
 271713                });
 1714
 271715            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271716                {
 271717                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271718                        .WithMany("UserData")
 271719                        .HasForeignKey("ItemId")
 271720                        .OnDelete(DeleteBehavior.Cascade)
 271721                        .IsRequired();
 271722
 271723                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271724                        .WithMany()
 271725                        .HasForeignKey("UserId")
 271726                        .OnDelete(DeleteBehavior.Cascade)
 271727                        .IsRequired();
 271728
 271729                    b.Navigation("Item");
 271730
 271731                    b.Navigation("User");
 271732                });
 1733
 271734            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271735                {
 271736                    b.Navigation("Chapters");
 271737
 271738                    b.Navigation("Children");
 271739
 271740                    b.Navigation("DirectChildren");
 271741
 271742                    b.Navigation("Extras");
 271743
 271744                    b.Navigation("Images");
 271745
 271746                    b.Navigation("ItemValues");
 271747
 271748                    b.Navigation("LinkedChildEntities");
 271749
 271750                    b.Navigation("LinkedChildOfEntities");
 271751
 271752                    b.Navigation("LockedFields");
 271753
 271754                    b.Navigation("MediaStreams");
 271755
 271756                    b.Navigation("Parents");
 271757
 271758                    b.Navigation("Peoples");
 271759
 271760                    b.Navigation("Provider");
 271761
 271762                    b.Navigation("TrailerTypes");
 271763
 271764                    b.Navigation("UserData");
 271765                });
 1766
 271767            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271768                {
 271769                    b.Navigation("HomeSections");
 271770                });
 1771
 271772            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271773                {
 271774                    b.Navigation("BaseItemsMap");
 271775                });
 1776
 271777            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271778                {
 271779                    b.Navigation("BaseItems");
 271780                });
 1781
 271782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271783                {
 271784                    b.Navigation("AccessSchedules");
 271785
 271786                    b.Navigation("DisplayPreferences");
 271787
 271788                    b.Navigation("ItemDisplayPreferences");
 271789
 271790                    b.Navigation("Permissions");
 271791
 271792                    b.Navigation("Preferences");
 271793
 271794                    b.Navigation("ProfileImage");
 271795                });
 1796#pragma warning restore 612, 618
 271797        }
 1798    }
 1799}