< Summary - Jellyfin

Line coverage
99%
Covered lines: 1597
Uncovered lines: 11
Coverable lines: 1608
Total lines: 1706
Line coverage: 99.3%
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.3% (1597/1608) Total lines: 1706

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/20250326065026_AddInheritedParentalRatingSubValue.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddInheritedParentalRatingSubValue : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.RenameColumn(
 2714                name: "MaxParentalAgeRating",
 2715                table: "Users",
 2716                newName: "MaxParentalRatingScore");
 17
 2718            migrationBuilder.AddColumn<int>(
 2719                name: "MaxParentalRatingSubScore",
 2720                table: "Users",
 2721                type: "INTEGER",
 2722                nullable: true);
 23
 2724            migrationBuilder.AddColumn<int>(
 2725                name: "InheritedParentalRatingSubValue",
 2726                table: "BaseItems",
 2727                type: "INTEGER",
 2728                nullable: true);
 2729        }
 30
 31        /// <inheritdoc />
 32        protected override void Down(MigrationBuilder migrationBuilder)
 33        {
 034            migrationBuilder.DropColumn(
 035                name: "MaxParentalRatingSubScore",
 036                table: "Users");
 37
 038            migrationBuilder.DropColumn(
 039                name: "InheritedParentalRatingValue",
 040                table: "BaseItems");
 41
 042            migrationBuilder.RenameColumn(
 043                name: "MaxParentalRatingScore",
 044                table: "Users",
 045                newName: "MaxParentalAgeRating");
 046        }
 47    }
 48}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250326065026_AddInheritedParentalRatingSubValue.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("20250326065026_AddInheritedParentalRatingSubValue")]
 15    partial class AddInheritedParentalRatingSubValue
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2721            modelBuilder.HasAnnotation("ProductVersion", "9.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                        .IsRequired()
 27127                        .HasColumnType("TEXT");
 27128
 27129                    b.Property<string>("CodecTag")
 27130                        .HasColumnType("TEXT");
 27131
 27132                    b.Property<string>("Comment")
 27133                        .HasColumnType("TEXT");
 27134
 27135                    b.Property<string>("Filename")
 27136                        .HasColumnType("TEXT");
 27137
 27138                    b.Property<string>("MimeType")
 27139                        .HasColumnType("TEXT");
 27140
 27141                    b.HasKey("ItemId", "Index");
 27142
 27143                    b.ToTable("AttachmentStreamInfos");
 27144
 27145                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27146                });
 147
 27148            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 27149                {
 27150                    b.Property<Guid>("Id")
 27151                        .ValueGeneratedOnAdd()
 27152                        .HasColumnType("TEXT");
 27153
 27154                    b.Property<string>("Album")
 27155                        .HasColumnType("TEXT");
 27156
 27157                    b.Property<string>("AlbumArtists")
 27158                        .HasColumnType("TEXT");
 27159
 27160                    b.Property<string>("Artists")
 27161                        .HasColumnType("TEXT");
 27162
 27163                    b.Property<int?>("Audio")
 27164                        .HasColumnType("INTEGER");
 27165
 27166                    b.Property<Guid?>("ChannelId")
 27167                        .HasColumnType("TEXT");
 27168
 27169                    b.Property<string>("CleanName")
 27170                        .HasColumnType("TEXT");
 27171
 27172                    b.Property<float?>("CommunityRating")
 27173                        .HasColumnType("REAL");
 27174
 27175                    b.Property<float?>("CriticRating")
 27176                        .HasColumnType("REAL");
 27177
 27178                    b.Property<string>("CustomRating")
 27179                        .HasColumnType("TEXT");
 27180
 27181                    b.Property<string>("Data")
 27182                        .HasColumnType("TEXT");
 27183
 27184                    b.Property<DateTime?>("DateCreated")
 27185                        .HasColumnType("TEXT");
 27186
 27187                    b.Property<DateTime?>("DateLastMediaAdded")
 27188                        .HasColumnType("TEXT");
 27189
 27190                    b.Property<DateTime?>("DateLastRefreshed")
 27191                        .HasColumnType("TEXT");
 27192
 27193                    b.Property<DateTime?>("DateLastSaved")
 27194                        .HasColumnType("TEXT");
 27195
 27196                    b.Property<DateTime?>("DateModified")
 27197                        .HasColumnType("TEXT");
 27198
 27199                    b.Property<DateTime?>("EndDate")
 27200                        .HasColumnType("TEXT");
 27201
 27202                    b.Property<string>("EpisodeTitle")
 27203                        .HasColumnType("TEXT");
 27204
 27205                    b.Property<string>("ExternalId")
 27206                        .HasColumnType("TEXT");
 27207
 27208                    b.Property<string>("ExternalSeriesId")
 27209                        .HasColumnType("TEXT");
 27210
 27211                    b.Property<string>("ExternalServiceId")
 27212                        .HasColumnType("TEXT");
 27213
 27214                    b.Property<string>("ExtraIds")
 27215                        .HasColumnType("TEXT");
 27216
 27217                    b.Property<int?>("ExtraType")
 27218                        .HasColumnType("INTEGER");
 27219
 27220                    b.Property<string>("ForcedSortName")
 27221                        .HasColumnType("TEXT");
 27222
 27223                    b.Property<string>("Genres")
 27224                        .HasColumnType("TEXT");
 27225
 27226                    b.Property<int?>("Height")
 27227                        .HasColumnType("INTEGER");
 27228
 27229                    b.Property<int?>("IndexNumber")
 27230                        .HasColumnType("INTEGER");
 27231
 27232                    b.Property<int?>("InheritedParentalRatingSubValue")
 27233                        .HasColumnType("INTEGER");
 27234
 27235                    b.Property<int?>("InheritedParentalRatingValue")
 27236                        .HasColumnType("INTEGER");
 27237
 27238                    b.Property<bool>("IsFolder")
 27239                        .HasColumnType("INTEGER");
 27240
 27241                    b.Property<bool>("IsInMixedFolder")
 27242                        .HasColumnType("INTEGER");
 27243
 27244                    b.Property<bool>("IsLocked")
 27245                        .HasColumnType("INTEGER");
 27246
 27247                    b.Property<bool>("IsMovie")
 27248                        .HasColumnType("INTEGER");
 27249
 27250                    b.Property<bool>("IsRepeat")
 27251                        .HasColumnType("INTEGER");
 27252
 27253                    b.Property<bool>("IsSeries")
 27254                        .HasColumnType("INTEGER");
 27255
 27256                    b.Property<bool>("IsVirtualItem")
 27257                        .HasColumnType("INTEGER");
 27258
 27259                    b.Property<float?>("LUFS")
 27260                        .HasColumnType("REAL");
 27261
 27262                    b.Property<string>("MediaType")
 27263                        .HasColumnType("TEXT");
 27264
 27265                    b.Property<string>("Name")
 27266                        .HasColumnType("TEXT");
 27267
 27268                    b.Property<float?>("NormalizationGain")
 27269                        .HasColumnType("REAL");
 27270
 27271                    b.Property<string>("OfficialRating")
 27272                        .HasColumnType("TEXT");
 27273
 27274                    b.Property<string>("OriginalTitle")
 27275                        .HasColumnType("TEXT");
 27276
 27277                    b.Property<string>("Overview")
 27278                        .HasColumnType("TEXT");
 27279
 27280                    b.Property<string>("OwnerId")
 27281                        .HasColumnType("TEXT");
 27282
 27283                    b.Property<Guid?>("ParentId")
 27284                        .HasColumnType("TEXT");
 27285
 27286                    b.Property<int?>("ParentIndexNumber")
 27287                        .HasColumnType("INTEGER");
 27288
 27289                    b.Property<string>("Path")
 27290                        .HasColumnType("TEXT");
 27291
 27292                    b.Property<string>("PreferredMetadataCountryCode")
 27293                        .HasColumnType("TEXT");
 27294
 27295                    b.Property<string>("PreferredMetadataLanguage")
 27296                        .HasColumnType("TEXT");
 27297
 27298                    b.Property<DateTime?>("PremiereDate")
 27299                        .HasColumnType("TEXT");
 27300
 27301                    b.Property<string>("PresentationUniqueKey")
 27302                        .HasColumnType("TEXT");
 27303
 27304                    b.Property<string>("PrimaryVersionId")
 27305                        .HasColumnType("TEXT");
 27306
 27307                    b.Property<string>("ProductionLocations")
 27308                        .HasColumnType("TEXT");
 27309
 27310                    b.Property<int?>("ProductionYear")
 27311                        .HasColumnType("INTEGER");
 27312
 27313                    b.Property<long?>("RunTimeTicks")
 27314                        .HasColumnType("INTEGER");
 27315
 27316                    b.Property<Guid?>("SeasonId")
 27317                        .HasColumnType("TEXT");
 27318
 27319                    b.Property<string>("SeasonName")
 27320                        .HasColumnType("TEXT");
 27321
 27322                    b.Property<Guid?>("SeriesId")
 27323                        .HasColumnType("TEXT");
 27324
 27325                    b.Property<string>("SeriesName")
 27326                        .HasColumnType("TEXT");
 27327
 27328                    b.Property<string>("SeriesPresentationUniqueKey")
 27329                        .HasColumnType("TEXT");
 27330
 27331                    b.Property<string>("ShowId")
 27332                        .HasColumnType("TEXT");
 27333
 27334                    b.Property<long?>("Size")
 27335                        .HasColumnType("INTEGER");
 27336
 27337                    b.Property<string>("SortName")
 27338                        .HasColumnType("TEXT");
 27339
 27340                    b.Property<DateTime?>("StartDate")
 27341                        .HasColumnType("TEXT");
 27342
 27343                    b.Property<string>("Studios")
 27344                        .HasColumnType("TEXT");
 27345
 27346                    b.Property<string>("Tagline")
 27347                        .HasColumnType("TEXT");
 27348
 27349                    b.Property<string>("Tags")
 27350                        .HasColumnType("TEXT");
 27351
 27352                    b.Property<Guid?>("TopParentId")
 27353                        .HasColumnType("TEXT");
 27354
 27355                    b.Property<int?>("TotalBitrate")
 27356                        .HasColumnType("INTEGER");
 27357
 27358                    b.Property<string>("Type")
 27359                        .IsRequired()
 27360                        .HasColumnType("TEXT");
 27361
 27362                    b.Property<string>("UnratedType")
 27363                        .HasColumnType("TEXT");
 27364
 27365                    b.Property<int?>("Width")
 27366                        .HasColumnType("INTEGER");
 27367
 27368                    b.HasKey("Id");
 27369
 27370                    b.HasIndex("ParentId");
 27371
 27372                    b.HasIndex("Path");
 27373
 27374                    b.HasIndex("PresentationUniqueKey");
 27375
 27376                    b.HasIndex("TopParentId", "Id");
 27377
 27378                    b.HasIndex("Type", "TopParentId", "Id");
 27379
 27380                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27381
 27382                    b.HasIndex("Type", "TopParentId", "StartDate");
 27383
 27384                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 27385
 27386                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27387
 27388                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27389
 27390                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27391
 27392                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27393
 27394                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27395
 27396                    b.ToTable("BaseItems");
 27397
 27398                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27399                });
 400
 27401            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27402                {
 27403                    b.Property<Guid>("Id")
 27404                        .ValueGeneratedOnAdd()
 27405                        .HasColumnType("TEXT");
 27406
 27407                    b.Property<byte[]>("Blurhash")
 27408                        .HasColumnType("BLOB");
 27409
 27410                    b.Property<DateTime>("DateModified")
 27411                        .HasColumnType("TEXT");
 27412
 27413                    b.Property<int>("Height")
 27414                        .HasColumnType("INTEGER");
 27415
 27416                    b.Property<int>("ImageType")
 27417                        .HasColumnType("INTEGER");
 27418
 27419                    b.Property<Guid>("ItemId")
 27420                        .HasColumnType("TEXT");
 27421
 27422                    b.Property<string>("Path")
 27423                        .IsRequired()
 27424                        .HasColumnType("TEXT");
 27425
 27426                    b.Property<int>("Width")
 27427                        .HasColumnType("INTEGER");
 27428
 27429                    b.HasKey("Id");
 27430
 27431                    b.HasIndex("ItemId");
 27432
 27433                    b.ToTable("BaseItemImageInfos");
 27434
 27435                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27436                });
 437
 27438            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27439                {
 27440                    b.Property<int>("Id")
 27441                        .HasColumnType("INTEGER");
 27442
 27443                    b.Property<Guid>("ItemId")
 27444                        .HasColumnType("TEXT");
 27445
 27446                    b.HasKey("Id", "ItemId");
 27447
 27448                    b.HasIndex("ItemId");
 27449
 27450                    b.ToTable("BaseItemMetadataFields");
 27451
 27452                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27453                });
 454
 27455            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27456                {
 27457                    b.Property<Guid>("ItemId")
 27458                        .HasColumnType("TEXT");
 27459
 27460                    b.Property<string>("ProviderId")
 27461                        .HasColumnType("TEXT");
 27462
 27463                    b.Property<string>("ProviderValue")
 27464                        .IsRequired()
 27465                        .HasColumnType("TEXT");
 27466
 27467                    b.HasKey("ItemId", "ProviderId");
 27468
 27469                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 27470
 27471                    b.ToTable("BaseItemProviders");
 27472
 27473                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27474                });
 475
 27476            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27477                {
 27478                    b.Property<int>("Id")
 27479                        .HasColumnType("INTEGER");
 27480
 27481                    b.Property<Guid>("ItemId")
 27482                        .HasColumnType("TEXT");
 27483
 27484                    b.HasKey("Id", "ItemId");
 27485
 27486                    b.HasIndex("ItemId");
 27487
 27488                    b.ToTable("BaseItemTrailerTypes");
 27489
 27490                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27491                });
 492
 27493            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27494                {
 27495                    b.Property<Guid>("ItemId")
 27496                        .HasColumnType("TEXT");
 27497
 27498                    b.Property<int>("ChapterIndex")
 27499                        .HasColumnType("INTEGER");
 27500
 27501                    b.Property<DateTime?>("ImageDateModified")
 27502                        .HasColumnType("TEXT");
 27503
 27504                    b.Property<string>("ImagePath")
 27505                        .HasColumnType("TEXT");
 27506
 27507                    b.Property<string>("Name")
 27508                        .HasColumnType("TEXT");
 27509
 27510                    b.Property<long>("StartPositionTicks")
 27511                        .HasColumnType("INTEGER");
 27512
 27513                    b.HasKey("ItemId", "ChapterIndex");
 27514
 27515                    b.ToTable("Chapters");
 27516
 27517                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27518                });
 519
 27520            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27521                {
 27522                    b.Property<int>("Id")
 27523                        .ValueGeneratedOnAdd()
 27524                        .HasColumnType("INTEGER");
 27525
 27526                    b.Property<string>("Client")
 27527                        .IsRequired()
 27528                        .HasMaxLength(32)
 27529                        .HasColumnType("TEXT");
 27530
 27531                    b.Property<Guid>("ItemId")
 27532                        .HasColumnType("TEXT");
 27533
 27534                    b.Property<string>("Key")
 27535                        .IsRequired()
 27536                        .HasColumnType("TEXT");
 27537
 27538                    b.Property<Guid>("UserId")
 27539                        .HasColumnType("TEXT");
 27540
 27541                    b.Property<string>("Value")
 27542                        .HasColumnType("TEXT");
 27543
 27544                    b.HasKey("Id");
 27545
 27546                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27547                        .IsUnique();
 27548
 27549                    b.ToTable("CustomItemDisplayPreferences");
 27550
 27551                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27552                });
 553
 27554            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27555                {
 27556                    b.Property<int>("Id")
 27557                        .ValueGeneratedOnAdd()
 27558                        .HasColumnType("INTEGER");
 27559
 27560                    b.Property<int>("ChromecastVersion")
 27561                        .HasColumnType("INTEGER");
 27562
 27563                    b.Property<string>("Client")
 27564                        .IsRequired()
 27565                        .HasMaxLength(32)
 27566                        .HasColumnType("TEXT");
 27567
 27568                    b.Property<string>("DashboardTheme")
 27569                        .HasMaxLength(32)
 27570                        .HasColumnType("TEXT");
 27571
 27572                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27573                        .HasColumnType("INTEGER");
 27574
 27575                    b.Property<int?>("IndexBy")
 27576                        .HasColumnType("INTEGER");
 27577
 27578                    b.Property<Guid>("ItemId")
 27579                        .HasColumnType("TEXT");
 27580
 27581                    b.Property<int>("ScrollDirection")
 27582                        .HasColumnType("INTEGER");
 27583
 27584                    b.Property<bool>("ShowBackdrop")
 27585                        .HasColumnType("INTEGER");
 27586
 27587                    b.Property<bool>("ShowSidebar")
 27588                        .HasColumnType("INTEGER");
 27589
 27590                    b.Property<int>("SkipBackwardLength")
 27591                        .HasColumnType("INTEGER");
 27592
 27593                    b.Property<int>("SkipForwardLength")
 27594                        .HasColumnType("INTEGER");
 27595
 27596                    b.Property<string>("TvHome")
 27597                        .HasMaxLength(32)
 27598                        .HasColumnType("TEXT");
 27599
 27600                    b.Property<Guid>("UserId")
 27601                        .HasColumnType("TEXT");
 27602
 27603                    b.HasKey("Id");
 27604
 27605                    b.HasIndex("UserId", "ItemId", "Client")
 27606                        .IsUnique();
 27607
 27608                    b.ToTable("DisplayPreferences");
 27609
 27610                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27611                });
 612
 27613            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27614                {
 27615                    b.Property<int>("Id")
 27616                        .ValueGeneratedOnAdd()
 27617                        .HasColumnType("INTEGER");
 27618
 27619                    b.Property<int>("DisplayPreferencesId")
 27620                        .HasColumnType("INTEGER");
 27621
 27622                    b.Property<int>("Order")
 27623                        .HasColumnType("INTEGER");
 27624
 27625                    b.Property<int>("Type")
 27626                        .HasColumnType("INTEGER");
 27627
 27628                    b.HasKey("Id");
 27629
 27630                    b.HasIndex("DisplayPreferencesId");
 27631
 27632                    b.ToTable("HomeSection");
 27633
 27634                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27635                });
 636
 27637            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27638                {
 27639                    b.Property<int>("Id")
 27640                        .ValueGeneratedOnAdd()
 27641                        .HasColumnType("INTEGER");
 27642
 27643                    b.Property<DateTime>("LastModified")
 27644                        .HasColumnType("TEXT");
 27645
 27646                    b.Property<string>("Path")
 27647                        .IsRequired()
 27648                        .HasMaxLength(512)
 27649                        .HasColumnType("TEXT");
 27650
 27651                    b.Property<Guid?>("UserId")
 27652                        .HasColumnType("TEXT");
 27653
 27654                    b.HasKey("Id");
 27655
 27656                    b.HasIndex("UserId")
 27657                        .IsUnique();
 27658
 27659                    b.ToTable("ImageInfos");
 27660
 27661                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27662                });
 663
 27664            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27665                {
 27666                    b.Property<int>("Id")
 27667                        .ValueGeneratedOnAdd()
 27668                        .HasColumnType("INTEGER");
 27669
 27670                    b.Property<string>("Client")
 27671                        .IsRequired()
 27672                        .HasMaxLength(32)
 27673                        .HasColumnType("TEXT");
 27674
 27675                    b.Property<int?>("IndexBy")
 27676                        .HasColumnType("INTEGER");
 27677
 27678                    b.Property<Guid>("ItemId")
 27679                        .HasColumnType("TEXT");
 27680
 27681                    b.Property<bool>("RememberIndexing")
 27682                        .HasColumnType("INTEGER");
 27683
 27684                    b.Property<bool>("RememberSorting")
 27685                        .HasColumnType("INTEGER");
 27686
 27687                    b.Property<string>("SortBy")
 27688                        .IsRequired()
 27689                        .HasMaxLength(64)
 27690                        .HasColumnType("TEXT");
 27691
 27692                    b.Property<int>("SortOrder")
 27693                        .HasColumnType("INTEGER");
 27694
 27695                    b.Property<Guid>("UserId")
 27696                        .HasColumnType("TEXT");
 27697
 27698                    b.Property<int>("ViewType")
 27699                        .HasColumnType("INTEGER");
 27700
 27701                    b.HasKey("Id");
 27702
 27703                    b.HasIndex("UserId");
 27704
 27705                    b.ToTable("ItemDisplayPreferences");
 27706
 27707                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27708                });
 709
 27710            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27711                {
 27712                    b.Property<Guid>("ItemValueId")
 27713                        .ValueGeneratedOnAdd()
 27714                        .HasColumnType("TEXT");
 27715
 27716                    b.Property<string>("CleanValue")
 27717                        .IsRequired()
 27718                        .HasColumnType("TEXT");
 27719
 27720                    b.Property<int>("Type")
 27721                        .HasColumnType("INTEGER");
 27722
 27723                    b.Property<string>("Value")
 27724                        .IsRequired()
 27725                        .HasColumnType("TEXT");
 27726
 27727                    b.HasKey("ItemValueId");
 27728
 27729                    b.HasIndex("Type", "CleanValue")
 27730                        .IsUnique();
 27731
 27732                    b.ToTable("ItemValues");
 27733
 27734                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27735                });
 736
 27737            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27738                {
 27739                    b.Property<Guid>("ItemValueId")
 27740                        .HasColumnType("TEXT");
 27741
 27742                    b.Property<Guid>("ItemId")
 27743                        .HasColumnType("TEXT");
 27744
 27745                    b.HasKey("ItemValueId", "ItemId");
 27746
 27747                    b.HasIndex("ItemId");
 27748
 27749                    b.ToTable("ItemValuesMap");
 27750
 27751                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27752                });
 753
 27754            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27755                {
 27756                    b.Property<Guid>("Id")
 27757                        .ValueGeneratedOnAdd()
 27758                        .HasColumnType("TEXT");
 27759
 27760                    b.Property<long>("EndTicks")
 27761                        .HasColumnType("INTEGER");
 27762
 27763                    b.Property<Guid>("ItemId")
 27764                        .HasColumnType("TEXT");
 27765
 27766                    b.Property<string>("SegmentProviderId")
 27767                        .IsRequired()
 27768                        .HasColumnType("TEXT");
 27769
 27770                    b.Property<long>("StartTicks")
 27771                        .HasColumnType("INTEGER");
 27772
 27773                    b.Property<int>("Type")
 27774                        .HasColumnType("INTEGER");
 27775
 27776                    b.HasKey("Id");
 27777
 27778                    b.ToTable("MediaSegments");
 27779
 27780                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27781                });
 782
 27783            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27784                {
 27785                    b.Property<Guid>("ItemId")
 27786                        .HasColumnType("TEXT");
 27787
 27788                    b.Property<int>("StreamIndex")
 27789                        .HasColumnType("INTEGER");
 27790
 27791                    b.Property<string>("AspectRatio")
 27792                        .HasColumnType("TEXT");
 27793
 27794                    b.Property<float?>("AverageFrameRate")
 27795                        .HasColumnType("REAL");
 27796
 27797                    b.Property<int?>("BitDepth")
 27798                        .HasColumnType("INTEGER");
 27799
 27800                    b.Property<int?>("BitRate")
 27801                        .HasColumnType("INTEGER");
 27802
 27803                    b.Property<int?>("BlPresentFlag")
 27804                        .HasColumnType("INTEGER");
 27805
 27806                    b.Property<string>("ChannelLayout")
 27807                        .HasColumnType("TEXT");
 27808
 27809                    b.Property<int?>("Channels")
 27810                        .HasColumnType("INTEGER");
 27811
 27812                    b.Property<string>("Codec")
 27813                        .HasColumnType("TEXT");
 27814
 27815                    b.Property<string>("CodecTag")
 27816                        .HasColumnType("TEXT");
 27817
 27818                    b.Property<string>("CodecTimeBase")
 27819                        .HasColumnType("TEXT");
 27820
 27821                    b.Property<string>("ColorPrimaries")
 27822                        .HasColumnType("TEXT");
 27823
 27824                    b.Property<string>("ColorSpace")
 27825                        .HasColumnType("TEXT");
 27826
 27827                    b.Property<string>("ColorTransfer")
 27828                        .HasColumnType("TEXT");
 27829
 27830                    b.Property<string>("Comment")
 27831                        .HasColumnType("TEXT");
 27832
 27833                    b.Property<int?>("DvBlSignalCompatibilityId")
 27834                        .HasColumnType("INTEGER");
 27835
 27836                    b.Property<int?>("DvLevel")
 27837                        .HasColumnType("INTEGER");
 27838
 27839                    b.Property<int?>("DvProfile")
 27840                        .HasColumnType("INTEGER");
 27841
 27842                    b.Property<int?>("DvVersionMajor")
 27843                        .HasColumnType("INTEGER");
 27844
 27845                    b.Property<int?>("DvVersionMinor")
 27846                        .HasColumnType("INTEGER");
 27847
 27848                    b.Property<int?>("ElPresentFlag")
 27849                        .HasColumnType("INTEGER");
 27850
 27851                    b.Property<int?>("Height")
 27852                        .HasColumnType("INTEGER");
 27853
 27854                    b.Property<bool?>("IsAnamorphic")
 27855                        .HasColumnType("INTEGER");
 27856
 27857                    b.Property<bool?>("IsAvc")
 27858                        .HasColumnType("INTEGER");
 27859
 27860                    b.Property<bool>("IsDefault")
 27861                        .HasColumnType("INTEGER");
 27862
 27863                    b.Property<bool>("IsExternal")
 27864                        .HasColumnType("INTEGER");
 27865
 27866                    b.Property<bool>("IsForced")
 27867                        .HasColumnType("INTEGER");
 27868
 27869                    b.Property<bool?>("IsHearingImpaired")
 27870                        .HasColumnType("INTEGER");
 27871
 27872                    b.Property<bool?>("IsInterlaced")
 27873                        .HasColumnType("INTEGER");
 27874
 27875                    b.Property<string>("KeyFrames")
 27876                        .HasColumnType("TEXT");
 27877
 27878                    b.Property<string>("Language")
 27879                        .HasColumnType("TEXT");
 27880
 27881                    b.Property<float?>("Level")
 27882                        .HasColumnType("REAL");
 27883
 27884                    b.Property<string>("NalLengthSize")
 27885                        .HasColumnType("TEXT");
 27886
 27887                    b.Property<string>("Path")
 27888                        .HasColumnType("TEXT");
 27889
 27890                    b.Property<string>("PixelFormat")
 27891                        .HasColumnType("TEXT");
 27892
 27893                    b.Property<string>("Profile")
 27894                        .HasColumnType("TEXT");
 27895
 27896                    b.Property<float?>("RealFrameRate")
 27897                        .HasColumnType("REAL");
 27898
 27899                    b.Property<int?>("RefFrames")
 27900                        .HasColumnType("INTEGER");
 27901
 27902                    b.Property<int?>("Rotation")
 27903                        .HasColumnType("INTEGER");
 27904
 27905                    b.Property<int?>("RpuPresentFlag")
 27906                        .HasColumnType("INTEGER");
 27907
 27908                    b.Property<int?>("SampleRate")
 27909                        .HasColumnType("INTEGER");
 27910
 27911                    b.Property<int>("StreamType")
 27912                        .HasColumnType("INTEGER");
 27913
 27914                    b.Property<string>("TimeBase")
 27915                        .HasColumnType("TEXT");
 27916
 27917                    b.Property<string>("Title")
 27918                        .HasColumnType("TEXT");
 27919
 27920                    b.Property<int?>("Width")
 27921                        .HasColumnType("INTEGER");
 27922
 27923                    b.HasKey("ItemId", "StreamIndex");
 27924
 27925                    b.HasIndex("StreamIndex");
 27926
 27927                    b.HasIndex("StreamType");
 27928
 27929                    b.HasIndex("StreamIndex", "StreamType");
 27930
 27931                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27932
 27933                    b.ToTable("MediaStreamInfos");
 27934
 27935                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27936                });
 937
 27938            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 27939                {
 27940                    b.Property<Guid>("Id")
 27941                        .ValueGeneratedOnAdd()
 27942                        .HasColumnType("TEXT");
 27943
 27944                    b.Property<string>("Name")
 27945                        .IsRequired()
 27946                        .HasColumnType("TEXT");
 27947
 27948                    b.Property<string>("PersonType")
 27949                        .HasColumnType("TEXT");
 27950
 27951                    b.HasKey("Id");
 27952
 27953                    b.HasIndex("Name");
 27954
 27955                    b.ToTable("Peoples");
 27956
 27957                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27958                });
 959
 27960            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 27961                {
 27962                    b.Property<Guid>("ItemId")
 27963                        .HasColumnType("TEXT");
 27964
 27965                    b.Property<Guid>("PeopleId")
 27966                        .HasColumnType("TEXT");
 27967
 27968                    b.Property<int?>("ListOrder")
 27969                        .HasColumnType("INTEGER");
 27970
 27971                    b.Property<string>("Role")
 27972                        .HasColumnType("TEXT");
 27973
 27974                    b.Property<int?>("SortOrder")
 27975                        .HasColumnType("INTEGER");
 27976
 27977                    b.HasKey("ItemId", "PeopleId");
 27978
 27979                    b.HasIndex("PeopleId");
 27980
 27981                    b.HasIndex("ItemId", "ListOrder");
 27982
 27983                    b.HasIndex("ItemId", "SortOrder");
 27984
 27985                    b.ToTable("PeopleBaseItemMap");
 27986
 27987                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27988                });
 989
 27990            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 27991                {
 27992                    b.Property<int>("Id")
 27993                        .ValueGeneratedOnAdd()
 27994                        .HasColumnType("INTEGER");
 27995
 27996                    b.Property<int>("Kind")
 27997                        .HasColumnType("INTEGER");
 27998
 27999                    b.Property<Guid?>("Permission_Permissions_Guid")
 271000                        .HasColumnType("TEXT");
 271001
 271002                    b.Property<uint>("RowVersion")
 271003                        .IsConcurrencyToken()
 271004                        .HasColumnType("INTEGER");
 271005
 271006                    b.Property<Guid?>("UserId")
 271007                        .HasColumnType("TEXT");
 271008
 271009                    b.Property<bool>("Value")
 271010                        .HasColumnType("INTEGER");
 271011
 271012                    b.HasKey("Id");
 271013
 271014                    b.HasIndex("UserId", "Kind")
 271015                        .IsUnique()
 271016                        .HasFilter("[UserId] IS NOT NULL");
 271017
 271018                    b.ToTable("Permissions");
 271019
 271020                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271021                });
 1022
 271023            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271024                {
 271025                    b.Property<int>("Id")
 271026                        .ValueGeneratedOnAdd()
 271027                        .HasColumnType("INTEGER");
 271028
 271029                    b.Property<int>("Kind")
 271030                        .HasColumnType("INTEGER");
 271031
 271032                    b.Property<Guid?>("Preference_Preferences_Guid")
 271033                        .HasColumnType("TEXT");
 271034
 271035                    b.Property<uint>("RowVersion")
 271036                        .IsConcurrencyToken()
 271037                        .HasColumnType("INTEGER");
 271038
 271039                    b.Property<Guid?>("UserId")
 271040                        .HasColumnType("TEXT");
 271041
 271042                    b.Property<string>("Value")
 271043                        .IsRequired()
 271044                        .HasMaxLength(65535)
 271045                        .HasColumnType("TEXT");
 271046
 271047                    b.HasKey("Id");
 271048
 271049                    b.HasIndex("UserId", "Kind")
 271050                        .IsUnique()
 271051                        .HasFilter("[UserId] IS NOT NULL");
 271052
 271053                    b.ToTable("Preferences");
 271054
 271055                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271056                });
 1057
 271058            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271059                {
 271060                    b.Property<int>("Id")
 271061                        .ValueGeneratedOnAdd()
 271062                        .HasColumnType("INTEGER");
 271063
 271064                    b.Property<string>("AccessToken")
 271065                        .IsRequired()
 271066                        .HasColumnType("TEXT");
 271067
 271068                    b.Property<DateTime>("DateCreated")
 271069                        .HasColumnType("TEXT");
 271070
 271071                    b.Property<DateTime>("DateLastActivity")
 271072                        .HasColumnType("TEXT");
 271073
 271074                    b.Property<string>("Name")
 271075                        .IsRequired()
 271076                        .HasMaxLength(64)
 271077                        .HasColumnType("TEXT");
 271078
 271079                    b.HasKey("Id");
 271080
 271081                    b.HasIndex("AccessToken")
 271082                        .IsUnique();
 271083
 271084                    b.ToTable("ApiKeys");
 271085
 271086                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271087                });
 1088
 271089            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271090                {
 271091                    b.Property<int>("Id")
 271092                        .ValueGeneratedOnAdd()
 271093                        .HasColumnType("INTEGER");
 271094
 271095                    b.Property<string>("AccessToken")
 271096                        .IsRequired()
 271097                        .HasColumnType("TEXT");
 271098
 271099                    b.Property<string>("AppName")
 271100                        .IsRequired()
 271101                        .HasMaxLength(64)
 271102                        .HasColumnType("TEXT");
 271103
 271104                    b.Property<string>("AppVersion")
 271105                        .IsRequired()
 271106                        .HasMaxLength(32)
 271107                        .HasColumnType("TEXT");
 271108
 271109                    b.Property<DateTime>("DateCreated")
 271110                        .HasColumnType("TEXT");
 271111
 271112                    b.Property<DateTime>("DateLastActivity")
 271113                        .HasColumnType("TEXT");
 271114
 271115                    b.Property<DateTime>("DateModified")
 271116                        .HasColumnType("TEXT");
 271117
 271118                    b.Property<string>("DeviceId")
 271119                        .IsRequired()
 271120                        .HasMaxLength(256)
 271121                        .HasColumnType("TEXT");
 271122
 271123                    b.Property<string>("DeviceName")
 271124                        .IsRequired()
 271125                        .HasMaxLength(64)
 271126                        .HasColumnType("TEXT");
 271127
 271128                    b.Property<bool>("IsActive")
 271129                        .HasColumnType("INTEGER");
 271130
 271131                    b.Property<Guid>("UserId")
 271132                        .HasColumnType("TEXT");
 271133
 271134                    b.HasKey("Id");
 271135
 271136                    b.HasIndex("DeviceId");
 271137
 271138                    b.HasIndex("AccessToken", "DateLastActivity");
 271139
 271140                    b.HasIndex("DeviceId", "DateLastActivity");
 271141
 271142                    b.HasIndex("UserId", "DeviceId");
 271143
 271144                    b.ToTable("Devices");
 271145
 271146                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271147                });
 1148
 271149            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271150                {
 271151                    b.Property<int>("Id")
 271152                        .ValueGeneratedOnAdd()
 271153                        .HasColumnType("INTEGER");
 271154
 271155                    b.Property<string>("CustomName")
 271156                        .HasColumnType("TEXT");
 271157
 271158                    b.Property<string>("DeviceId")
 271159                        .IsRequired()
 271160                        .HasColumnType("TEXT");
 271161
 271162                    b.HasKey("Id");
 271163
 271164                    b.HasIndex("DeviceId")
 271165                        .IsUnique();
 271166
 271167                    b.ToTable("DeviceOptions");
 271168
 271169                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271170                });
 1171
 271172            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271173                {
 271174                    b.Property<Guid>("ItemId")
 271175                        .HasColumnType("TEXT");
 271176
 271177                    b.Property<int>("Width")
 271178                        .HasColumnType("INTEGER");
 271179
 271180                    b.Property<int>("Bandwidth")
 271181                        .HasColumnType("INTEGER");
 271182
 271183                    b.Property<int>("Height")
 271184                        .HasColumnType("INTEGER");
 271185
 271186                    b.Property<int>("Interval")
 271187                        .HasColumnType("INTEGER");
 271188
 271189                    b.Property<int>("ThumbnailCount")
 271190                        .HasColumnType("INTEGER");
 271191
 271192                    b.Property<int>("TileHeight")
 271193                        .HasColumnType("INTEGER");
 271194
 271195                    b.Property<int>("TileWidth")
 271196                        .HasColumnType("INTEGER");
 271197
 271198                    b.HasKey("ItemId", "Width");
 271199
 271200                    b.ToTable("TrickplayInfos");
 271201
 271202                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271203                });
 1204
 271205            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271206                {
 271207                    b.Property<Guid>("Id")
 271208                        .ValueGeneratedOnAdd()
 271209                        .HasColumnType("TEXT");
 271210
 271211                    b.Property<string>("AudioLanguagePreference")
 271212                        .HasMaxLength(255)
 271213                        .HasColumnType("TEXT");
 271214
 271215                    b.Property<string>("AuthenticationProviderId")
 271216                        .IsRequired()
 271217                        .HasMaxLength(255)
 271218                        .HasColumnType("TEXT");
 271219
 271220                    b.Property<string>("CastReceiverId")
 271221                        .HasMaxLength(32)
 271222                        .HasColumnType("TEXT");
 271223
 271224                    b.Property<bool>("DisplayCollectionsView")
 271225                        .HasColumnType("INTEGER");
 271226
 271227                    b.Property<bool>("DisplayMissingEpisodes")
 271228                        .HasColumnType("INTEGER");
 271229
 271230                    b.Property<bool>("EnableAutoLogin")
 271231                        .HasColumnType("INTEGER");
 271232
 271233                    b.Property<bool>("EnableLocalPassword")
 271234                        .HasColumnType("INTEGER");
 271235
 271236                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271237                        .HasColumnType("INTEGER");
 271238
 271239                    b.Property<bool>("EnableUserPreferenceAccess")
 271240                        .HasColumnType("INTEGER");
 271241
 271242                    b.Property<bool>("HidePlayedInLatest")
 271243                        .HasColumnType("INTEGER");
 271244
 271245                    b.Property<long>("InternalId")
 271246                        .HasColumnType("INTEGER");
 271247
 271248                    b.Property<int>("InvalidLoginAttemptCount")
 271249                        .HasColumnType("INTEGER");
 271250
 271251                    b.Property<DateTime?>("LastActivityDate")
 271252                        .HasColumnType("TEXT");
 271253
 271254                    b.Property<DateTime?>("LastLoginDate")
 271255                        .HasColumnType("TEXT");
 271256
 271257                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271258                        .HasColumnType("INTEGER");
 271259
 271260                    b.Property<int>("MaxActiveSessions")
 271261                        .HasColumnType("INTEGER");
 271262
 271263                    b.Property<int?>("MaxParentalRatingScore")
 271264                        .HasColumnType("INTEGER");
 271265
 271266                    b.Property<int?>("MaxParentalRatingSubScore")
 271267                        .HasColumnType("INTEGER");
 271268
 271269                    b.Property<bool>("MustUpdatePassword")
 271270                        .HasColumnType("INTEGER");
 271271
 271272                    b.Property<string>("Password")
 271273                        .HasMaxLength(65535)
 271274                        .HasColumnType("TEXT");
 271275
 271276                    b.Property<string>("PasswordResetProviderId")
 271277                        .IsRequired()
 271278                        .HasMaxLength(255)
 271279                        .HasColumnType("TEXT");
 271280
 271281                    b.Property<bool>("PlayDefaultAudioTrack")
 271282                        .HasColumnType("INTEGER");
 271283
 271284                    b.Property<bool>("RememberAudioSelections")
 271285                        .HasColumnType("INTEGER");
 271286
 271287                    b.Property<bool>("RememberSubtitleSelections")
 271288                        .HasColumnType("INTEGER");
 271289
 271290                    b.Property<int?>("RemoteClientBitrateLimit")
 271291                        .HasColumnType("INTEGER");
 271292
 271293                    b.Property<uint>("RowVersion")
 271294                        .IsConcurrencyToken()
 271295                        .HasColumnType("INTEGER");
 271296
 271297                    b.Property<string>("SubtitleLanguagePreference")
 271298                        .HasMaxLength(255)
 271299                        .HasColumnType("TEXT");
 271300
 271301                    b.Property<int>("SubtitleMode")
 271302                        .HasColumnType("INTEGER");
 271303
 271304                    b.Property<int>("SyncPlayAccess")
 271305                        .HasColumnType("INTEGER");
 271306
 271307                    b.Property<string>("Username")
 271308                        .IsRequired()
 271309                        .HasMaxLength(255)
 271310                        .HasColumnType("TEXT");
 271311
 271312                    b.HasKey("Id");
 271313
 271314                    b.HasIndex("Username")
 271315                        .IsUnique();
 271316
 271317                    b.ToTable("Users");
 271318
 271319                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271320                });
 1321
 271322            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271323                {
 271324                    b.Property<Guid>("ItemId")
 271325                        .HasColumnType("TEXT");
 271326
 271327                    b.Property<Guid>("UserId")
 271328                        .HasColumnType("TEXT");
 271329
 271330                    b.Property<string>("CustomDataKey")
 271331                        .HasColumnType("TEXT");
 271332
 271333                    b.Property<int?>("AudioStreamIndex")
 271334                        .HasColumnType("INTEGER");
 271335
 271336                    b.Property<bool>("IsFavorite")
 271337                        .HasColumnType("INTEGER");
 271338
 271339                    b.Property<DateTime?>("LastPlayedDate")
 271340                        .HasColumnType("TEXT");
 271341
 271342                    b.Property<bool?>("Likes")
 271343                        .HasColumnType("INTEGER");
 271344
 271345                    b.Property<int>("PlayCount")
 271346                        .HasColumnType("INTEGER");
 271347
 271348                    b.Property<long>("PlaybackPositionTicks")
 271349                        .HasColumnType("INTEGER");
 271350
 271351                    b.Property<bool>("Played")
 271352                        .HasColumnType("INTEGER");
 271353
 271354                    b.Property<double?>("Rating")
 271355                        .HasColumnType("REAL");
 271356
 271357                    b.Property<int?>("SubtitleStreamIndex")
 271358                        .HasColumnType("INTEGER");
 271359
 271360                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271361
 271362                    b.HasIndex("UserId");
 271363
 271364                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271365
 271366                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271367
 271368                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271369
 271370                    b.HasIndex("ItemId", "UserId", "Played");
 271371
 271372                    b.ToTable("UserData");
 271373
 271374                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271375                });
 1376
 271377            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271378                {
 271379                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271380                        .WithMany("AccessSchedules")
 271381                        .HasForeignKey("UserId")
 271382                        .OnDelete(DeleteBehavior.Cascade)
 271383                        .IsRequired();
 271384                });
 1385
 271386            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271387                {
 271388                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271389                        .WithMany("Children")
 271390                        .HasForeignKey("ItemId")
 271391                        .OnDelete(DeleteBehavior.Cascade)
 271392                        .IsRequired();
 271393
 271394                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271395                        .WithMany("ParentAncestors")
 271396                        .HasForeignKey("ParentItemId")
 271397                        .OnDelete(DeleteBehavior.Cascade)
 271398                        .IsRequired();
 271399
 271400                    b.Navigation("Item");
 271401
 271402                    b.Navigation("ParentItem");
 271403                });
 1404
 271405            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271406                {
 271407                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271408                        .WithMany()
 271409                        .HasForeignKey("ItemId")
 271410                        .OnDelete(DeleteBehavior.Cascade)
 271411                        .IsRequired();
 271412
 271413                    b.Navigation("Item");
 271414                });
 1415
 271416            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271417                {
 271418                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271419                        .WithMany("Images")
 271420                        .HasForeignKey("ItemId")
 271421                        .OnDelete(DeleteBehavior.Cascade)
 271422                        .IsRequired();
 271423
 271424                    b.Navigation("Item");
 271425                });
 1426
 271427            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271428                {
 271429                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271430                        .WithMany("LockedFields")
 271431                        .HasForeignKey("ItemId")
 271432                        .OnDelete(DeleteBehavior.Cascade)
 271433                        .IsRequired();
 271434
 271435                    b.Navigation("Item");
 271436                });
 1437
 271438            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271439                {
 271440                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271441                        .WithMany("Provider")
 271442                        .HasForeignKey("ItemId")
 271443                        .OnDelete(DeleteBehavior.Cascade)
 271444                        .IsRequired();
 271445
 271446                    b.Navigation("Item");
 271447                });
 1448
 271449            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271450                {
 271451                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271452                        .WithMany("TrailerTypes")
 271453                        .HasForeignKey("ItemId")
 271454                        .OnDelete(DeleteBehavior.Cascade)
 271455                        .IsRequired();
 271456
 271457                    b.Navigation("Item");
 271458                });
 1459
 271460            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271461                {
 271462                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271463                        .WithMany("Chapters")
 271464                        .HasForeignKey("ItemId")
 271465                        .OnDelete(DeleteBehavior.Cascade)
 271466                        .IsRequired();
 271467
 271468                    b.Navigation("Item");
 271469                });
 1470
 271471            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271472                {
 271473                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271474                        .WithMany("DisplayPreferences")
 271475                        .HasForeignKey("UserId")
 271476                        .OnDelete(DeleteBehavior.Cascade)
 271477                        .IsRequired();
 271478                });
 1479
 271480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271481                {
 271482                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271483                        .WithMany("HomeSections")
 271484                        .HasForeignKey("DisplayPreferencesId")
 271485                        .OnDelete(DeleteBehavior.Cascade)
 271486                        .IsRequired();
 271487                });
 1488
 271489            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271490                {
 271491                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271492                        .WithOne("ProfileImage")
 271493                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271494                        .OnDelete(DeleteBehavior.Cascade);
 271495                });
 1496
 271497            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271498                {
 271499                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271500                        .WithMany("ItemDisplayPreferences")
 271501                        .HasForeignKey("UserId")
 271502                        .OnDelete(DeleteBehavior.Cascade)
 271503                        .IsRequired();
 271504                });
 1505
 271506            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271507                {
 271508                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271509                        .WithMany("ItemValues")
 271510                        .HasForeignKey("ItemId")
 271511                        .OnDelete(DeleteBehavior.Cascade)
 271512                        .IsRequired();
 271513
 271514                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271515                        .WithMany("BaseItemsMap")
 271516                        .HasForeignKey("ItemValueId")
 271517                        .OnDelete(DeleteBehavior.Cascade)
 271518                        .IsRequired();
 271519
 271520                    b.Navigation("Item");
 271521
 271522                    b.Navigation("ItemValue");
 271523                });
 1524
 271525            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271526                {
 271527                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271528                        .WithMany("MediaStreams")
 271529                        .HasForeignKey("ItemId")
 271530                        .OnDelete(DeleteBehavior.Cascade)
 271531                        .IsRequired();
 271532
 271533                    b.Navigation("Item");
 271534                });
 1535
 271536            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271537                {
 271538                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271539                        .WithMany("Peoples")
 271540                        .HasForeignKey("ItemId")
 271541                        .OnDelete(DeleteBehavior.Cascade)
 271542                        .IsRequired();
 271543
 271544                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271545                        .WithMany("BaseItems")
 271546                        .HasForeignKey("PeopleId")
 271547                        .OnDelete(DeleteBehavior.Cascade)
 271548                        .IsRequired();
 271549
 271550                    b.Navigation("Item");
 271551
 271552                    b.Navigation("People");
 271553                });
 1554
 271555            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271556                {
 271557                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271558                        .WithMany("Permissions")
 271559                        .HasForeignKey("UserId")
 271560                        .OnDelete(DeleteBehavior.Cascade);
 271561                });
 1562
 271563            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271564                {
 271565                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271566                        .WithMany("Preferences")
 271567                        .HasForeignKey("UserId")
 271568                        .OnDelete(DeleteBehavior.Cascade);
 271569                });
 1570
 271571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271572                {
 271573                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271574                        .WithMany()
 271575                        .HasForeignKey("UserId")
 271576                        .OnDelete(DeleteBehavior.Cascade)
 271577                        .IsRequired();
 271578
 271579                    b.Navigation("User");
 271580                });
 1581
 271582            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271583                {
 271584                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271585                        .WithMany("UserData")
 271586                        .HasForeignKey("ItemId")
 271587                        .OnDelete(DeleteBehavior.Cascade)
 271588                        .IsRequired();
 271589
 271590                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271591                        .WithMany()
 271592                        .HasForeignKey("UserId")
 271593                        .OnDelete(DeleteBehavior.Cascade)
 271594                        .IsRequired();
 271595
 271596                    b.Navigation("Item");
 271597
 271598                    b.Navigation("User");
 271599                });
 1600
 271601            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271602                {
 271603                    b.Navigation("Chapters");
 271604
 271605                    b.Navigation("Children");
 271606
 271607                    b.Navigation("Images");
 271608
 271609                    b.Navigation("ItemValues");
 271610
 271611                    b.Navigation("LockedFields");
 271612
 271613                    b.Navigation("MediaStreams");
 271614
 271615                    b.Navigation("ParentAncestors");
 271616
 271617                    b.Navigation("Peoples");
 271618
 271619                    b.Navigation("Provider");
 271620
 271621                    b.Navigation("TrailerTypes");
 271622
 271623                    b.Navigation("UserData");
 271624                });
 1625
 271626            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271627                {
 271628                    b.Navigation("HomeSections");
 271629                });
 1630
 271631            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271632                {
 271633                    b.Navigation("BaseItemsMap");
 271634                });
 1635
 271636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271637                {
 271638                    b.Navigation("BaseItems");
 271639                });
 1640
 271641            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271642                {
 271643                    b.Navigation("AccessSchedules");
 271644
 271645                    b.Navigation("DisplayPreferences");
 271646
 271647                    b.Navigation("ItemDisplayPreferences");
 271648
 271649                    b.Navigation("Permissions");
 271650
 271651                    b.Navigation("Preferences");
 271652
 271653                    b.Navigation("ProfileImage");
 271654                });
 1655#pragma warning restore 612, 618
 271656        }
 1657    }
 1658}