< Summary - Jellyfin

Line coverage
99%
Covered lines: 1619
Uncovered lines: 10
Coverable lines: 1629
Total lines: 1725
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/11/2026 - 12:15:59 AM Line coverage: 99.3% (1589/1599) Total lines: 16938/11/2026 - 12:17:00 AM Line coverage: 99.3% (1619/1629) Total lines: 1725

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/20250331182844_FixAttachmentMigration.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixAttachmentMigration : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.AlterColumn<string>(
 2714                name: "Codec",
 2715                table: "AttachmentStreamInfos",
 2716                type: "TEXT",
 2717                nullable: true,
 2718                oldClrType: typeof(string),
 2719                oldType: "TEXT");
 2720        }
 21
 22        /// <inheritdoc />
 23        protected override void Down(MigrationBuilder migrationBuilder)
 24        {
 025            migrationBuilder.AlterColumn<string>(
 026                name: "Codec",
 027                table: "AttachmentStreamInfos",
 028                type: "TEXT",
 029                nullable: false,
 030                defaultValue: string.Empty,
 031                oldClrType: typeof(string),
 032                oldType: "TEXT",
 033                oldNullable: true);
 034        }
 35    }
 36}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250331182844_FixAttachmentMigration.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("20250331182844_FixAttachmentMigration")]
 15    partial class FixAttachmentMigration
 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                        .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<string>("ExtraIds")
 27214                        .HasColumnType("TEXT");
 27215
 27216                    b.Property<int?>("ExtraType")
 27217                        .HasColumnType("INTEGER");
 27218
 27219                    b.Property<string>("ForcedSortName")
 27220                        .HasColumnType("TEXT");
 27221
 27222                    b.Property<string>("Genres")
 27223                        .HasColumnType("TEXT");
 27224
 27225                    b.Property<int?>("Height")
 27226                        .HasColumnType("INTEGER");
 27227
 27228                    b.Property<int?>("IndexNumber")
 27229                        .HasColumnType("INTEGER");
 27230
 27231                    b.Property<int?>("InheritedParentalRatingSubValue")
 27232                        .HasColumnType("INTEGER");
 27233
 27234                    b.Property<int?>("InheritedParentalRatingValue")
 27235                        .HasColumnType("INTEGER");
 27236
 27237                    b.Property<bool>("IsFolder")
 27238                        .HasColumnType("INTEGER");
 27239
 27240                    b.Property<bool>("IsInMixedFolder")
 27241                        .HasColumnType("INTEGER");
 27242
 27243                    b.Property<bool>("IsLocked")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<bool>("IsMovie")
 27247                        .HasColumnType("INTEGER");
 27248
 27249                    b.Property<bool>("IsRepeat")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("IsSeries")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<bool>("IsVirtualItem")
 27256                        .HasColumnType("INTEGER");
 27257
 27258                    b.Property<float?>("LUFS")
 27259                        .HasColumnType("REAL");
 27260
 27261                    b.Property<string>("MediaType")
 27262                        .HasColumnType("TEXT");
 27263
 27264                    b.Property<string>("Name")
 27265                        .HasColumnType("TEXT");
 27266
 27267                    b.Property<float?>("NormalizationGain")
 27268                        .HasColumnType("REAL");
 27269
 27270                    b.Property<string>("OfficialRating")
 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<string>("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<string>("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("ParentId");
 27370
 27371                    b.HasIndex("Path");
 27372
 27373                    b.HasIndex("PresentationUniqueKey");
 27374
 27375                    b.HasIndex("TopParentId", "Id");
 27376
 27377                    b.HasIndex("Type", "TopParentId", "Id");
 27378
 27379                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27380
 27381                    b.HasIndex("Type", "TopParentId", "StartDate");
 27382
 27383                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 27384
 27385                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27386
 27387                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27388
 27389                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27390
 27391                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27392
 27393                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27394
 27395                    b.ToTable("BaseItems");
 27396
 27397                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27398                });
 399
 27400            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27401                {
 27402                    b.Property<Guid>("Id")
 27403                        .ValueGeneratedOnAdd()
 27404                        .HasColumnType("TEXT");
 27405
 27406                    b.Property<byte[]>("Blurhash")
 27407                        .HasColumnType("BLOB");
 27408
 27409                    b.Property<DateTime>("DateModified")
 27410                        .HasColumnType("TEXT");
 27411
 27412                    b.Property<int>("Height")
 27413                        .HasColumnType("INTEGER");
 27414
 27415                    b.Property<int>("ImageType")
 27416                        .HasColumnType("INTEGER");
 27417
 27418                    b.Property<Guid>("ItemId")
 27419                        .HasColumnType("TEXT");
 27420
 27421                    b.Property<string>("Path")
 27422                        .IsRequired()
 27423                        .HasColumnType("TEXT");
 27424
 27425                    b.Property<int>("Width")
 27426                        .HasColumnType("INTEGER");
 27427
 27428                    b.HasKey("Id");
 27429
 27430                    b.HasIndex("ItemId");
 27431
 27432                    b.ToTable("BaseItemImageInfos");
 27433
 27434                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27435                });
 436
 27437            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27438                {
 27439                    b.Property<int>("Id")
 27440                        .HasColumnType("INTEGER");
 27441
 27442                    b.Property<Guid>("ItemId")
 27443                        .HasColumnType("TEXT");
 27444
 27445                    b.HasKey("Id", "ItemId");
 27446
 27447                    b.HasIndex("ItemId");
 27448
 27449                    b.ToTable("BaseItemMetadataFields");
 27450
 27451                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27452                });
 453
 27454            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27455                {
 27456                    b.Property<Guid>("ItemId")
 27457                        .HasColumnType("TEXT");
 27458
 27459                    b.Property<string>("ProviderId")
 27460                        .HasColumnType("TEXT");
 27461
 27462                    b.Property<string>("ProviderValue")
 27463                        .IsRequired()
 27464                        .HasColumnType("TEXT");
 27465
 27466                    b.HasKey("ItemId", "ProviderId");
 27467
 27468                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 27469
 27470                    b.ToTable("BaseItemProviders");
 27471
 27472                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27473                });
 474
 27475            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27476                {
 27477                    b.Property<int>("Id")
 27478                        .HasColumnType("INTEGER");
 27479
 27480                    b.Property<Guid>("ItemId")
 27481                        .HasColumnType("TEXT");
 27482
 27483                    b.HasKey("Id", "ItemId");
 27484
 27485                    b.HasIndex("ItemId");
 27486
 27487                    b.ToTable("BaseItemTrailerTypes");
 27488
 27489                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27490                });
 491
 27492            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27493                {
 27494                    b.Property<Guid>("ItemId")
 27495                        .HasColumnType("TEXT");
 27496
 27497                    b.Property<int>("ChapterIndex")
 27498                        .HasColumnType("INTEGER");
 27499
 27500                    b.Property<DateTime?>("ImageDateModified")
 27501                        .HasColumnType("TEXT");
 27502
 27503                    b.Property<string>("ImagePath")
 27504                        .HasColumnType("TEXT");
 27505
 27506                    b.Property<string>("Name")
 27507                        .HasColumnType("TEXT");
 27508
 27509                    b.Property<long>("StartPositionTicks")
 27510                        .HasColumnType("INTEGER");
 27511
 27512                    b.HasKey("ItemId", "ChapterIndex");
 27513
 27514                    b.ToTable("Chapters");
 27515
 27516                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27517                });
 518
 27519            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27520                {
 27521                    b.Property<int>("Id")
 27522                        .ValueGeneratedOnAdd()
 27523                        .HasColumnType("INTEGER");
 27524
 27525                    b.Property<string>("Client")
 27526                        .IsRequired()
 27527                        .HasMaxLength(32)
 27528                        .HasColumnType("TEXT");
 27529
 27530                    b.Property<Guid>("ItemId")
 27531                        .HasColumnType("TEXT");
 27532
 27533                    b.Property<string>("Key")
 27534                        .IsRequired()
 27535                        .HasColumnType("TEXT");
 27536
 27537                    b.Property<Guid>("UserId")
 27538                        .HasColumnType("TEXT");
 27539
 27540                    b.Property<string>("Value")
 27541                        .HasColumnType("TEXT");
 27542
 27543                    b.HasKey("Id");
 27544
 27545                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27546                        .IsUnique();
 27547
 27548                    b.ToTable("CustomItemDisplayPreferences");
 27549
 27550                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27551                });
 552
 27553            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27554                {
 27555                    b.Property<int>("Id")
 27556                        .ValueGeneratedOnAdd()
 27557                        .HasColumnType("INTEGER");
 27558
 27559                    b.Property<int>("ChromecastVersion")
 27560                        .HasColumnType("INTEGER");
 27561
 27562                    b.Property<string>("Client")
 27563                        .IsRequired()
 27564                        .HasMaxLength(32)
 27565                        .HasColumnType("TEXT");
 27566
 27567                    b.Property<string>("DashboardTheme")
 27568                        .HasMaxLength(32)
 27569                        .HasColumnType("TEXT");
 27570
 27571                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27572                        .HasColumnType("INTEGER");
 27573
 27574                    b.Property<int?>("IndexBy")
 27575                        .HasColumnType("INTEGER");
 27576
 27577                    b.Property<Guid>("ItemId")
 27578                        .HasColumnType("TEXT");
 27579
 27580                    b.Property<int>("ScrollDirection")
 27581                        .HasColumnType("INTEGER");
 27582
 27583                    b.Property<bool>("ShowBackdrop")
 27584                        .HasColumnType("INTEGER");
 27585
 27586                    b.Property<bool>("ShowSidebar")
 27587                        .HasColumnType("INTEGER");
 27588
 27589                    b.Property<int>("SkipBackwardLength")
 27590                        .HasColumnType("INTEGER");
 27591
 27592                    b.Property<int>("SkipForwardLength")
 27593                        .HasColumnType("INTEGER");
 27594
 27595                    b.Property<string>("TvHome")
 27596                        .HasMaxLength(32)
 27597                        .HasColumnType("TEXT");
 27598
 27599                    b.Property<Guid>("UserId")
 27600                        .HasColumnType("TEXT");
 27601
 27602                    b.HasKey("Id");
 27603
 27604                    b.HasIndex("UserId", "ItemId", "Client")
 27605                        .IsUnique();
 27606
 27607                    b.ToTable("DisplayPreferences");
 27608
 27609                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27610                });
 611
 27612            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27613                {
 27614                    b.Property<int>("Id")
 27615                        .ValueGeneratedOnAdd()
 27616                        .HasColumnType("INTEGER");
 27617
 27618                    b.Property<int>("DisplayPreferencesId")
 27619                        .HasColumnType("INTEGER");
 27620
 27621                    b.Property<int>("Order")
 27622                        .HasColumnType("INTEGER");
 27623
 27624                    b.Property<int>("Type")
 27625                        .HasColumnType("INTEGER");
 27626
 27627                    b.HasKey("Id");
 27628
 27629                    b.HasIndex("DisplayPreferencesId");
 27630
 27631                    b.ToTable("HomeSection");
 27632
 27633                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27634                });
 635
 27636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27637                {
 27638                    b.Property<int>("Id")
 27639                        .ValueGeneratedOnAdd()
 27640                        .HasColumnType("INTEGER");
 27641
 27642                    b.Property<DateTime>("LastModified")
 27643                        .HasColumnType("TEXT");
 27644
 27645                    b.Property<string>("Path")
 27646                        .IsRequired()
 27647                        .HasMaxLength(512)
 27648                        .HasColumnType("TEXT");
 27649
 27650                    b.Property<Guid?>("UserId")
 27651                        .HasColumnType("TEXT");
 27652
 27653                    b.HasKey("Id");
 27654
 27655                    b.HasIndex("UserId")
 27656                        .IsUnique();
 27657
 27658                    b.ToTable("ImageInfos");
 27659
 27660                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27661                });
 662
 27663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27664                {
 27665                    b.Property<int>("Id")
 27666                        .ValueGeneratedOnAdd()
 27667                        .HasColumnType("INTEGER");
 27668
 27669                    b.Property<string>("Client")
 27670                        .IsRequired()
 27671                        .HasMaxLength(32)
 27672                        .HasColumnType("TEXT");
 27673
 27674                    b.Property<int?>("IndexBy")
 27675                        .HasColumnType("INTEGER");
 27676
 27677                    b.Property<Guid>("ItemId")
 27678                        .HasColumnType("TEXT");
 27679
 27680                    b.Property<bool>("RememberIndexing")
 27681                        .HasColumnType("INTEGER");
 27682
 27683                    b.Property<bool>("RememberSorting")
 27684                        .HasColumnType("INTEGER");
 27685
 27686                    b.Property<string>("SortBy")
 27687                        .IsRequired()
 27688                        .HasMaxLength(64)
 27689                        .HasColumnType("TEXT");
 27690
 27691                    b.Property<int>("SortOrder")
 27692                        .HasColumnType("INTEGER");
 27693
 27694                    b.Property<Guid>("UserId")
 27695                        .HasColumnType("TEXT");
 27696
 27697                    b.Property<int>("ViewType")
 27698                        .HasColumnType("INTEGER");
 27699
 27700                    b.HasKey("Id");
 27701
 27702                    b.HasIndex("UserId");
 27703
 27704                    b.ToTable("ItemDisplayPreferences");
 27705
 27706                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27707                });
 708
 27709            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27710                {
 27711                    b.Property<Guid>("ItemValueId")
 27712                        .ValueGeneratedOnAdd()
 27713                        .HasColumnType("TEXT");
 27714
 27715                    b.Property<string>("CleanValue")
 27716                        .IsRequired()
 27717                        .HasColumnType("TEXT");
 27718
 27719                    b.Property<int>("Type")
 27720                        .HasColumnType("INTEGER");
 27721
 27722                    b.Property<string>("Value")
 27723                        .IsRequired()
 27724                        .HasColumnType("TEXT");
 27725
 27726                    b.HasKey("ItemValueId");
 27727
 27728                    b.HasIndex("Type", "CleanValue")
 27729                        .IsUnique();
 27730
 27731                    b.ToTable("ItemValues");
 27732
 27733                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27734                });
 735
 27736            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27737                {
 27738                    b.Property<Guid>("ItemValueId")
 27739                        .HasColumnType("TEXT");
 27740
 27741                    b.Property<Guid>("ItemId")
 27742                        .HasColumnType("TEXT");
 27743
 27744                    b.HasKey("ItemValueId", "ItemId");
 27745
 27746                    b.HasIndex("ItemId");
 27747
 27748                    b.ToTable("ItemValuesMap");
 27749
 27750                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27751                });
 752
 27753            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27754                {
 27755                    b.Property<Guid>("ItemId")
 27756                        .HasColumnType("TEXT");
 27757
 27758                    b.PrimitiveCollection<string>("KeyframeTicks")
 27759                        .HasColumnType("TEXT");
 27760
 27761                    b.Property<long>("TotalDuration")
 27762                        .HasColumnType("INTEGER");
 27763
 27764                    b.HasKey("ItemId");
 27765
 27766                    b.ToTable("KeyframeData");
 27767
 27768                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27769                });
 770
 27771            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27772                {
 27773                    b.Property<Guid>("Id")
 27774                        .ValueGeneratedOnAdd()
 27775                        .HasColumnType("TEXT");
 27776
 27777                    b.Property<long>("EndTicks")
 27778                        .HasColumnType("INTEGER");
 27779
 27780                    b.Property<Guid>("ItemId")
 27781                        .HasColumnType("TEXT");
 27782
 27783                    b.Property<string>("SegmentProviderId")
 27784                        .IsRequired()
 27785                        .HasColumnType("TEXT");
 27786
 27787                    b.Property<long>("StartTicks")
 27788                        .HasColumnType("INTEGER");
 27789
 27790                    b.Property<int>("Type")
 27791                        .HasColumnType("INTEGER");
 27792
 27793                    b.HasKey("Id");
 27794
 27795                    b.ToTable("MediaSegments");
 27796
 27797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27798                });
 799
 27800            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27801                {
 27802                    b.Property<Guid>("ItemId")
 27803                        .HasColumnType("TEXT");
 27804
 27805                    b.Property<int>("StreamIndex")
 27806                        .HasColumnType("INTEGER");
 27807
 27808                    b.Property<string>("AspectRatio")
 27809                        .HasColumnType("TEXT");
 27810
 27811                    b.Property<float?>("AverageFrameRate")
 27812                        .HasColumnType("REAL");
 27813
 27814                    b.Property<int?>("BitDepth")
 27815                        .HasColumnType("INTEGER");
 27816
 27817                    b.Property<int?>("BitRate")
 27818                        .HasColumnType("INTEGER");
 27819
 27820                    b.Property<int?>("BlPresentFlag")
 27821                        .HasColumnType("INTEGER");
 27822
 27823                    b.Property<string>("ChannelLayout")
 27824                        .HasColumnType("TEXT");
 27825
 27826                    b.Property<int?>("Channels")
 27827                        .HasColumnType("INTEGER");
 27828
 27829                    b.Property<string>("Codec")
 27830                        .HasColumnType("TEXT");
 27831
 27832                    b.Property<string>("CodecTag")
 27833                        .HasColumnType("TEXT");
 27834
 27835                    b.Property<string>("CodecTimeBase")
 27836                        .HasColumnType("TEXT");
 27837
 27838                    b.Property<string>("ColorPrimaries")
 27839                        .HasColumnType("TEXT");
 27840
 27841                    b.Property<string>("ColorSpace")
 27842                        .HasColumnType("TEXT");
 27843
 27844                    b.Property<string>("ColorTransfer")
 27845                        .HasColumnType("TEXT");
 27846
 27847                    b.Property<string>("Comment")
 27848                        .HasColumnType("TEXT");
 27849
 27850                    b.Property<int?>("DvBlSignalCompatibilityId")
 27851                        .HasColumnType("INTEGER");
 27852
 27853                    b.Property<int?>("DvLevel")
 27854                        .HasColumnType("INTEGER");
 27855
 27856                    b.Property<int?>("DvProfile")
 27857                        .HasColumnType("INTEGER");
 27858
 27859                    b.Property<int?>("DvVersionMajor")
 27860                        .HasColumnType("INTEGER");
 27861
 27862                    b.Property<int?>("DvVersionMinor")
 27863                        .HasColumnType("INTEGER");
 27864
 27865                    b.Property<int?>("ElPresentFlag")
 27866                        .HasColumnType("INTEGER");
 27867
 27868                    b.Property<bool?>("Hdr10PlusPresentFlag")
 27869                        .HasColumnType("INTEGER");
 27870
 27871                    b.Property<int?>("Height")
 27872                        .HasColumnType("INTEGER");
 27873
 27874                    b.Property<bool?>("IsAnamorphic")
 27875                        .HasColumnType("INTEGER");
 27876
 27877                    b.Property<bool?>("IsAvc")
 27878                        .HasColumnType("INTEGER");
 27879
 27880                    b.Property<bool>("IsDefault")
 27881                        .HasColumnType("INTEGER");
 27882
 27883                    b.Property<bool>("IsExternal")
 27884                        .HasColumnType("INTEGER");
 27885
 27886                    b.Property<bool>("IsForced")
 27887                        .HasColumnType("INTEGER");
 27888
 27889                    b.Property<bool?>("IsHearingImpaired")
 27890                        .HasColumnType("INTEGER");
 27891
 27892                    b.Property<bool?>("IsInterlaced")
 27893                        .HasColumnType("INTEGER");
 27894
 27895                    b.Property<string>("KeyFrames")
 27896                        .HasColumnType("TEXT");
 27897
 27898                    b.Property<string>("Language")
 27899                        .HasColumnType("TEXT");
 27900
 27901                    b.Property<float?>("Level")
 27902                        .HasColumnType("REAL");
 27903
 27904                    b.Property<string>("NalLengthSize")
 27905                        .HasColumnType("TEXT");
 27906
 27907                    b.Property<string>("Path")
 27908                        .HasColumnType("TEXT");
 27909
 27910                    b.Property<string>("PixelFormat")
 27911                        .HasColumnType("TEXT");
 27912
 27913                    b.Property<string>("Profile")
 27914                        .HasColumnType("TEXT");
 27915
 27916                    b.Property<float?>("RealFrameRate")
 27917                        .HasColumnType("REAL");
 27918
 27919                    b.Property<int?>("RefFrames")
 27920                        .HasColumnType("INTEGER");
 27921
 27922                    b.Property<int?>("Rotation")
 27923                        .HasColumnType("INTEGER");
 27924
 27925                    b.Property<int?>("RpuPresentFlag")
 27926                        .HasColumnType("INTEGER");
 27927
 27928                    b.Property<int?>("SampleRate")
 27929                        .HasColumnType("INTEGER");
 27930
 27931                    b.Property<int>("StreamType")
 27932                        .HasColumnType("INTEGER");
 27933
 27934                    b.Property<string>("TimeBase")
 27935                        .HasColumnType("TEXT");
 27936
 27937                    b.Property<string>("Title")
 27938                        .HasColumnType("TEXT");
 27939
 27940                    b.Property<int?>("Width")
 27941                        .HasColumnType("INTEGER");
 27942
 27943                    b.HasKey("ItemId", "StreamIndex");
 27944
 27945                    b.HasIndex("StreamIndex");
 27946
 27947                    b.HasIndex("StreamType");
 27948
 27949                    b.HasIndex("StreamIndex", "StreamType");
 27950
 27951                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27952
 27953                    b.ToTable("MediaStreamInfos");
 27954
 27955                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27956                });
 957
 27958            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 27959                {
 27960                    b.Property<Guid>("Id")
 27961                        .ValueGeneratedOnAdd()
 27962                        .HasColumnType("TEXT");
 27963
 27964                    b.Property<string>("Name")
 27965                        .IsRequired()
 27966                        .HasColumnType("TEXT");
 27967
 27968                    b.Property<string>("PersonType")
 27969                        .HasColumnType("TEXT");
 27970
 27971                    b.HasKey("Id");
 27972
 27973                    b.HasIndex("Name");
 27974
 27975                    b.ToTable("Peoples");
 27976
 27977                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27978                });
 979
 27980            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 27981                {
 27982                    b.Property<Guid>("ItemId")
 27983                        .HasColumnType("TEXT");
 27984
 27985                    b.Property<Guid>("PeopleId")
 27986                        .HasColumnType("TEXT");
 27987
 27988                    b.Property<int?>("ListOrder")
 27989                        .HasColumnType("INTEGER");
 27990
 27991                    b.Property<string>("Role")
 27992                        .HasColumnType("TEXT");
 27993
 27994                    b.Property<int?>("SortOrder")
 27995                        .HasColumnType("INTEGER");
 27996
 27997                    b.HasKey("ItemId", "PeopleId");
 27998
 27999                    b.HasIndex("PeopleId");
 271000
 271001                    b.HasIndex("ItemId", "ListOrder");
 271002
 271003                    b.HasIndex("ItemId", "SortOrder");
 271004
 271005                    b.ToTable("PeopleBaseItemMap");
 271006
 271007                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271008                });
 1009
 271010            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271011                {
 271012                    b.Property<int>("Id")
 271013                        .ValueGeneratedOnAdd()
 271014                        .HasColumnType("INTEGER");
 271015
 271016                    b.Property<int>("Kind")
 271017                        .HasColumnType("INTEGER");
 271018
 271019                    b.Property<Guid?>("Permission_Permissions_Guid")
 271020                        .HasColumnType("TEXT");
 271021
 271022                    b.Property<uint>("RowVersion")
 271023                        .IsConcurrencyToken()
 271024                        .HasColumnType("INTEGER");
 271025
 271026                    b.Property<Guid?>("UserId")
 271027                        .HasColumnType("TEXT");
 271028
 271029                    b.Property<bool>("Value")
 271030                        .HasColumnType("INTEGER");
 271031
 271032                    b.HasKey("Id");
 271033
 271034                    b.HasIndex("UserId", "Kind")
 271035                        .IsUnique()
 271036                        .HasFilter("[UserId] IS NOT NULL");
 271037
 271038                    b.ToTable("Permissions");
 271039
 271040                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271041                });
 1042
 271043            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271044                {
 271045                    b.Property<int>("Id")
 271046                        .ValueGeneratedOnAdd()
 271047                        .HasColumnType("INTEGER");
 271048
 271049                    b.Property<int>("Kind")
 271050                        .HasColumnType("INTEGER");
 271051
 271052                    b.Property<Guid?>("Preference_Preferences_Guid")
 271053                        .HasColumnType("TEXT");
 271054
 271055                    b.Property<uint>("RowVersion")
 271056                        .IsConcurrencyToken()
 271057                        .HasColumnType("INTEGER");
 271058
 271059                    b.Property<Guid?>("UserId")
 271060                        .HasColumnType("TEXT");
 271061
 271062                    b.Property<string>("Value")
 271063                        .IsRequired()
 271064                        .HasMaxLength(65535)
 271065                        .HasColumnType("TEXT");
 271066
 271067                    b.HasKey("Id");
 271068
 271069                    b.HasIndex("UserId", "Kind")
 271070                        .IsUnique()
 271071                        .HasFilter("[UserId] IS NOT NULL");
 271072
 271073                    b.ToTable("Preferences");
 271074
 271075                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271076                });
 1077
 271078            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271079                {
 271080                    b.Property<int>("Id")
 271081                        .ValueGeneratedOnAdd()
 271082                        .HasColumnType("INTEGER");
 271083
 271084                    b.Property<string>("AccessToken")
 271085                        .IsRequired()
 271086                        .HasColumnType("TEXT");
 271087
 271088                    b.Property<DateTime>("DateCreated")
 271089                        .HasColumnType("TEXT");
 271090
 271091                    b.Property<DateTime>("DateLastActivity")
 271092                        .HasColumnType("TEXT");
 271093
 271094                    b.Property<string>("Name")
 271095                        .IsRequired()
 271096                        .HasMaxLength(64)
 271097                        .HasColumnType("TEXT");
 271098
 271099                    b.HasKey("Id");
 271100
 271101                    b.HasIndex("AccessToken")
 271102                        .IsUnique();
 271103
 271104                    b.ToTable("ApiKeys");
 271105
 271106                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271107                });
 1108
 271109            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271110                {
 271111                    b.Property<int>("Id")
 271112                        .ValueGeneratedOnAdd()
 271113                        .HasColumnType("INTEGER");
 271114
 271115                    b.Property<string>("AccessToken")
 271116                        .IsRequired()
 271117                        .HasColumnType("TEXT");
 271118
 271119                    b.Property<string>("AppName")
 271120                        .IsRequired()
 271121                        .HasMaxLength(64)
 271122                        .HasColumnType("TEXT");
 271123
 271124                    b.Property<string>("AppVersion")
 271125                        .IsRequired()
 271126                        .HasMaxLength(32)
 271127                        .HasColumnType("TEXT");
 271128
 271129                    b.Property<DateTime>("DateCreated")
 271130                        .HasColumnType("TEXT");
 271131
 271132                    b.Property<DateTime>("DateLastActivity")
 271133                        .HasColumnType("TEXT");
 271134
 271135                    b.Property<DateTime>("DateModified")
 271136                        .HasColumnType("TEXT");
 271137
 271138                    b.Property<string>("DeviceId")
 271139                        .IsRequired()
 271140                        .HasMaxLength(256)
 271141                        .HasColumnType("TEXT");
 271142
 271143                    b.Property<string>("DeviceName")
 271144                        .IsRequired()
 271145                        .HasMaxLength(64)
 271146                        .HasColumnType("TEXT");
 271147
 271148                    b.Property<bool>("IsActive")
 271149                        .HasColumnType("INTEGER");
 271150
 271151                    b.Property<Guid>("UserId")
 271152                        .HasColumnType("TEXT");
 271153
 271154                    b.HasKey("Id");
 271155
 271156                    b.HasIndex("DeviceId");
 271157
 271158                    b.HasIndex("AccessToken", "DateLastActivity");
 271159
 271160                    b.HasIndex("DeviceId", "DateLastActivity");
 271161
 271162                    b.HasIndex("UserId", "DeviceId");
 271163
 271164                    b.ToTable("Devices");
 271165
 271166                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271167                });
 1168
 271169            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271170                {
 271171                    b.Property<int>("Id")
 271172                        .ValueGeneratedOnAdd()
 271173                        .HasColumnType("INTEGER");
 271174
 271175                    b.Property<string>("CustomName")
 271176                        .HasColumnType("TEXT");
 271177
 271178                    b.Property<string>("DeviceId")
 271179                        .IsRequired()
 271180                        .HasColumnType("TEXT");
 271181
 271182                    b.HasKey("Id");
 271183
 271184                    b.HasIndex("DeviceId")
 271185                        .IsUnique();
 271186
 271187                    b.ToTable("DeviceOptions");
 271188
 271189                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271190                });
 1191
 271192            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271193                {
 271194                    b.Property<Guid>("ItemId")
 271195                        .HasColumnType("TEXT");
 271196
 271197                    b.Property<int>("Width")
 271198                        .HasColumnType("INTEGER");
 271199
 271200                    b.Property<int>("Bandwidth")
 271201                        .HasColumnType("INTEGER");
 271202
 271203                    b.Property<int>("Height")
 271204                        .HasColumnType("INTEGER");
 271205
 271206                    b.Property<int>("Interval")
 271207                        .HasColumnType("INTEGER");
 271208
 271209                    b.Property<int>("ThumbnailCount")
 271210                        .HasColumnType("INTEGER");
 271211
 271212                    b.Property<int>("TileHeight")
 271213                        .HasColumnType("INTEGER");
 271214
 271215                    b.Property<int>("TileWidth")
 271216                        .HasColumnType("INTEGER");
 271217
 271218                    b.HasKey("ItemId", "Width");
 271219
 271220                    b.ToTable("TrickplayInfos");
 271221
 271222                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271223                });
 1224
 271225            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271226                {
 271227                    b.Property<Guid>("Id")
 271228                        .ValueGeneratedOnAdd()
 271229                        .HasColumnType("TEXT");
 271230
 271231                    b.Property<string>("AudioLanguagePreference")
 271232                        .HasMaxLength(255)
 271233                        .HasColumnType("TEXT");
 271234
 271235                    b.Property<string>("AuthenticationProviderId")
 271236                        .IsRequired()
 271237                        .HasMaxLength(255)
 271238                        .HasColumnType("TEXT");
 271239
 271240                    b.Property<string>("CastReceiverId")
 271241                        .HasMaxLength(32)
 271242                        .HasColumnType("TEXT");
 271243
 271244                    b.Property<bool>("DisplayCollectionsView")
 271245                        .HasColumnType("INTEGER");
 271246
 271247                    b.Property<bool>("DisplayMissingEpisodes")
 271248                        .HasColumnType("INTEGER");
 271249
 271250                    b.Property<bool>("EnableAutoLogin")
 271251                        .HasColumnType("INTEGER");
 271252
 271253                    b.Property<bool>("EnableLocalPassword")
 271254                        .HasColumnType("INTEGER");
 271255
 271256                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271257                        .HasColumnType("INTEGER");
 271258
 271259                    b.Property<bool>("EnableUserPreferenceAccess")
 271260                        .HasColumnType("INTEGER");
 271261
 271262                    b.Property<bool>("HidePlayedInLatest")
 271263                        .HasColumnType("INTEGER");
 271264
 271265                    b.Property<long>("InternalId")
 271266                        .HasColumnType("INTEGER");
 271267
 271268                    b.Property<int>("InvalidLoginAttemptCount")
 271269                        .HasColumnType("INTEGER");
 271270
 271271                    b.Property<DateTime?>("LastActivityDate")
 271272                        .HasColumnType("TEXT");
 271273
 271274                    b.Property<DateTime?>("LastLoginDate")
 271275                        .HasColumnType("TEXT");
 271276
 271277                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271278                        .HasColumnType("INTEGER");
 271279
 271280                    b.Property<int>("MaxActiveSessions")
 271281                        .HasColumnType("INTEGER");
 271282
 271283                    b.Property<int?>("MaxParentalRatingScore")
 271284                        .HasColumnType("INTEGER");
 271285
 271286                    b.Property<int?>("MaxParentalRatingSubScore")
 271287                        .HasColumnType("INTEGER");
 271288
 271289                    b.Property<bool>("MustUpdatePassword")
 271290                        .HasColumnType("INTEGER");
 271291
 271292                    b.Property<string>("Password")
 271293                        .HasMaxLength(65535)
 271294                        .HasColumnType("TEXT");
 271295
 271296                    b.Property<string>("PasswordResetProviderId")
 271297                        .IsRequired()
 271298                        .HasMaxLength(255)
 271299                        .HasColumnType("TEXT");
 271300
 271301                    b.Property<bool>("PlayDefaultAudioTrack")
 271302                        .HasColumnType("INTEGER");
 271303
 271304                    b.Property<bool>("RememberAudioSelections")
 271305                        .HasColumnType("INTEGER");
 271306
 271307                    b.Property<bool>("RememberSubtitleSelections")
 271308                        .HasColumnType("INTEGER");
 271309
 271310                    b.Property<int?>("RemoteClientBitrateLimit")
 271311                        .HasColumnType("INTEGER");
 271312
 271313                    b.Property<uint>("RowVersion")
 271314                        .IsConcurrencyToken()
 271315                        .HasColumnType("INTEGER");
 271316
 271317                    b.Property<string>("SubtitleLanguagePreference")
 271318                        .HasMaxLength(255)
 271319                        .HasColumnType("TEXT");
 271320
 271321                    b.Property<int>("SubtitleMode")
 271322                        .HasColumnType("INTEGER");
 271323
 271324                    b.Property<int>("SyncPlayAccess")
 271325                        .HasColumnType("INTEGER");
 271326
 271327                    b.Property<string>("Username")
 271328                        .IsRequired()
 271329                        .HasMaxLength(255)
 271330                        .HasColumnType("TEXT");
 271331
 271332                    b.HasKey("Id");
 271333
 271334                    b.HasIndex("Username")
 271335                        .IsUnique();
 271336
 271337                    b.ToTable("Users");
 271338
 271339                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271340                });
 1341
 271342            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271343                {
 271344                    b.Property<Guid>("ItemId")
 271345                        .HasColumnType("TEXT");
 271346
 271347                    b.Property<Guid>("UserId")
 271348                        .HasColumnType("TEXT");
 271349
 271350                    b.Property<string>("CustomDataKey")
 271351                        .HasColumnType("TEXT");
 271352
 271353                    b.Property<int?>("AudioStreamIndex")
 271354                        .HasColumnType("INTEGER");
 271355
 271356                    b.Property<bool>("IsFavorite")
 271357                        .HasColumnType("INTEGER");
 271358
 271359                    b.Property<DateTime?>("LastPlayedDate")
 271360                        .HasColumnType("TEXT");
 271361
 271362                    b.Property<bool?>("Likes")
 271363                        .HasColumnType("INTEGER");
 271364
 271365                    b.Property<int>("PlayCount")
 271366                        .HasColumnType("INTEGER");
 271367
 271368                    b.Property<long>("PlaybackPositionTicks")
 271369                        .HasColumnType("INTEGER");
 271370
 271371                    b.Property<bool>("Played")
 271372                        .HasColumnType("INTEGER");
 271373
 271374                    b.Property<double?>("Rating")
 271375                        .HasColumnType("REAL");
 271376
 271377                    b.Property<int?>("SubtitleStreamIndex")
 271378                        .HasColumnType("INTEGER");
 271379
 271380                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271381
 271382                    b.HasIndex("UserId");
 271383
 271384                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271385
 271386                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271387
 271388                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271389
 271390                    b.HasIndex("ItemId", "UserId", "Played");
 271391
 271392                    b.ToTable("UserData");
 271393
 271394                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271395                });
 1396
 271397            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271398                {
 271399                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271400                        .WithMany("AccessSchedules")
 271401                        .HasForeignKey("UserId")
 271402                        .OnDelete(DeleteBehavior.Cascade)
 271403                        .IsRequired();
 271404                });
 1405
 271406            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271407                {
 271408                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271409                        .WithMany("Children")
 271410                        .HasForeignKey("ItemId")
 271411                        .OnDelete(DeleteBehavior.Cascade)
 271412                        .IsRequired();
 271413
 271414                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271415                        .WithMany("ParentAncestors")
 271416                        .HasForeignKey("ParentItemId")
 271417                        .OnDelete(DeleteBehavior.Cascade)
 271418                        .IsRequired();
 271419
 271420                    b.Navigation("Item");
 271421
 271422                    b.Navigation("ParentItem");
 271423                });
 1424
 271425            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271426                {
 271427                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271428                        .WithMany()
 271429                        .HasForeignKey("ItemId")
 271430                        .OnDelete(DeleteBehavior.Cascade)
 271431                        .IsRequired();
 271432
 271433                    b.Navigation("Item");
 271434                });
 1435
 271436            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271437                {
 271438                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271439                        .WithMany("Images")
 271440                        .HasForeignKey("ItemId")
 271441                        .OnDelete(DeleteBehavior.Cascade)
 271442                        .IsRequired();
 271443
 271444                    b.Navigation("Item");
 271445                });
 1446
 271447            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271448                {
 271449                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271450                        .WithMany("LockedFields")
 271451                        .HasForeignKey("ItemId")
 271452                        .OnDelete(DeleteBehavior.Cascade)
 271453                        .IsRequired();
 271454
 271455                    b.Navigation("Item");
 271456                });
 1457
 271458            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271459                {
 271460                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271461                        .WithMany("Provider")
 271462                        .HasForeignKey("ItemId")
 271463                        .OnDelete(DeleteBehavior.Cascade)
 271464                        .IsRequired();
 271465
 271466                    b.Navigation("Item");
 271467                });
 1468
 271469            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271470                {
 271471                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271472                        .WithMany("TrailerTypes")
 271473                        .HasForeignKey("ItemId")
 271474                        .OnDelete(DeleteBehavior.Cascade)
 271475                        .IsRequired();
 271476
 271477                    b.Navigation("Item");
 271478                });
 1479
 271480            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271481                {
 271482                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271483                        .WithMany("Chapters")
 271484                        .HasForeignKey("ItemId")
 271485                        .OnDelete(DeleteBehavior.Cascade)
 271486                        .IsRequired();
 271487
 271488                    b.Navigation("Item");
 271489                });
 1490
 271491            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271492                {
 271493                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271494                        .WithMany("DisplayPreferences")
 271495                        .HasForeignKey("UserId")
 271496                        .OnDelete(DeleteBehavior.Cascade)
 271497                        .IsRequired();
 271498                });
 1499
 271500            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271501                {
 271502                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271503                        .WithMany("HomeSections")
 271504                        .HasForeignKey("DisplayPreferencesId")
 271505                        .OnDelete(DeleteBehavior.Cascade)
 271506                        .IsRequired();
 271507                });
 1508
 271509            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271510                {
 271511                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271512                        .WithOne("ProfileImage")
 271513                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271514                        .OnDelete(DeleteBehavior.Cascade);
 271515                });
 1516
 271517            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271518                {
 271519                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271520                        .WithMany("ItemDisplayPreferences")
 271521                        .HasForeignKey("UserId")
 271522                        .OnDelete(DeleteBehavior.Cascade)
 271523                        .IsRequired();
 271524                });
 1525
 271526            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271527                {
 271528                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271529                        .WithMany("ItemValues")
 271530                        .HasForeignKey("ItemId")
 271531                        .OnDelete(DeleteBehavior.Cascade)
 271532                        .IsRequired();
 271533
 271534                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271535                        .WithMany("BaseItemsMap")
 271536                        .HasForeignKey("ItemValueId")
 271537                        .OnDelete(DeleteBehavior.Cascade)
 271538                        .IsRequired();
 271539
 271540                    b.Navigation("Item");
 271541
 271542                    b.Navigation("ItemValue");
 271543                });
 1544
 271545            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271546                {
 271547                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271548                        .WithMany()
 271549                        .HasForeignKey("ItemId")
 271550                        .OnDelete(DeleteBehavior.Cascade)
 271551                        .IsRequired();
 271552
 271553                    b.Navigation("Item");
 271554                });
 1555
 271556            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271557                {
 271558                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271559                        .WithMany("MediaStreams")
 271560                        .HasForeignKey("ItemId")
 271561                        .OnDelete(DeleteBehavior.Cascade)
 271562                        .IsRequired();
 271563
 271564                    b.Navigation("Item");
 271565                });
 1566
 271567            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271568                {
 271569                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271570                        .WithMany("Peoples")
 271571                        .HasForeignKey("ItemId")
 271572                        .OnDelete(DeleteBehavior.Cascade)
 271573                        .IsRequired();
 271574
 271575                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271576                        .WithMany("BaseItems")
 271577                        .HasForeignKey("PeopleId")
 271578                        .OnDelete(DeleteBehavior.Cascade)
 271579                        .IsRequired();
 271580
 271581                    b.Navigation("Item");
 271582
 271583                    b.Navigation("People");
 271584                });
 1585
 271586            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271587                {
 271588                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271589                        .WithMany("Permissions")
 271590                        .HasForeignKey("UserId")
 271591                        .OnDelete(DeleteBehavior.Cascade);
 271592                });
 1593
 271594            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271595                {
 271596                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271597                        .WithMany("Preferences")
 271598                        .HasForeignKey("UserId")
 271599                        .OnDelete(DeleteBehavior.Cascade);
 271600                });
 1601
 271602            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271603                {
 271604                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271605                        .WithMany()
 271606                        .HasForeignKey("UserId")
 271607                        .OnDelete(DeleteBehavior.Cascade)
 271608                        .IsRequired();
 271609
 271610                    b.Navigation("User");
 271611                });
 1612
 271613            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271614                {
 271615                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271616                        .WithMany("UserData")
 271617                        .HasForeignKey("ItemId")
 271618                        .OnDelete(DeleteBehavior.Cascade)
 271619                        .IsRequired();
 271620
 271621                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271622                        .WithMany()
 271623                        .HasForeignKey("UserId")
 271624                        .OnDelete(DeleteBehavior.Cascade)
 271625                        .IsRequired();
 271626
 271627                    b.Navigation("Item");
 271628
 271629                    b.Navigation("User");
 271630                });
 1631
 271632            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271633                {
 271634                    b.Navigation("Chapters");
 271635
 271636                    b.Navigation("Children");
 271637
 271638                    b.Navigation("Images");
 271639
 271640                    b.Navigation("ItemValues");
 271641
 271642                    b.Navigation("LockedFields");
 271643
 271644                    b.Navigation("MediaStreams");
 271645
 271646                    b.Navigation("ParentAncestors");
 271647
 271648                    b.Navigation("Peoples");
 271649
 271650                    b.Navigation("Provider");
 271651
 271652                    b.Navigation("TrailerTypes");
 271653
 271654                    b.Navigation("UserData");
 271655                });
 1656
 271657            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271658                {
 271659                    b.Navigation("HomeSections");
 271660                });
 1661
 271662            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271663                {
 271664                    b.Navigation("BaseItemsMap");
 271665                });
 1666
 271667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271668                {
 271669                    b.Navigation("BaseItems");
 271670                });
 1671
 271672            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271673                {
 271674                    b.Navigation("AccessSchedules");
 271675
 271676                    b.Navigation("DisplayPreferences");
 271677
 271678                    b.Navigation("ItemDisplayPreferences");
 271679
 271680                    b.Navigation("Permissions");
 271681
 271682                    b.Navigation("Preferences");
 271683
 271684                    b.Navigation("ProfileImage");
 271685                });
 1686#pragma warning restore 612, 618
 271687        }
 1688    }
 1689}