< Summary - Jellyfin

Line coverage
96%
Covered lines: 1568
Uncovered lines: 64
Coverable lines: 1632
Total lines: 1738
Line coverage: 96%
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/31/2026 - 12:15:44 AM Line coverage: 96% (1568/1632) Total lines: 1738

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/20241112234144_FixMediaStreams2.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixMediaStreams2 : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.AlterColumn<string>(
 2714                name: "Profile",
 2715                table: "MediaStreamInfos",
 2716                type: "TEXT",
 2717                nullable: true,
 2718                oldClrType: typeof(string),
 2719                oldType: "TEXT");
 20
 2721            migrationBuilder.AlterColumn<string>(
 2722                name: "Path",
 2723                table: "MediaStreamInfos",
 2724                type: "TEXT",
 2725                nullable: true,
 2726                oldClrType: typeof(string),
 2727                oldType: "TEXT");
 28
 2729            migrationBuilder.AlterColumn<string>(
 2730                name: "Language",
 2731                table: "MediaStreamInfos",
 2732                type: "TEXT",
 2733                nullable: true,
 2734                oldClrType: typeof(string),
 2735                oldType: "TEXT");
 36
 2737            migrationBuilder.AlterColumn<bool>(
 2738                name: "IsInterlaced",
 2739                table: "MediaStreamInfos",
 2740                type: "INTEGER",
 2741                nullable: true,
 2742                oldClrType: typeof(bool),
 2743                oldType: "INTEGER");
 44
 2745            migrationBuilder.AlterColumn<string>(
 2746                name: "Codec",
 2747                table: "MediaStreamInfos",
 2748                type: "TEXT",
 2749                nullable: true,
 2750                oldClrType: typeof(string),
 2751                oldType: "TEXT");
 52
 2753            migrationBuilder.AlterColumn<string>(
 2754                name: "ChannelLayout",
 2755                table: "MediaStreamInfos",
 2756                type: "TEXT",
 2757                nullable: true,
 2758                oldClrType: typeof(string),
 2759                oldType: "TEXT");
 60
 2761            migrationBuilder.AlterColumn<string>(
 2762                name: "AspectRatio",
 2763                table: "MediaStreamInfos",
 2764                type: "TEXT",
 2765                nullable: true,
 2766                oldClrType: typeof(string),
 2767                oldType: "TEXT");
 2768        }
 69
 70        /// <inheritdoc />
 71        protected override void Down(MigrationBuilder migrationBuilder)
 72        {
 073            migrationBuilder.AlterColumn<string>(
 074                name: "Profile",
 075                table: "MediaStreamInfos",
 076                type: "TEXT",
 077                nullable: false,
 078                defaultValue: string.Empty,
 079                oldClrType: typeof(string),
 080                oldType: "TEXT",
 081                oldNullable: true);
 82
 083            migrationBuilder.AlterColumn<string>(
 084                name: "Path",
 085                table: "MediaStreamInfos",
 086                type: "TEXT",
 087                nullable: false,
 088                defaultValue: string.Empty,
 089                oldClrType: typeof(string),
 090                oldType: "TEXT",
 091                oldNullable: true);
 92
 093            migrationBuilder.AlterColumn<string>(
 094                name: "Language",
 095                table: "MediaStreamInfos",
 096                type: "TEXT",
 097                nullable: false,
 098                defaultValue: string.Empty,
 099                oldClrType: typeof(string),
 0100                oldType: "TEXT",
 0101                oldNullable: true);
 102
 0103            migrationBuilder.AlterColumn<bool>(
 0104                name: "IsInterlaced",
 0105                table: "MediaStreamInfos",
 0106                type: "INTEGER",
 0107                nullable: false,
 0108                defaultValue: false,
 0109                oldClrType: typeof(bool),
 0110                oldType: "INTEGER",
 0111                oldNullable: true);
 112
 0113            migrationBuilder.AlterColumn<string>(
 0114                name: "Codec",
 0115                table: "MediaStreamInfos",
 0116                type: "TEXT",
 0117                nullable: false,
 0118                defaultValue: string.Empty,
 0119                oldClrType: typeof(string),
 0120                oldType: "TEXT",
 0121                oldNullable: true);
 122
 0123            migrationBuilder.AlterColumn<string>(
 0124                name: "ChannelLayout",
 0125                table: "MediaStreamInfos",
 0126                type: "TEXT",
 0127                nullable: false,
 0128                defaultValue: string.Empty,
 0129                oldClrType: typeof(string),
 0130                oldType: "TEXT",
 0131                oldNullable: true);
 132
 0133            migrationBuilder.AlterColumn<string>(
 0134                name: "AspectRatio",
 0135                table: "MediaStreamInfos",
 0136                type: "TEXT",
 0137                nullable: false,
 0138                defaultValue: string.Empty,
 0139                oldClrType: typeof(string),
 0140                oldType: "TEXT",
 0141                oldNullable: true);
 0142        }
 143    }
 144}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.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("20241112234144_FixMediaStreams2")]
 15    partial class FixMediaStreams2
 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.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
 27698                    b.ToTable("ItemValues");
 27699                });
 700
 27701            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 27702                {
 27703                    b.Property<Guid>("ItemValueId")
 27704                        .HasColumnType("TEXT");
 27705
 27706                    b.Property<Guid>("ItemId")
 27707                        .HasColumnType("TEXT");
 27708
 27709                    b.HasKey("ItemValueId", "ItemId");
 27710
 27711                    b.HasIndex("ItemId");
 27712
 27713                    b.ToTable("ItemValuesMap");
 27714                });
 715
 27716            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 27717                {
 27718                    b.Property<Guid>("Id")
 27719                        .ValueGeneratedOnAdd()
 27720                        .HasColumnType("TEXT");
 27721
 27722                    b.Property<long>("EndTicks")
 27723                        .HasColumnType("INTEGER");
 27724
 27725                    b.Property<Guid>("ItemId")
 27726                        .HasColumnType("TEXT");
 27727
 27728                    b.Property<string>("SegmentProviderId")
 27729                        .IsRequired()
 27730                        .HasColumnType("TEXT");
 27731
 27732                    b.Property<long>("StartTicks")
 27733                        .HasColumnType("INTEGER");
 27734
 27735                    b.Property<int>("Type")
 27736                        .HasColumnType("INTEGER");
 27737
 27738                    b.HasKey("Id");
 27739
 27740                    b.ToTable("MediaSegments");
 27741                });
 742
 27743            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 27744                {
 27745                    b.Property<Guid>("ItemId")
 27746                        .HasColumnType("TEXT");
 27747
 27748                    b.Property<int>("StreamIndex")
 27749                        .HasColumnType("INTEGER");
 27750
 27751                    b.Property<string>("AspectRatio")
 27752                        .HasColumnType("TEXT");
 27753
 27754                    b.Property<float?>("AverageFrameRate")
 27755                        .HasColumnType("REAL");
 27756
 27757                    b.Property<int?>("BitDepth")
 27758                        .HasColumnType("INTEGER");
 27759
 27760                    b.Property<int?>("BitRate")
 27761                        .HasColumnType("INTEGER");
 27762
 27763                    b.Property<int?>("BlPresentFlag")
 27764                        .HasColumnType("INTEGER");
 27765
 27766                    b.Property<string>("ChannelLayout")
 27767                        .HasColumnType("TEXT");
 27768
 27769                    b.Property<int?>("Channels")
 27770                        .HasColumnType("INTEGER");
 27771
 27772                    b.Property<string>("Codec")
 27773                        .HasColumnType("TEXT");
 27774
 27775                    b.Property<string>("CodecTag")
 27776                        .HasColumnType("TEXT");
 27777
 27778                    b.Property<string>("CodecTimeBase")
 27779                        .HasColumnType("TEXT");
 27780
 27781                    b.Property<string>("ColorPrimaries")
 27782                        .HasColumnType("TEXT");
 27783
 27784                    b.Property<string>("ColorSpace")
 27785                        .HasColumnType("TEXT");
 27786
 27787                    b.Property<string>("ColorTransfer")
 27788                        .HasColumnType("TEXT");
 27789
 27790                    b.Property<string>("Comment")
 27791                        .HasColumnType("TEXT");
 27792
 27793                    b.Property<int?>("DvBlSignalCompatibilityId")
 27794                        .HasColumnType("INTEGER");
 27795
 27796                    b.Property<int?>("DvLevel")
 27797                        .HasColumnType("INTEGER");
 27798
 27799                    b.Property<int?>("DvProfile")
 27800                        .HasColumnType("INTEGER");
 27801
 27802                    b.Property<int?>("DvVersionMajor")
 27803                        .HasColumnType("INTEGER");
 27804
 27805                    b.Property<int?>("DvVersionMinor")
 27806                        .HasColumnType("INTEGER");
 27807
 27808                    b.Property<int?>("ElPresentFlag")
 27809                        .HasColumnType("INTEGER");
 27810
 27811                    b.Property<int?>("Height")
 27812                        .HasColumnType("INTEGER");
 27813
 27814                    b.Property<bool?>("IsAnamorphic")
 27815                        .HasColumnType("INTEGER");
 27816
 27817                    b.Property<bool?>("IsAvc")
 27818                        .HasColumnType("INTEGER");
 27819
 27820                    b.Property<bool>("IsDefault")
 27821                        .HasColumnType("INTEGER");
 27822
 27823                    b.Property<bool>("IsExternal")
 27824                        .HasColumnType("INTEGER");
 27825
 27826                    b.Property<bool>("IsForced")
 27827                        .HasColumnType("INTEGER");
 27828
 27829                    b.Property<bool?>("IsHearingImpaired")
 27830                        .HasColumnType("INTEGER");
 27831
 27832                    b.Property<bool?>("IsInterlaced")
 27833                        .HasColumnType("INTEGER");
 27834
 27835                    b.Property<string>("KeyFrames")
 27836                        .HasColumnType("TEXT");
 27837
 27838                    b.Property<string>("Language")
 27839                        .HasColumnType("TEXT");
 27840
 27841                    b.Property<float?>("Level")
 27842                        .HasColumnType("REAL");
 27843
 27844                    b.Property<string>("NalLengthSize")
 27845                        .HasColumnType("TEXT");
 27846
 27847                    b.Property<string>("Path")
 27848                        .HasColumnType("TEXT");
 27849
 27850                    b.Property<string>("PixelFormat")
 27851                        .HasColumnType("TEXT");
 27852
 27853                    b.Property<string>("Profile")
 27854                        .HasColumnType("TEXT");
 27855
 27856                    b.Property<float?>("RealFrameRate")
 27857                        .HasColumnType("REAL");
 27858
 27859                    b.Property<int?>("RefFrames")
 27860                        .HasColumnType("INTEGER");
 27861
 27862                    b.Property<int?>("Rotation")
 27863                        .HasColumnType("INTEGER");
 27864
 27865                    b.Property<int?>("RpuPresentFlag")
 27866                        .HasColumnType("INTEGER");
 27867
 27868                    b.Property<int?>("SampleRate")
 27869                        .HasColumnType("INTEGER");
 27870
 27871                    b.Property<int>("StreamType")
 27872                        .HasColumnType("INTEGER");
 27873
 27874                    b.Property<string>("TimeBase")
 27875                        .HasColumnType("TEXT");
 27876
 27877                    b.Property<string>("Title")
 27878                        .HasColumnType("TEXT");
 27879
 27880                    b.Property<int?>("Width")
 27881                        .HasColumnType("INTEGER");
 27882
 27883                    b.HasKey("ItemId", "StreamIndex");
 27884
 27885                    b.HasIndex("StreamIndex");
 27886
 27887                    b.HasIndex("StreamType");
 27888
 27889                    b.HasIndex("StreamIndex", "StreamType");
 27890
 27891                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27892
 27893                    b.ToTable("MediaStreamInfos");
 27894                });
 895
 27896            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 27897                {
 27898                    b.Property<Guid>("Id")
 27899                        .ValueGeneratedOnAdd()
 27900                        .HasColumnType("TEXT");
 27901
 27902                    b.Property<string>("Name")
 27903                        .IsRequired()
 27904                        .HasColumnType("TEXT");
 27905
 27906                    b.Property<string>("PersonType")
 27907                        .HasColumnType("TEXT");
 27908
 27909                    b.HasKey("Id");
 27910
 27911                    b.HasIndex("Name");
 27912
 27913                    b.ToTable("Peoples");
 27914                });
 915
 27916            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 27917                {
 27918                    b.Property<Guid>("ItemId")
 27919                        .HasColumnType("TEXT");
 27920
 27921                    b.Property<Guid>("PeopleId")
 27922                        .HasColumnType("TEXT");
 27923
 27924                    b.Property<int?>("ListOrder")
 27925                        .HasColumnType("INTEGER");
 27926
 27927                    b.Property<string>("Role")
 27928                        .HasColumnType("TEXT");
 27929
 27930                    b.Property<int?>("SortOrder")
 27931                        .HasColumnType("INTEGER");
 27932
 27933                    b.HasKey("ItemId", "PeopleId");
 27934
 27935                    b.HasIndex("PeopleId");
 27936
 27937                    b.HasIndex("ItemId", "ListOrder");
 27938
 27939                    b.HasIndex("ItemId", "SortOrder");
 27940
 27941                    b.ToTable("PeopleBaseItemMap");
 27942                });
 943
 27944            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27945                {
 27946                    b.Property<int>("Id")
 27947                        .ValueGeneratedOnAdd()
 27948                        .HasColumnType("INTEGER");
 27949
 27950                    b.Property<int>("Kind")
 27951                        .HasColumnType("INTEGER");
 27952
 27953                    b.Property<Guid?>("Permission_Permissions_Guid")
 27954                        .HasColumnType("TEXT");
 27955
 27956                    b.Property<uint>("RowVersion")
 27957                        .IsConcurrencyToken()
 27958                        .HasColumnType("INTEGER");
 27959
 27960                    b.Property<Guid?>("UserId")
 27961                        .HasColumnType("TEXT");
 27962
 27963                    b.Property<bool>("Value")
 27964                        .HasColumnType("INTEGER");
 27965
 27966                    b.HasKey("Id");
 27967
 27968                    b.HasIndex("UserId", "Kind")
 27969                        .IsUnique()
 27970                        .HasFilter("[UserId] IS NOT NULL");
 27971
 27972                    b.ToTable("Permissions");
 27973                });
 974
 27975            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27976                {
 27977                    b.Property<int>("Id")
 27978                        .ValueGeneratedOnAdd()
 27979                        .HasColumnType("INTEGER");
 27980
 27981                    b.Property<int>("Kind")
 27982                        .HasColumnType("INTEGER");
 27983
 27984                    b.Property<Guid?>("Preference_Preferences_Guid")
 27985                        .HasColumnType("TEXT");
 27986
 27987                    b.Property<uint>("RowVersion")
 27988                        .IsConcurrencyToken()
 27989                        .HasColumnType("INTEGER");
 27990
 27991                    b.Property<Guid?>("UserId")
 27992                        .HasColumnType("TEXT");
 27993
 27994                    b.Property<string>("Value")
 27995                        .IsRequired()
 27996                        .HasMaxLength(65535)
 27997                        .HasColumnType("TEXT");
 27998
 27999                    b.HasKey("Id");
 271000
 271001                    b.HasIndex("UserId", "Kind")
 271002                        .IsUnique()
 271003                        .HasFilter("[UserId] IS NOT NULL");
 271004
 271005                    b.ToTable("Preferences");
 271006                });
 1007
 271008            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 271009                {
 271010                    b.Property<int>("Id")
 271011                        .ValueGeneratedOnAdd()
 271012                        .HasColumnType("INTEGER");
 271013
 271014                    b.Property<string>("AccessToken")
 271015                        .IsRequired()
 271016                        .HasColumnType("TEXT");
 271017
 271018                    b.Property<DateTime>("DateCreated")
 271019                        .HasColumnType("TEXT");
 271020
 271021                    b.Property<DateTime>("DateLastActivity")
 271022                        .HasColumnType("TEXT");
 271023
 271024                    b.Property<string>("Name")
 271025                        .IsRequired()
 271026                        .HasMaxLength(64)
 271027                        .HasColumnType("TEXT");
 271028
 271029                    b.HasKey("Id");
 271030
 271031                    b.HasIndex("AccessToken")
 271032                        .IsUnique();
 271033
 271034                    b.ToTable("ApiKeys");
 271035                });
 1036
 271037            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 271038                {
 271039                    b.Property<int>("Id")
 271040                        .ValueGeneratedOnAdd()
 271041                        .HasColumnType("INTEGER");
 271042
 271043                    b.Property<string>("AccessToken")
 271044                        .IsRequired()
 271045                        .HasColumnType("TEXT");
 271046
 271047                    b.Property<string>("AppName")
 271048                        .IsRequired()
 271049                        .HasMaxLength(64)
 271050                        .HasColumnType("TEXT");
 271051
 271052                    b.Property<string>("AppVersion")
 271053                        .IsRequired()
 271054                        .HasMaxLength(32)
 271055                        .HasColumnType("TEXT");
 271056
 271057                    b.Property<DateTime>("DateCreated")
 271058                        .HasColumnType("TEXT");
 271059
 271060                    b.Property<DateTime>("DateLastActivity")
 271061                        .HasColumnType("TEXT");
 271062
 271063                    b.Property<DateTime>("DateModified")
 271064                        .HasColumnType("TEXT");
 271065
 271066                    b.Property<string>("DeviceId")
 271067                        .IsRequired()
 271068                        .HasMaxLength(256)
 271069                        .HasColumnType("TEXT");
 271070
 271071                    b.Property<string>("DeviceName")
 271072                        .IsRequired()
 271073                        .HasMaxLength(64)
 271074                        .HasColumnType("TEXT");
 271075
 271076                    b.Property<bool>("IsActive")
 271077                        .HasColumnType("INTEGER");
 271078
 271079                    b.Property<Guid>("UserId")
 271080                        .HasColumnType("TEXT");
 271081
 271082                    b.HasKey("Id");
 271083
 271084                    b.HasIndex("DeviceId");
 271085
 271086                    b.HasIndex("AccessToken", "DateLastActivity");
 271087
 271088                    b.HasIndex("DeviceId", "DateLastActivity");
 271089
 271090                    b.HasIndex("UserId", "DeviceId");
 271091
 271092                    b.ToTable("Devices");
 271093                });
 1094
 271095            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 271096                {
 271097                    b.Property<int>("Id")
 271098                        .ValueGeneratedOnAdd()
 271099                        .HasColumnType("INTEGER");
 271100
 271101                    b.Property<string>("CustomName")
 271102                        .HasColumnType("TEXT");
 271103
 271104                    b.Property<string>("DeviceId")
 271105                        .IsRequired()
 271106                        .HasColumnType("TEXT");
 271107
 271108                    b.HasKey("Id");
 271109
 271110                    b.HasIndex("DeviceId")
 271111                        .IsUnique();
 271112
 271113                    b.ToTable("DeviceOptions");
 271114                });
 1115
 271116            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 271117                {
 271118                    b.Property<Guid>("ItemId")
 271119                        .HasColumnType("TEXT");
 271120
 271121                    b.Property<int>("Width")
 271122                        .HasColumnType("INTEGER");
 271123
 271124                    b.Property<int>("Bandwidth")
 271125                        .HasColumnType("INTEGER");
 271126
 271127                    b.Property<int>("Height")
 271128                        .HasColumnType("INTEGER");
 271129
 271130                    b.Property<int>("Interval")
 271131                        .HasColumnType("INTEGER");
 271132
 271133                    b.Property<int>("ThumbnailCount")
 271134                        .HasColumnType("INTEGER");
 271135
 271136                    b.Property<int>("TileHeight")
 271137                        .HasColumnType("INTEGER");
 271138
 271139                    b.Property<int>("TileWidth")
 271140                        .HasColumnType("INTEGER");
 271141
 271142                    b.HasKey("ItemId", "Width");
 271143
 271144                    b.ToTable("TrickplayInfos");
 271145                });
 1146
 271147            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 271148                {
 271149                    b.Property<Guid>("Id")
 271150                        .ValueGeneratedOnAdd()
 271151                        .HasColumnType("TEXT");
 271152
 271153                    b.Property<string>("AudioLanguagePreference")
 271154                        .HasMaxLength(255)
 271155                        .HasColumnType("TEXT");
 271156
 271157                    b.Property<string>("AuthenticationProviderId")
 271158                        .IsRequired()
 271159                        .HasMaxLength(255)
 271160                        .HasColumnType("TEXT");
 271161
 271162                    b.Property<string>("CastReceiverId")
 271163                        .HasMaxLength(32)
 271164                        .HasColumnType("TEXT");
 271165
 271166                    b.Property<bool>("DisplayCollectionsView")
 271167                        .HasColumnType("INTEGER");
 271168
 271169                    b.Property<bool>("DisplayMissingEpisodes")
 271170                        .HasColumnType("INTEGER");
 271171
 271172                    b.Property<bool>("EnableAutoLogin")
 271173                        .HasColumnType("INTEGER");
 271174
 271175                    b.Property<bool>("EnableLocalPassword")
 271176                        .HasColumnType("INTEGER");
 271177
 271178                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271179                        .HasColumnType("INTEGER");
 271180
 271181                    b.Property<bool>("EnableUserPreferenceAccess")
 271182                        .HasColumnType("INTEGER");
 271183
 271184                    b.Property<bool>("HidePlayedInLatest")
 271185                        .HasColumnType("INTEGER");
 271186
 271187                    b.Property<long>("InternalId")
 271188                        .HasColumnType("INTEGER");
 271189
 271190                    b.Property<int>("InvalidLoginAttemptCount")
 271191                        .HasColumnType("INTEGER");
 271192
 271193                    b.Property<DateTime?>("LastActivityDate")
 271194                        .HasColumnType("TEXT");
 271195
 271196                    b.Property<DateTime?>("LastLoginDate")
 271197                        .HasColumnType("TEXT");
 271198
 271199                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271200                        .HasColumnType("INTEGER");
 271201
 271202                    b.Property<int>("MaxActiveSessions")
 271203                        .HasColumnType("INTEGER");
 271204
 271205                    b.Property<int?>("MaxParentalAgeRating")
 271206                        .HasColumnType("INTEGER");
 271207
 271208                    b.Property<bool>("MustUpdatePassword")
 271209                        .HasColumnType("INTEGER");
 271210
 271211                    b.Property<string>("Password")
 271212                        .HasMaxLength(65535)
 271213                        .HasColumnType("TEXT");
 271214
 271215                    b.Property<string>("PasswordResetProviderId")
 271216                        .IsRequired()
 271217                        .HasMaxLength(255)
 271218                        .HasColumnType("TEXT");
 271219
 271220                    b.Property<bool>("PlayDefaultAudioTrack")
 271221                        .HasColumnType("INTEGER");
 271222
 271223                    b.Property<bool>("RememberAudioSelections")
 271224                        .HasColumnType("INTEGER");
 271225
 271226                    b.Property<bool>("RememberSubtitleSelections")
 271227                        .HasColumnType("INTEGER");
 271228
 271229                    b.Property<int?>("RemoteClientBitrateLimit")
 271230                        .HasColumnType("INTEGER");
 271231
 271232                    b.Property<uint>("RowVersion")
 271233                        .IsConcurrencyToken()
 271234                        .HasColumnType("INTEGER");
 271235
 271236                    b.Property<string>("SubtitleLanguagePreference")
 271237                        .HasMaxLength(255)
 271238                        .HasColumnType("TEXT");
 271239
 271240                    b.Property<int>("SubtitleMode")
 271241                        .HasColumnType("INTEGER");
 271242
 271243                    b.Property<int>("SyncPlayAccess")
 271244                        .HasColumnType("INTEGER");
 271245
 271246                    b.Property<string>("Username")
 271247                        .IsRequired()
 271248                        .HasMaxLength(255)
 271249                        .HasColumnType("TEXT")
 271250                        .UseCollation("NOCASE");
 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}