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