< Summary - Jellyfin

Line coverage
98%
Covered lines: 1533
Uncovered lines: 19
Coverable lines: 1552
Total lines: 1649
Line coverage: 98.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/11/2026 - 12:15:59 AM Line coverage: 98.7% (1534/1553) Total lines: 16508/11/2026 - 12:17:00 AM Line coverage: 98.7% (1533/1552) Total lines: 1649

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/20250204092455_MakeStartEndDateNullable.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class MakeStartEndDateNullable : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2714            migrationBuilder.AlterColumn<DateTime>(
 2715                name: "StartDate",
 2716                table: "BaseItems",
 2717                type: "TEXT",
 2718                nullable: true,
 2719                oldClrType: typeof(DateTime),
 2720                oldType: "TEXT");
 21
 2722            migrationBuilder.AlterColumn<DateTime>(
 2723                name: "EndDate",
 2724                table: "BaseItems",
 2725                type: "TEXT",
 2726                nullable: true,
 2727                oldClrType: typeof(DateTime),
 2728                oldType: "TEXT");
 2729        }
 30
 31        /// <inheritdoc />
 32        protected override void Down(MigrationBuilder migrationBuilder)
 33        {
 034            migrationBuilder.AlterColumn<DateTime>(
 035                name: "StartDate",
 036                table: "BaseItems",
 037                type: "TEXT",
 038                nullable: false,
 039                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
 040                oldClrType: typeof(DateTime),
 041                oldType: "TEXT",
 042                oldNullable: true);
 43
 044            migrationBuilder.AlterColumn<DateTime>(
 045                name: "EndDate",
 046                table: "BaseItems",
 047                type: "TEXT",
 048                nullable: false,
 049                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
 050                oldClrType: typeof(DateTime),
 051                oldType: "TEXT",
 052                oldNullable: true);
 053        }
 54    }
 55}

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