< Summary - Jellyfin

Line coverage
99%
Covered lines: 1551
Uncovered lines: 15
Coverable lines: 1566
Total lines: 1664
Line coverage: 99%
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/12/2026 - 12:15:57 AM Line coverage: 99% (1551/1566) Total lines: 1664

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/20241111135439_AddedCustomDataKeyKey.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddedCustomDataKeyKey : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.DropPrimaryKey(
 2714                name: "PK_UserData",
 2715                table: "UserData");
 16
 2717            migrationBuilder.AlterColumn<string>(
 2718                name: "CustomDataKey",
 2719                table: "UserData",
 2720                type: "TEXT",
 2721                nullable: false,
 2722                defaultValue: string.Empty,
 2723                oldClrType: typeof(string),
 2724                oldType: "TEXT",
 2725                oldNullable: true);
 26
 2727            migrationBuilder.AddPrimaryKey(
 2728                name: "PK_UserData",
 2729                table: "UserData",
 2730                columns: new[] { "ItemId", "UserId", "CustomDataKey" });
 2731        }
 32
 33        /// <inheritdoc />
 34        protected override void Down(MigrationBuilder migrationBuilder)
 35        {
 036            migrationBuilder.DropPrimaryKey(
 037                name: "PK_UserData",
 038                table: "UserData");
 39
 040            migrationBuilder.AlterColumn<string>(
 041                name: "CustomDataKey",
 042                table: "UserData",
 043                type: "TEXT",
 044                nullable: true,
 045                oldClrType: typeof(string),
 046                oldType: "TEXT");
 47
 048            migrationBuilder.AddPrimaryKey(
 049                name: "PK_UserData",
 050                table: "UserData",
 051                columns: new[] { "ItemId", "UserId" });
 052        }
 53    }
 54}

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