< Summary - Jellyfin

Line coverage
99%
Covered lines: 1583
Uncovered lines: 1
Coverable lines: 1584
Total lines: 1678
Line coverage: 99.9%
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.9% (1583/1584) Total lines: 1678

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/20250401142247_FixAncestors.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixAncestors : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213        }
 14
 15        /// <inheritdoc />
 16        protected override void Down(MigrationBuilder migrationBuilder)
 17        {
 018        }
 19    }
 20}

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