< 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 3/26/2026 - 12:14:14 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        {
 2213            migrationBuilder.DropPrimaryKey(
 2214                name: "PK_UserData",
 2215                table: "UserData");
 16
 2217            migrationBuilder.AlterColumn<string>(
 2218                name: "CustomDataKey",
 2219                table: "UserData",
 2220                type: "TEXT",
 2221                nullable: false,
 2222                defaultValue: string.Empty,
 2223                oldClrType: typeof(string),
 2224                oldType: "TEXT",
 2225                oldNullable: true);
 26
 2227            migrationBuilder.AddPrimaryKey(
 2228                name: "PK_UserData",
 2229                table: "UserData",
 2230                columns: new[] { "ItemId", "UserId", "CustomDataKey" });
 2231        }
 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
 2221            modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
 22
 2223            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246                });
 47
 2248            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2249                {
 2250                    b.Property<int>("Id")
 2251                        .ValueGeneratedOnAdd()
 2252                        .HasColumnType("INTEGER");
 2253
 2254                    b.Property<DateTime>("DateCreated")
 2255                        .HasColumnType("TEXT");
 2256
 2257                    b.Property<string>("ItemId")
 2258                        .HasMaxLength(256)
 2259                        .HasColumnType("TEXT");
 2260
 2261                    b.Property<int>("LogSeverity")
 2262                        .HasColumnType("INTEGER");
 2263
 2264                    b.Property<string>("Name")
 2265                        .IsRequired()
 2266                        .HasMaxLength(512)
 2267                        .HasColumnType("TEXT");
 2268
 2269                    b.Property<string>("Overview")
 2270                        .HasMaxLength(512)
 2271                        .HasColumnType("TEXT");
 2272
 2273                    b.Property<uint>("RowVersion")
 2274                        .IsConcurrencyToken()
 2275                        .HasColumnType("INTEGER");
 2276
 2277                    b.Property<string>("ShortOverview")
 2278                        .HasMaxLength(512)
 2279                        .HasColumnType("TEXT");
 2280
 2281                    b.Property<string>("Type")
 2282                        .IsRequired()
 2283                        .HasMaxLength(256)
 2284                        .HasColumnType("TEXT");
 2285
 2286                    b.Property<Guid>("UserId")
 2287                        .HasColumnType("TEXT");
 2288
 2289                    b.HasKey("Id");
 2290
 2291                    b.HasIndex("DateCreated");
 2292
 2293                    b.ToTable("ActivityLogs");
 2294                });
 95
 2296            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 2297                {
 2298                    b.Property<Guid>("ItemId")
 2299                        .HasColumnType("TEXT");
 22100
 22101                    b.Property<Guid>("ParentItemId")
 22102                        .HasColumnType("TEXT");
 22103
 22104                    b.Property<Guid?>("BaseItemEntityId")
 22105                        .HasColumnType("TEXT");
 22106
 22107                    b.HasKey("ItemId", "ParentItemId");
 22108
 22109                    b.HasIndex("BaseItemEntityId");
 22110
 22111                    b.HasIndex("ParentItemId");
 22112
 22113                    b.ToTable("AncestorIds");
 22114                });
 115
 22116            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 22117                {
 22118                    b.Property<Guid>("ItemId")
 22119                        .HasColumnType("TEXT");
 22120
 22121                    b.Property<int>("Index")
 22122                        .HasColumnType("INTEGER");
 22123
 22124                    b.Property<string>("Codec")
 22125                        .IsRequired()
 22126                        .HasColumnType("TEXT");
 22127
 22128                    b.Property<string>("CodecTag")
 22129                        .HasColumnType("TEXT");
 22130
 22131                    b.Property<string>("Comment")
 22132                        .HasColumnType("TEXT");
 22133
 22134                    b.Property<string>("Filename")
 22135                        .HasColumnType("TEXT");
 22136
 22137                    b.Property<string>("MimeType")
 22138                        .HasColumnType("TEXT");
 22139
 22140                    b.HasKey("ItemId", "Index");
 22141
 22142                    b.ToTable("AttachmentStreamInfos");
 22143                });
 144
 22145            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 22146                {
 22147                    b.Property<Guid>("Id")
 22148                        .ValueGeneratedOnAdd()
 22149                        .HasColumnType("TEXT");
 22150
 22151                    b.Property<string>("Album")
 22152                        .HasColumnType("TEXT");
 22153
 22154                    b.Property<string>("AlbumArtists")
 22155                        .HasColumnType("TEXT");
 22156
 22157                    b.Property<string>("Artists")
 22158                        .HasColumnType("TEXT");
 22159
 22160                    b.Property<int?>("Audio")
 22161                        .HasColumnType("INTEGER");
 22162
 22163                    b.Property<string>("ChannelId")
 22164                        .HasColumnType("TEXT");
 22165
 22166                    b.Property<string>("CleanName")
 22167                        .HasColumnType("TEXT");
 22168
 22169                    b.Property<float?>("CommunityRating")
 22170                        .HasColumnType("REAL");
 22171
 22172                    b.Property<float?>("CriticRating")
 22173                        .HasColumnType("REAL");
 22174
 22175                    b.Property<string>("CustomRating")
 22176                        .HasColumnType("TEXT");
 22177
 22178                    b.Property<string>("Data")
 22179                        .HasColumnType("TEXT");
 22180
 22181                    b.Property<DateTime?>("DateCreated")
 22182                        .HasColumnType("TEXT");
 22183
 22184                    b.Property<DateTime?>("DateLastMediaAdded")
 22185                        .HasColumnType("TEXT");
 22186
 22187                    b.Property<DateTime?>("DateLastRefreshed")
 22188                        .HasColumnType("TEXT");
 22189
 22190                    b.Property<DateTime?>("DateLastSaved")
 22191                        .HasColumnType("TEXT");
 22192
 22193                    b.Property<DateTime?>("DateModified")
 22194                        .HasColumnType("TEXT");
 22195
 22196                    b.Property<DateTime>("EndDate")
 22197                        .HasColumnType("TEXT");
 22198
 22199                    b.Property<string>("EpisodeTitle")
 22200                        .HasColumnType("TEXT");
 22201
 22202                    b.Property<string>("ExternalId")
 22203                        .HasColumnType("TEXT");
 22204
 22205                    b.Property<string>("ExternalSeriesId")
 22206                        .HasColumnType("TEXT");
 22207
 22208                    b.Property<string>("ExternalServiceId")
 22209                        .HasColumnType("TEXT");
 22210
 22211                    b.Property<string>("ExtraIds")
 22212                        .HasColumnType("TEXT");
 22213
 22214                    b.Property<int?>("ExtraType")
 22215                        .HasColumnType("INTEGER");
 22216
 22217                    b.Property<string>("ForcedSortName")
 22218                        .HasColumnType("TEXT");
 22219
 22220                    b.Property<string>("Genres")
 22221                        .HasColumnType("TEXT");
 22222
 22223                    b.Property<int?>("Height")
 22224                        .HasColumnType("INTEGER");
 22225
 22226                    b.Property<int?>("IndexNumber")
 22227                        .HasColumnType("INTEGER");
 22228
 22229                    b.Property<int?>("InheritedParentalRatingValue")
 22230                        .HasColumnType("INTEGER");
 22231
 22232                    b.Property<bool>("IsFolder")
 22233                        .HasColumnType("INTEGER");
 22234
 22235                    b.Property<bool>("IsInMixedFolder")
 22236                        .HasColumnType("INTEGER");
 22237
 22238                    b.Property<bool>("IsLocked")
 22239                        .HasColumnType("INTEGER");
 22240
 22241                    b.Property<bool>("IsMovie")
 22242                        .HasColumnType("INTEGER");
 22243
 22244                    b.Property<bool>("IsRepeat")
 22245                        .HasColumnType("INTEGER");
 22246
 22247                    b.Property<bool>("IsSeries")
 22248                        .HasColumnType("INTEGER");
 22249
 22250                    b.Property<bool>("IsVirtualItem")
 22251                        .HasColumnType("INTEGER");
 22252
 22253                    b.Property<float?>("LUFS")
 22254                        .HasColumnType("REAL");
 22255
 22256                    b.Property<string>("MediaType")
 22257                        .HasColumnType("TEXT");
 22258
 22259                    b.Property<string>("Name")
 22260                        .HasColumnType("TEXT");
 22261
 22262                    b.Property<float?>("NormalizationGain")
 22263                        .HasColumnType("REAL");
 22264
 22265                    b.Property<string>("OfficialRating")
 22266                        .HasColumnType("TEXT");
 22267
 22268                    b.Property<string>("OriginalTitle")
 22269                        .HasColumnType("TEXT");
 22270
 22271                    b.Property<string>("Overview")
 22272                        .HasColumnType("TEXT");
 22273
 22274                    b.Property<string>("OwnerId")
 22275                        .HasColumnType("TEXT");
 22276
 22277                    b.Property<Guid?>("ParentId")
 22278                        .HasColumnType("TEXT");
 22279
 22280                    b.Property<int?>("ParentIndexNumber")
 22281                        .HasColumnType("INTEGER");
 22282
 22283                    b.Property<string>("Path")
 22284                        .HasColumnType("TEXT");
 22285
 22286                    b.Property<string>("PreferredMetadataCountryCode")
 22287                        .HasColumnType("TEXT");
 22288
 22289                    b.Property<string>("PreferredMetadataLanguage")
 22290                        .HasColumnType("TEXT");
 22291
 22292                    b.Property<DateTime?>("PremiereDate")
 22293                        .HasColumnType("TEXT");
 22294
 22295                    b.Property<string>("PresentationUniqueKey")
 22296                        .HasColumnType("TEXT");
 22297
 22298                    b.Property<string>("PrimaryVersionId")
 22299                        .HasColumnType("TEXT");
 22300
 22301                    b.Property<string>("ProductionLocations")
 22302                        .HasColumnType("TEXT");
 22303
 22304                    b.Property<int?>("ProductionYear")
 22305                        .HasColumnType("INTEGER");
 22306
 22307                    b.Property<long?>("RunTimeTicks")
 22308                        .HasColumnType("INTEGER");
 22309
 22310                    b.Property<Guid?>("SeasonId")
 22311                        .HasColumnType("TEXT");
 22312
 22313                    b.Property<string>("SeasonName")
 22314                        .HasColumnType("TEXT");
 22315
 22316                    b.Property<Guid?>("SeriesId")
 22317                        .HasColumnType("TEXT");
 22318
 22319                    b.Property<string>("SeriesName")
 22320                        .HasColumnType("TEXT");
 22321
 22322                    b.Property<string>("SeriesPresentationUniqueKey")
 22323                        .HasColumnType("TEXT");
 22324
 22325                    b.Property<string>("ShowId")
 22326                        .HasColumnType("TEXT");
 22327
 22328                    b.Property<long?>("Size")
 22329                        .HasColumnType("INTEGER");
 22330
 22331                    b.Property<string>("SortName")
 22332                        .HasColumnType("TEXT");
 22333
 22334                    b.Property<DateTime>("StartDate")
 22335                        .HasColumnType("TEXT");
 22336
 22337                    b.Property<string>("Studios")
 22338                        .HasColumnType("TEXT");
 22339
 22340                    b.Property<string>("Tagline")
 22341                        .HasColumnType("TEXT");
 22342
 22343                    b.Property<string>("Tags")
 22344                        .HasColumnType("TEXT");
 22345
 22346                    b.Property<Guid?>("TopParentId")
 22347                        .HasColumnType("TEXT");
 22348
 22349                    b.Property<int?>("TotalBitrate")
 22350                        .HasColumnType("INTEGER");
 22351
 22352                    b.Property<string>("Type")
 22353                        .IsRequired()
 22354                        .HasColumnType("TEXT");
 22355
 22356                    b.Property<string>("UnratedType")
 22357                        .HasColumnType("TEXT");
 22358
 22359                    b.Property<int?>("Width")
 22360                        .HasColumnType("INTEGER");
 22361
 22362                    b.HasKey("Id");
 22363
 22364                    b.HasIndex("ParentId");
 22365
 22366                    b.HasIndex("Path");
 22367
 22368                    b.HasIndex("PresentationUniqueKey");
 22369
 22370                    b.HasIndex("TopParentId", "Id");
 22371
 22372                    b.HasIndex("Type", "TopParentId", "Id");
 22373
 22374                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 22375
 22376                    b.HasIndex("Type", "TopParentId", "StartDate");
 22377
 22378                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 22379
 22380                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 22381
 22382                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 22383
 22384                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 22385
 22386                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22387
 22388                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 22389
 22390                    b.ToTable("BaseItems");
 22391                });
 392
 22393            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 22394                {
 22395                    b.Property<Guid>("Id")
 22396                        .ValueGeneratedOnAdd()
 22397                        .HasColumnType("TEXT");
 22398
 22399                    b.Property<byte[]>("Blurhash")
 22400                        .HasColumnType("BLOB");
 22401
 22402                    b.Property<DateTime>("DateModified")
 22403                        .HasColumnType("TEXT");
 22404
 22405                    b.Property<int>("Height")
 22406                        .HasColumnType("INTEGER");
 22407
 22408                    b.Property<int>("ImageType")
 22409                        .HasColumnType("INTEGER");
 22410
 22411                    b.Property<Guid>("ItemId")
 22412                        .HasColumnType("TEXT");
 22413
 22414                    b.Property<string>("Path")
 22415                        .IsRequired()
 22416                        .HasColumnType("TEXT");
 22417
 22418                    b.Property<int>("Width")
 22419                        .HasColumnType("INTEGER");
 22420
 22421                    b.HasKey("Id");
 22422
 22423                    b.HasIndex("ItemId");
 22424
 22425                    b.ToTable("BaseItemImageInfos");
 22426                });
 427
 22428            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 22429                {
 22430                    b.Property<int>("Id")
 22431                        .HasColumnType("INTEGER");
 22432
 22433                    b.Property<Guid>("ItemId")
 22434                        .HasColumnType("TEXT");
 22435
 22436                    b.HasKey("Id", "ItemId");
 22437
 22438                    b.HasIndex("ItemId");
 22439
 22440                    b.ToTable("BaseItemMetadataFields");
 22441                });
 442
 22443            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 22444                {
 22445                    b.Property<Guid>("ItemId")
 22446                        .HasColumnType("TEXT");
 22447
 22448                    b.Property<string>("ProviderId")
 22449                        .HasColumnType("TEXT");
 22450
 22451                    b.Property<string>("ProviderValue")
 22452                        .IsRequired()
 22453                        .HasColumnType("TEXT");
 22454
 22455                    b.HasKey("ItemId", "ProviderId");
 22456
 22457                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 22458
 22459                    b.ToTable("BaseItemProviders");
 22460                });
 461
 22462            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 22463                {
 22464                    b.Property<int>("Id")
 22465                        .HasColumnType("INTEGER");
 22466
 22467                    b.Property<Guid>("ItemId")
 22468                        .HasColumnType("TEXT");
 22469
 22470                    b.HasKey("Id", "ItemId");
 22471
 22472                    b.HasIndex("ItemId");
 22473
 22474                    b.ToTable("BaseItemTrailerTypes");
 22475                });
 476
 22477            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 22478                {
 22479                    b.Property<Guid>("ItemId")
 22480                        .HasColumnType("TEXT");
 22481
 22482                    b.Property<int>("ChapterIndex")
 22483                        .HasColumnType("INTEGER");
 22484
 22485                    b.Property<DateTime?>("ImageDateModified")
 22486                        .HasColumnType("TEXT");
 22487
 22488                    b.Property<string>("ImagePath")
 22489                        .HasColumnType("TEXT");
 22490
 22491                    b.Property<string>("Name")
 22492                        .HasColumnType("TEXT");
 22493
 22494                    b.Property<long>("StartPositionTicks")
 22495                        .HasColumnType("INTEGER");
 22496
 22497                    b.HasKey("ItemId", "ChapterIndex");
 22498
 22499                    b.ToTable("Chapters");
 22500                });
 501
 22502            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 22503                {
 22504                    b.Property<int>("Id")
 22505                        .ValueGeneratedOnAdd()
 22506                        .HasColumnType("INTEGER");
 22507
 22508                    b.Property<string>("Client")
 22509                        .IsRequired()
 22510                        .HasMaxLength(32)
 22511                        .HasColumnType("TEXT");
 22512
 22513                    b.Property<Guid>("ItemId")
 22514                        .HasColumnType("TEXT");
 22515
 22516                    b.Property<string>("Key")
 22517                        .IsRequired()
 22518                        .HasColumnType("TEXT");
 22519
 22520                    b.Property<Guid>("UserId")
 22521                        .HasColumnType("TEXT");
 22522
 22523                    b.Property<string>("Value")
 22524                        .HasColumnType("TEXT");
 22525
 22526                    b.HasKey("Id");
 22527
 22528                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22529                        .IsUnique();
 22530
 22531                    b.ToTable("CustomItemDisplayPreferences");
 22532                });
 533
 22534            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22535                {
 22536                    b.Property<int>("Id")
 22537                        .ValueGeneratedOnAdd()
 22538                        .HasColumnType("INTEGER");
 22539
 22540                    b.Property<int>("ChromecastVersion")
 22541                        .HasColumnType("INTEGER");
 22542
 22543                    b.Property<string>("Client")
 22544                        .IsRequired()
 22545                        .HasMaxLength(32)
 22546                        .HasColumnType("TEXT");
 22547
 22548                    b.Property<string>("DashboardTheme")
 22549                        .HasMaxLength(32)
 22550                        .HasColumnType("TEXT");
 22551
 22552                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22553                        .HasColumnType("INTEGER");
 22554
 22555                    b.Property<int?>("IndexBy")
 22556                        .HasColumnType("INTEGER");
 22557
 22558                    b.Property<Guid>("ItemId")
 22559                        .HasColumnType("TEXT");
 22560
 22561                    b.Property<int>("ScrollDirection")
 22562                        .HasColumnType("INTEGER");
 22563
 22564                    b.Property<bool>("ShowBackdrop")
 22565                        .HasColumnType("INTEGER");
 22566
 22567                    b.Property<bool>("ShowSidebar")
 22568                        .HasColumnType("INTEGER");
 22569
 22570                    b.Property<int>("SkipBackwardLength")
 22571                        .HasColumnType("INTEGER");
 22572
 22573                    b.Property<int>("SkipForwardLength")
 22574                        .HasColumnType("INTEGER");
 22575
 22576                    b.Property<string>("TvHome")
 22577                        .HasMaxLength(32)
 22578                        .HasColumnType("TEXT");
 22579
 22580                    b.Property<Guid>("UserId")
 22581                        .HasColumnType("TEXT");
 22582
 22583                    b.HasKey("Id");
 22584
 22585                    b.HasIndex("UserId", "ItemId", "Client")
 22586                        .IsUnique();
 22587
 22588                    b.ToTable("DisplayPreferences");
 22589                });
 590
 22591            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22592                {
 22593                    b.Property<int>("Id")
 22594                        .ValueGeneratedOnAdd()
 22595                        .HasColumnType("INTEGER");
 22596
 22597                    b.Property<int>("DisplayPreferencesId")
 22598                        .HasColumnType("INTEGER");
 22599
 22600                    b.Property<int>("Order")
 22601                        .HasColumnType("INTEGER");
 22602
 22603                    b.Property<int>("Type")
 22604                        .HasColumnType("INTEGER");
 22605
 22606                    b.HasKey("Id");
 22607
 22608                    b.HasIndex("DisplayPreferencesId");
 22609
 22610                    b.ToTable("HomeSection");
 22611                });
 612
 22613            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22614                {
 22615                    b.Property<int>("Id")
 22616                        .ValueGeneratedOnAdd()
 22617                        .HasColumnType("INTEGER");
 22618
 22619                    b.Property<DateTime>("LastModified")
 22620                        .HasColumnType("TEXT");
 22621
 22622                    b.Property<string>("Path")
 22623                        .IsRequired()
 22624                        .HasMaxLength(512)
 22625                        .HasColumnType("TEXT");
 22626
 22627                    b.Property<Guid?>("UserId")
 22628                        .HasColumnType("TEXT");
 22629
 22630                    b.HasKey("Id");
 22631
 22632                    b.HasIndex("UserId")
 22633                        .IsUnique();
 22634
 22635                    b.ToTable("ImageInfos");
 22636                });
 637
 22638            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22639                {
 22640                    b.Property<int>("Id")
 22641                        .ValueGeneratedOnAdd()
 22642                        .HasColumnType("INTEGER");
 22643
 22644                    b.Property<string>("Client")
 22645                        .IsRequired()
 22646                        .HasMaxLength(32)
 22647                        .HasColumnType("TEXT");
 22648
 22649                    b.Property<int?>("IndexBy")
 22650                        .HasColumnType("INTEGER");
 22651
 22652                    b.Property<Guid>("ItemId")
 22653                        .HasColumnType("TEXT");
 22654
 22655                    b.Property<bool>("RememberIndexing")
 22656                        .HasColumnType("INTEGER");
 22657
 22658                    b.Property<bool>("RememberSorting")
 22659                        .HasColumnType("INTEGER");
 22660
 22661                    b.Property<string>("SortBy")
 22662                        .IsRequired()
 22663                        .HasMaxLength(64)
 22664                        .HasColumnType("TEXT");
 22665
 22666                    b.Property<int>("SortOrder")
 22667                        .HasColumnType("INTEGER");
 22668
 22669                    b.Property<Guid>("UserId")
 22670                        .HasColumnType("TEXT");
 22671
 22672                    b.Property<int>("ViewType")
 22673                        .HasColumnType("INTEGER");
 22674
 22675                    b.HasKey("Id");
 22676
 22677                    b.HasIndex("UserId");
 22678
 22679                    b.ToTable("ItemDisplayPreferences");
 22680                });
 681
 22682            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 22683                {
 22684                    b.Property<Guid>("ItemValueId")
 22685                        .ValueGeneratedOnAdd()
 22686                        .HasColumnType("TEXT");
 22687
 22688                    b.Property<string>("CleanValue")
 22689                        .IsRequired()
 22690                        .HasColumnType("TEXT");
 22691
 22692                    b.Property<int>("Type")
 22693                        .HasColumnType("INTEGER");
 22694
 22695                    b.Property<string>("Value")
 22696                        .IsRequired()
 22697                        .HasColumnType("TEXT");
 22698
 22699                    b.HasKey("ItemValueId");
 22700
 22701                    b.HasIndex("Type", "CleanValue");
 22702
 22703                    b.ToTable("ItemValues");
 22704                });
 705
 22706            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 22707                {
 22708                    b.Property<Guid>("ItemValueId")
 22709                        .HasColumnType("TEXT");
 22710
 22711                    b.Property<Guid>("ItemId")
 22712                        .HasColumnType("TEXT");
 22713
 22714                    b.HasKey("ItemValueId", "ItemId");
 22715
 22716                    b.HasIndex("ItemId");
 22717
 22718                    b.ToTable("ItemValuesMap");
 22719                });
 720
 22721            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 22722                {
 22723                    b.Property<Guid>("Id")
 22724                        .ValueGeneratedOnAdd()
 22725                        .HasColumnType("TEXT");
 22726
 22727                    b.Property<long>("EndTicks")
 22728                        .HasColumnType("INTEGER");
 22729
 22730                    b.Property<Guid>("ItemId")
 22731                        .HasColumnType("TEXT");
 22732
 22733                    b.Property<string>("SegmentProviderId")
 22734                        .IsRequired()
 22735                        .HasColumnType("TEXT");
 22736
 22737                    b.Property<long>("StartTicks")
 22738                        .HasColumnType("INTEGER");
 22739
 22740                    b.Property<int>("Type")
 22741                        .HasColumnType("INTEGER");
 22742
 22743                    b.HasKey("Id");
 22744
 22745                    b.ToTable("MediaSegments");
 22746                });
 747
 22748            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 22749                {
 22750                    b.Property<Guid>("ItemId")
 22751                        .HasColumnType("TEXT");
 22752
 22753                    b.Property<int>("StreamIndex")
 22754                        .HasColumnType("INTEGER");
 22755
 22756                    b.Property<string>("AspectRatio")
 22757                        .HasColumnType("TEXT");
 22758
 22759                    b.Property<float>("AverageFrameRate")
 22760                        .HasColumnType("REAL");
 22761
 22762                    b.Property<int>("BitDepth")
 22763                        .HasColumnType("INTEGER");
 22764
 22765                    b.Property<int>("BitRate")
 22766                        .HasColumnType("INTEGER");
 22767
 22768                    b.Property<int>("BlPresentFlag")
 22769                        .HasColumnType("INTEGER");
 22770
 22771                    b.Property<string>("ChannelLayout")
 22772                        .HasColumnType("TEXT");
 22773
 22774                    b.Property<int>("Channels")
 22775                        .HasColumnType("INTEGER");
 22776
 22777                    b.Property<string>("Codec")
 22778                        .HasColumnType("TEXT");
 22779
 22780                    b.Property<string>("CodecTag")
 22781                        .IsRequired()
 22782                        .HasColumnType("TEXT");
 22783
 22784                    b.Property<string>("CodecTimeBase")
 22785                        .IsRequired()
 22786                        .HasColumnType("TEXT");
 22787
 22788                    b.Property<string>("ColorPrimaries")
 22789                        .IsRequired()
 22790                        .HasColumnType("TEXT");
 22791
 22792                    b.Property<string>("ColorSpace")
 22793                        .IsRequired()
 22794                        .HasColumnType("TEXT");
 22795
 22796                    b.Property<string>("ColorTransfer")
 22797                        .IsRequired()
 22798                        .HasColumnType("TEXT");
 22799
 22800                    b.Property<string>("Comment")
 22801                        .IsRequired()
 22802                        .HasColumnType("TEXT");
 22803
 22804                    b.Property<int>("DvBlSignalCompatibilityId")
 22805                        .HasColumnType("INTEGER");
 22806
 22807                    b.Property<int>("DvLevel")
 22808                        .HasColumnType("INTEGER");
 22809
 22810                    b.Property<int>("DvProfile")
 22811                        .HasColumnType("INTEGER");
 22812
 22813                    b.Property<int>("DvVersionMajor")
 22814                        .HasColumnType("INTEGER");
 22815
 22816                    b.Property<int>("DvVersionMinor")
 22817                        .HasColumnType("INTEGER");
 22818
 22819                    b.Property<int>("ElPresentFlag")
 22820                        .HasColumnType("INTEGER");
 22821
 22822                    b.Property<int>("Height")
 22823                        .HasColumnType("INTEGER");
 22824
 22825                    b.Property<bool>("IsAnamorphic")
 22826                        .HasColumnType("INTEGER");
 22827
 22828                    b.Property<bool>("IsAvc")
 22829                        .HasColumnType("INTEGER");
 22830
 22831                    b.Property<bool>("IsDefault")
 22832                        .HasColumnType("INTEGER");
 22833
 22834                    b.Property<bool>("IsExternal")
 22835                        .HasColumnType("INTEGER");
 22836
 22837                    b.Property<bool>("IsForced")
 22838                        .HasColumnType("INTEGER");
 22839
 22840                    b.Property<bool>("IsHearingImpaired")
 22841                        .HasColumnType("INTEGER");
 22842
 22843                    b.Property<bool>("IsInterlaced")
 22844                        .HasColumnType("INTEGER");
 22845
 22846                    b.Property<string>("KeyFrames")
 22847                        .HasColumnType("TEXT");
 22848
 22849                    b.Property<string>("Language")
 22850                        .HasColumnType("TEXT");
 22851
 22852                    b.Property<float>("Level")
 22853                        .HasColumnType("REAL");
 22854
 22855                    b.Property<string>("NalLengthSize")
 22856                        .IsRequired()
 22857                        .HasColumnType("TEXT");
 22858
 22859                    b.Property<string>("Path")
 22860                        .HasColumnType("TEXT");
 22861
 22862                    b.Property<string>("PixelFormat")
 22863                        .HasColumnType("TEXT");
 22864
 22865                    b.Property<string>("Profile")
 22866                        .HasColumnType("TEXT");
 22867
 22868                    b.Property<float>("RealFrameRate")
 22869                        .HasColumnType("REAL");
 22870
 22871                    b.Property<int>("RefFrames")
 22872                        .HasColumnType("INTEGER");
 22873
 22874                    b.Property<int>("Rotation")
 22875                        .HasColumnType("INTEGER");
 22876
 22877                    b.Property<int>("RpuPresentFlag")
 22878                        .HasColumnType("INTEGER");
 22879
 22880                    b.Property<int>("SampleRate")
 22881                        .HasColumnType("INTEGER");
 22882
 22883                    b.Property<int?>("StreamType")
 22884                        .HasColumnType("INTEGER");
 22885
 22886                    b.Property<string>("TimeBase")
 22887                        .IsRequired()
 22888                        .HasColumnType("TEXT");
 22889
 22890                    b.Property<string>("Title")
 22891                        .IsRequired()
 22892                        .HasColumnType("TEXT");
 22893
 22894                    b.Property<int>("Width")
 22895                        .HasColumnType("INTEGER");
 22896
 22897                    b.HasKey("ItemId", "StreamIndex");
 22898
 22899                    b.HasIndex("StreamIndex");
 22900
 22901                    b.HasIndex("StreamType");
 22902
 22903                    b.HasIndex("StreamIndex", "StreamType");
 22904
 22905                    b.HasIndex("StreamIndex", "StreamType", "Language");
 22906
 22907                    b.ToTable("MediaStreamInfos");
 22908                });
 909
 22910            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 22911                {
 22912                    b.Property<Guid>("Id")
 22913                        .ValueGeneratedOnAdd()
 22914                        .HasColumnType("TEXT");
 22915
 22916                    b.Property<string>("Name")
 22917                        .IsRequired()
 22918                        .HasColumnType("TEXT");
 22919
 22920                    b.Property<string>("PersonType")
 22921                        .HasColumnType("TEXT");
 22922
 22923                    b.HasKey("Id");
 22924
 22925                    b.HasIndex("Name");
 22926
 22927                    b.ToTable("Peoples");
 22928                });
 929
 22930            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 22931                {
 22932                    b.Property<Guid>("ItemId")
 22933                        .HasColumnType("TEXT");
 22934
 22935                    b.Property<Guid>("PeopleId")
 22936                        .HasColumnType("TEXT");
 22937
 22938                    b.Property<int?>("ListOrder")
 22939                        .HasColumnType("INTEGER");
 22940
 22941                    b.Property<string>("Role")
 22942                        .HasColumnType("TEXT");
 22943
 22944                    b.Property<int?>("SortOrder")
 22945                        .HasColumnType("INTEGER");
 22946
 22947                    b.HasKey("ItemId", "PeopleId");
 22948
 22949                    b.HasIndex("PeopleId");
 22950
 22951                    b.HasIndex("ItemId", "ListOrder");
 22952
 22953                    b.HasIndex("ItemId", "SortOrder");
 22954
 22955                    b.ToTable("PeopleBaseItemMap");
 22956                });
 957
 22958            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22959                {
 22960                    b.Property<int>("Id")
 22961                        .ValueGeneratedOnAdd()
 22962                        .HasColumnType("INTEGER");
 22963
 22964                    b.Property<int>("Kind")
 22965                        .HasColumnType("INTEGER");
 22966
 22967                    b.Property<Guid?>("Permission_Permissions_Guid")
 22968                        .HasColumnType("TEXT");
 22969
 22970                    b.Property<uint>("RowVersion")
 22971                        .IsConcurrencyToken()
 22972                        .HasColumnType("INTEGER");
 22973
 22974                    b.Property<Guid?>("UserId")
 22975                        .HasColumnType("TEXT");
 22976
 22977                    b.Property<bool>("Value")
 22978                        .HasColumnType("INTEGER");
 22979
 22980                    b.HasKey("Id");
 22981
 22982                    b.HasIndex("UserId", "Kind")
 22983                        .IsUnique()
 22984                        .HasFilter("[UserId] IS NOT NULL");
 22985
 22986                    b.ToTable("Permissions");
 22987                });
 988
 22989            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22990                {
 22991                    b.Property<int>("Id")
 22992                        .ValueGeneratedOnAdd()
 22993                        .HasColumnType("INTEGER");
 22994
 22995                    b.Property<int>("Kind")
 22996                        .HasColumnType("INTEGER");
 22997
 22998                    b.Property<Guid?>("Preference_Preferences_Guid")
 22999                        .HasColumnType("TEXT");
 221000
 221001                    b.Property<uint>("RowVersion")
 221002                        .IsConcurrencyToken()
 221003                        .HasColumnType("INTEGER");
 221004
 221005                    b.Property<Guid?>("UserId")
 221006                        .HasColumnType("TEXT");
 221007
 221008                    b.Property<string>("Value")
 221009                        .IsRequired()
 221010                        .HasMaxLength(65535)
 221011                        .HasColumnType("TEXT");
 221012
 221013                    b.HasKey("Id");
 221014
 221015                    b.HasIndex("UserId", "Kind")
 221016                        .IsUnique()
 221017                        .HasFilter("[UserId] IS NOT NULL");
 221018
 221019                    b.ToTable("Preferences");
 221020                });
 1021
 221022            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 221023                {
 221024                    b.Property<int>("Id")
 221025                        .ValueGeneratedOnAdd()
 221026                        .HasColumnType("INTEGER");
 221027
 221028                    b.Property<string>("AccessToken")
 221029                        .IsRequired()
 221030                        .HasColumnType("TEXT");
 221031
 221032                    b.Property<DateTime>("DateCreated")
 221033                        .HasColumnType("TEXT");
 221034
 221035                    b.Property<DateTime>("DateLastActivity")
 221036                        .HasColumnType("TEXT");
 221037
 221038                    b.Property<string>("Name")
 221039                        .IsRequired()
 221040                        .HasMaxLength(64)
 221041                        .HasColumnType("TEXT");
 221042
 221043                    b.HasKey("Id");
 221044
 221045                    b.HasIndex("AccessToken")
 221046                        .IsUnique();
 221047
 221048                    b.ToTable("ApiKeys");
 221049                });
 1050
 221051            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221052                {
 221053                    b.Property<int>("Id")
 221054                        .ValueGeneratedOnAdd()
 221055                        .HasColumnType("INTEGER");
 221056
 221057                    b.Property<string>("AccessToken")
 221058                        .IsRequired()
 221059                        .HasColumnType("TEXT");
 221060
 221061                    b.Property<string>("AppName")
 221062                        .IsRequired()
 221063                        .HasMaxLength(64)
 221064                        .HasColumnType("TEXT");
 221065
 221066                    b.Property<string>("AppVersion")
 221067                        .IsRequired()
 221068                        .HasMaxLength(32)
 221069                        .HasColumnType("TEXT");
 221070
 221071                    b.Property<DateTime>("DateCreated")
 221072                        .HasColumnType("TEXT");
 221073
 221074                    b.Property<DateTime>("DateLastActivity")
 221075                        .HasColumnType("TEXT");
 221076
 221077                    b.Property<DateTime>("DateModified")
 221078                        .HasColumnType("TEXT");
 221079
 221080                    b.Property<string>("DeviceId")
 221081                        .IsRequired()
 221082                        .HasMaxLength(256)
 221083                        .HasColumnType("TEXT");
 221084
 221085                    b.Property<string>("DeviceName")
 221086                        .IsRequired()
 221087                        .HasMaxLength(64)
 221088                        .HasColumnType("TEXT");
 221089
 221090                    b.Property<bool>("IsActive")
 221091                        .HasColumnType("INTEGER");
 221092
 221093                    b.Property<Guid>("UserId")
 221094                        .HasColumnType("TEXT");
 221095
 221096                    b.HasKey("Id");
 221097
 221098                    b.HasIndex("DeviceId");
 221099
 221100                    b.HasIndex("AccessToken", "DateLastActivity");
 221101
 221102                    b.HasIndex("DeviceId", "DateLastActivity");
 221103
 221104                    b.HasIndex("UserId", "DeviceId");
 221105
 221106                    b.ToTable("Devices");
 221107                });
 1108
 221109            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 221110                {
 221111                    b.Property<int>("Id")
 221112                        .ValueGeneratedOnAdd()
 221113                        .HasColumnType("INTEGER");
 221114
 221115                    b.Property<string>("CustomName")
 221116                        .HasColumnType("TEXT");
 221117
 221118                    b.Property<string>("DeviceId")
 221119                        .IsRequired()
 221120                        .HasColumnType("TEXT");
 221121
 221122                    b.HasKey("Id");
 221123
 221124                    b.HasIndex("DeviceId")
 221125                        .IsUnique();
 221126
 221127                    b.ToTable("DeviceOptions");
 221128                });
 1129
 221130            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 221131                {
 221132                    b.Property<Guid>("ItemId")
 221133                        .HasColumnType("TEXT");
 221134
 221135                    b.Property<int>("Width")
 221136                        .HasColumnType("INTEGER");
 221137
 221138                    b.Property<int>("Bandwidth")
 221139                        .HasColumnType("INTEGER");
 221140
 221141                    b.Property<int>("Height")
 221142                        .HasColumnType("INTEGER");
 221143
 221144                    b.Property<int>("Interval")
 221145                        .HasColumnType("INTEGER");
 221146
 221147                    b.Property<int>("ThumbnailCount")
 221148                        .HasColumnType("INTEGER");
 221149
 221150                    b.Property<int>("TileHeight")
 221151                        .HasColumnType("INTEGER");
 221152
 221153                    b.Property<int>("TileWidth")
 221154                        .HasColumnType("INTEGER");
 221155
 221156                    b.HasKey("ItemId", "Width");
 221157
 221158                    b.ToTable("TrickplayInfos");
 221159                });
 1160
 221161            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221162                {
 221163                    b.Property<Guid>("Id")
 221164                        .ValueGeneratedOnAdd()
 221165                        .HasColumnType("TEXT");
 221166
 221167                    b.Property<string>("AudioLanguagePreference")
 221168                        .HasMaxLength(255)
 221169                        .HasColumnType("TEXT");
 221170
 221171                    b.Property<string>("AuthenticationProviderId")
 221172                        .IsRequired()
 221173                        .HasMaxLength(255)
 221174                        .HasColumnType("TEXT");
 221175
 221176                    b.Property<string>("CastReceiverId")
 221177                        .HasMaxLength(32)
 221178                        .HasColumnType("TEXT");
 221179
 221180                    b.Property<bool>("DisplayCollectionsView")
 221181                        .HasColumnType("INTEGER");
 221182
 221183                    b.Property<bool>("DisplayMissingEpisodes")
 221184                        .HasColumnType("INTEGER");
 221185
 221186                    b.Property<bool>("EnableAutoLogin")
 221187                        .HasColumnType("INTEGER");
 221188
 221189                    b.Property<bool>("EnableLocalPassword")
 221190                        .HasColumnType("INTEGER");
 221191
 221192                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221193                        .HasColumnType("INTEGER");
 221194
 221195                    b.Property<bool>("EnableUserPreferenceAccess")
 221196                        .HasColumnType("INTEGER");
 221197
 221198                    b.Property<bool>("HidePlayedInLatest")
 221199                        .HasColumnType("INTEGER");
 221200
 221201                    b.Property<long>("InternalId")
 221202                        .HasColumnType("INTEGER");
 221203
 221204                    b.Property<int>("InvalidLoginAttemptCount")
 221205                        .HasColumnType("INTEGER");
 221206
 221207                    b.Property<DateTime?>("LastActivityDate")
 221208                        .HasColumnType("TEXT");
 221209
 221210                    b.Property<DateTime?>("LastLoginDate")
 221211                        .HasColumnType("TEXT");
 221212
 221213                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221214                        .HasColumnType("INTEGER");
 221215
 221216                    b.Property<int>("MaxActiveSessions")
 221217                        .HasColumnType("INTEGER");
 221218
 221219                    b.Property<int?>("MaxParentalAgeRating")
 221220                        .HasColumnType("INTEGER");
 221221
 221222                    b.Property<bool>("MustUpdatePassword")
 221223                        .HasColumnType("INTEGER");
 221224
 221225                    b.Property<string>("Password")
 221226                        .HasMaxLength(65535)
 221227                        .HasColumnType("TEXT");
 221228
 221229                    b.Property<string>("PasswordResetProviderId")
 221230                        .IsRequired()
 221231                        .HasMaxLength(255)
 221232                        .HasColumnType("TEXT");
 221233
 221234                    b.Property<bool>("PlayDefaultAudioTrack")
 221235                        .HasColumnType("INTEGER");
 221236
 221237                    b.Property<bool>("RememberAudioSelections")
 221238                        .HasColumnType("INTEGER");
 221239
 221240                    b.Property<bool>("RememberSubtitleSelections")
 221241                        .HasColumnType("INTEGER");
 221242
 221243                    b.Property<int?>("RemoteClientBitrateLimit")
 221244                        .HasColumnType("INTEGER");
 221245
 221246                    b.Property<uint>("RowVersion")
 221247                        .IsConcurrencyToken()
 221248                        .HasColumnType("INTEGER");
 221249
 221250                    b.Property<string>("SubtitleLanguagePreference")
 221251                        .HasMaxLength(255)
 221252                        .HasColumnType("TEXT");
 221253
 221254                    b.Property<int>("SubtitleMode")
 221255                        .HasColumnType("INTEGER");
 221256
 221257                    b.Property<int>("SyncPlayAccess")
 221258                        .HasColumnType("INTEGER");
 221259
 221260                    b.Property<string>("Username")
 221261                        .IsRequired()
 221262                        .HasMaxLength(255)
 221263                        .HasColumnType("TEXT")
 221264                        .UseCollation("NOCASE");
 221265
 221266                    b.HasKey("Id");
 221267
 221268                    b.HasIndex("Username")
 221269                        .IsUnique();
 221270
 221271                    b.ToTable("Users");
 221272                });
 1273
 221274            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221275                {
 221276                    b.Property<Guid>("ItemId")
 221277                        .HasColumnType("TEXT");
 221278
 221279                    b.Property<Guid>("UserId")
 221280                        .HasColumnType("TEXT");
 221281
 221282                    b.Property<string>("CustomDataKey")
 221283                        .HasColumnType("TEXT");
 221284
 221285                    b.Property<int?>("AudioStreamIndex")
 221286                        .HasColumnType("INTEGER");
 221287
 221288                    b.Property<bool>("IsFavorite")
 221289                        .HasColumnType("INTEGER");
 221290
 221291                    b.Property<DateTime?>("LastPlayedDate")
 221292                        .HasColumnType("TEXT");
 221293
 221294                    b.Property<bool?>("Likes")
 221295                        .HasColumnType("INTEGER");
 221296
 221297                    b.Property<int>("PlayCount")
 221298                        .HasColumnType("INTEGER");
 221299
 221300                    b.Property<long>("PlaybackPositionTicks")
 221301                        .HasColumnType("INTEGER");
 221302
 221303                    b.Property<bool>("Played")
 221304                        .HasColumnType("INTEGER");
 221305
 221306                    b.Property<double?>("Rating")
 221307                        .HasColumnType("REAL");
 221308
 221309                    b.Property<int?>("SubtitleStreamIndex")
 221310                        .HasColumnType("INTEGER");
 221311
 221312                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221313
 221314                    b.HasIndex("UserId");
 221315
 221316                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221317
 221318                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221319
 221320                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221321
 221322                    b.HasIndex("ItemId", "UserId", "Played");
 221323
 221324                    b.ToTable("UserData");
 221325                });
 1326
 221327            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 221328                {
 221329                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221330                        .WithMany("AccessSchedules")
 221331                        .HasForeignKey("UserId")
 221332                        .OnDelete(DeleteBehavior.Cascade)
 221333                        .IsRequired();
 221334                });
 1335
 221336            modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
 221337                {
 221338                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", null)
 221339                        .WithMany("AncestorIds")
 221340                        .HasForeignKey("BaseItemEntityId");
 221341
 221342                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221343                        .WithMany()
 221344                        .HasForeignKey("ItemId")
 221345                        .OnDelete(DeleteBehavior.Cascade)
 221346                        .IsRequired();
 221347
 221348                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem")
 221349                        .WithMany()
 221350                        .HasForeignKey("ParentItemId")
 221351                        .OnDelete(DeleteBehavior.Cascade)
 221352                        .IsRequired();
 221353
 221354                    b.Navigation("Item");
 221355
 221356                    b.Navigation("ParentItem");
 221357                });
 1358
 221359            modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
 221360                {
 221361                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221362                        .WithMany()
 221363                        .HasForeignKey("ItemId")
 221364                        .OnDelete(DeleteBehavior.Cascade)
 221365                        .IsRequired();
 221366
 221367                    b.Navigation("Item");
 221368                });
 1369
 221370            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
 221371                {
 221372                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221373                        .WithMany("Images")
 221374                        .HasForeignKey("ItemId")
 221375                        .OnDelete(DeleteBehavior.Cascade)
 221376                        .IsRequired();
 221377
 221378                    b.Navigation("Item");
 221379                });
 1380
 221381            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
 221382                {
 221383                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221384                        .WithMany("LockedFields")
 221385                        .HasForeignKey("ItemId")
 221386                        .OnDelete(DeleteBehavior.Cascade)
 221387                        .IsRequired();
 221388
 221389                    b.Navigation("Item");
 221390                });
 1391
 221392            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
 221393                {
 221394                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221395                        .WithMany("Provider")
 221396                        .HasForeignKey("ItemId")
 221397                        .OnDelete(DeleteBehavior.Cascade)
 221398                        .IsRequired();
 221399
 221400                    b.Navigation("Item");
 221401                });
 1402
 221403            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
 221404                {
 221405                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221406                        .WithMany("TrailerTypes")
 221407                        .HasForeignKey("ItemId")
 221408                        .OnDelete(DeleteBehavior.Cascade)
 221409                        .IsRequired();
 221410
 221411                    b.Navigation("Item");
 221412                });
 1413
 221414            modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
 221415                {
 221416                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221417                        .WithMany("Chapters")
 221418                        .HasForeignKey("ItemId")
 221419                        .OnDelete(DeleteBehavior.Cascade)
 221420                        .IsRequired();
 221421
 221422                    b.Navigation("Item");
 221423                });
 1424
 221425            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221426                {
 221427                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221428                        .WithMany("DisplayPreferences")
 221429                        .HasForeignKey("UserId")
 221430                        .OnDelete(DeleteBehavior.Cascade)
 221431                        .IsRequired();
 221432                });
 1433
 221434            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 221435                {
 221436                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 221437                        .WithMany("HomeSections")
 221438                        .HasForeignKey("DisplayPreferencesId")
 221439                        .OnDelete(DeleteBehavior.Cascade)
 221440                        .IsRequired();
 221441                });
 1442
 221443            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 221444                {
 221445                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221446                        .WithOne("ProfileImage")
 221447                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 221448                        .OnDelete(DeleteBehavior.Cascade);
 221449                });
 1450
 221451            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 221452                {
 221453                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221454                        .WithMany("ItemDisplayPreferences")
 221455                        .HasForeignKey("UserId")
 221456                        .OnDelete(DeleteBehavior.Cascade)
 221457                        .IsRequired();
 221458                });
 1459
 221460            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
 221461                {
 221462                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221463                        .WithMany("ItemValues")
 221464                        .HasForeignKey("ItemId")
 221465                        .OnDelete(DeleteBehavior.Cascade)
 221466                        .IsRequired();
 221467
 221468                    b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue")
 221469                        .WithMany("BaseItemsMap")
 221470                        .HasForeignKey("ItemValueId")
 221471                        .OnDelete(DeleteBehavior.Cascade)
 221472                        .IsRequired();
 221473
 221474                    b.Navigation("Item");
 221475
 221476                    b.Navigation("ItemValue");
 221477                });
 1478
 221479            modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
 221480                {
 221481                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221482                        .WithMany("MediaStreams")
 221483                        .HasForeignKey("ItemId")
 221484                        .OnDelete(DeleteBehavior.Cascade)
 221485                        .IsRequired();
 221486
 221487                    b.Navigation("Item");
 221488                });
 1489
 221490            modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
 221491                {
 221492                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221493                        .WithMany("Peoples")
 221494                        .HasForeignKey("ItemId")
 221495                        .OnDelete(DeleteBehavior.Cascade)
 221496                        .IsRequired();
 221497
 221498                    b.HasOne("Jellyfin.Data.Entities.People", "People")
 221499                        .WithMany("BaseItems")
 221500                        .HasForeignKey("PeopleId")
 221501                        .OnDelete(DeleteBehavior.Cascade)
 221502                        .IsRequired();
 221503
 221504                    b.Navigation("Item");
 221505
 221506                    b.Navigation("People");
 221507                });
 1508
 221509            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 221510                {
 221511                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221512                        .WithMany("Permissions")
 221513                        .HasForeignKey("UserId")
 221514                        .OnDelete(DeleteBehavior.Cascade);
 221515                });
 1516
 221517            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 221518                {
 221519                    b.HasOne("Jellyfin.Data.Entities.User", null)
 221520                        .WithMany("Preferences")
 221521                        .HasForeignKey("UserId")
 221522                        .OnDelete(DeleteBehavior.Cascade);
 221523                });
 1524
 221525            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 221526                {
 221527                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221528                        .WithMany()
 221529                        .HasForeignKey("UserId")
 221530                        .OnDelete(DeleteBehavior.Cascade)
 221531                        .IsRequired();
 221532
 221533                    b.Navigation("User");
 221534                });
 1535
 221536            modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
 221537                {
 221538                    b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
 221539                        .WithMany("UserData")
 221540                        .HasForeignKey("ItemId")
 221541                        .OnDelete(DeleteBehavior.Cascade)
 221542                        .IsRequired();
 221543
 221544                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 221545                        .WithMany()
 221546                        .HasForeignKey("UserId")
 221547                        .OnDelete(DeleteBehavior.Cascade)
 221548                        .IsRequired();
 221549
 221550                    b.Navigation("Item");
 221551
 221552                    b.Navigation("User");
 221553                });
 1554
 221555            modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
 221556                {
 221557                    b.Navigation("AncestorIds");
 221558
 221559                    b.Navigation("Chapters");
 221560
 221561                    b.Navigation("Images");
 221562
 221563                    b.Navigation("ItemValues");
 221564
 221565                    b.Navigation("LockedFields");
 221566
 221567                    b.Navigation("MediaStreams");
 221568
 221569                    b.Navigation("Peoples");
 221570
 221571                    b.Navigation("Provider");
 221572
 221573                    b.Navigation("TrailerTypes");
 221574
 221575                    b.Navigation("UserData");
 221576                });
 1577
 221578            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 221579                {
 221580                    b.Navigation("HomeSections");
 221581                });
 1582
 221583            modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
 221584                {
 221585                    b.Navigation("BaseItemsMap");
 221586                });
 1587
 221588            modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
 221589                {
 221590                    b.Navigation("BaseItems");
 221591                });
 1592
 221593            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 221594                {
 221595                    b.Navigation("AccessSchedules");
 221596
 221597                    b.Navigation("DisplayPreferences");
 221598
 221599                    b.Navigation("ItemDisplayPreferences");
 221600
 221601                    b.Navigation("Permissions");
 221602
 221603                    b.Navigation("Preferences");
 221604
 221605                    b.Navigation("ProfileImage");
 221606                });
 1607#pragma warning restore 612, 618
 221608        }
 1609    }
 1610}