< Summary - Jellyfin

Line coverage
99%
Covered lines: 1629
Uncovered lines: 12
Coverable lines: 1641
Total lines: 1741
Line coverage: 99.2%
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.2% (1629/1641) Total lines: 1741

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/20250405075612_FixItemValuesIndices.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixItemValuesIndices : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.DropIndex(
 2214                name: "IX_ItemValues_Type_CleanValue",
 2215                table: "ItemValues");
 16
 2217            migrationBuilder.CreateIndex(
 2218                name: "IX_ItemValues_Type_CleanValue",
 2219                table: "ItemValues",
 2220                columns: new[] { "Type", "CleanValue" });
 21
 2222            migrationBuilder.CreateIndex(
 2223                name: "IX_ItemValues_Type_Value",
 2224                table: "ItemValues",
 2225                columns: new[] { "Type", "Value" },
 2226                unique: true);
 2227        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_ItemValues_Type_CleanValue",
 034                table: "ItemValues");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_ItemValues_Type_Value",
 038                table: "ItemValues");
 39
 040            migrationBuilder.CreateIndex(
 041                name: "IX_ItemValues_Type_CleanValue",
 042                table: "ItemValues",
 043                columns: new[] { "Type", "CleanValue" },
 044                unique: true);
 045        }
 46    }
 47}

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