< Summary - Jellyfin

Line coverage
99%
Covered lines: 1589
Uncovered lines: 10
Coverable lines: 1599
Total lines: 1693
Line coverage: 99.3%
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.3% (1589/1599) Total lines: 1693

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/20250331182844_FixAttachmentMigration.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixAttachmentMigration : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.AlterColumn<string>(
 2214                name: "Codec",
 2215                table: "AttachmentStreamInfos",
 2216                type: "TEXT",
 2217                nullable: true,
 2218                oldClrType: typeof(string),
 2219                oldType: "TEXT");
 2220        }
 21
 22        /// <inheritdoc />
 23        protected override void Down(MigrationBuilder migrationBuilder)
 24        {
 025            migrationBuilder.AlterColumn<string>(
 026                name: "Codec",
 027                table: "AttachmentStreamInfos",
 028                type: "TEXT",
 029                nullable: false,
 030                defaultValue: string.Empty,
 031                oldClrType: typeof(string),
 032                oldType: "TEXT",
 033                oldNullable: true);
 034        }
 35    }
 36}

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