< Summary - Jellyfin

Line coverage
99%
Covered lines: 1625
Uncovered lines: 8
Coverable lines: 1633
Total lines: 1732
Line coverage: 99.5%
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 4/8/2026 - 12:11:47 AM Line coverage: 99.5% (1625/1633) Total lines: 1732

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/20250609115616_DetachUserDataInsteadOfDelete.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class DetachUserDataInsteadOfDelete : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2214            migrationBuilder.AddColumn<DateTimeOffset>(
 2215                name: "RetentionDate",
 2216                table: "UserData",
 2217                type: "TEXT",
 2218                nullable: true);
 19
 2220            migrationBuilder.InsertData(
 2221                table: "BaseItems",
 2222                columns: new[] { "Id", "Album", "AlbumArtists", "Artists", "Audio", "ChannelId", "CleanName", "Community
 2223                values: new object[] { new Guid("00000000-0000-0000-0000-000000000001"), null, null, null, null, null, n
 2224        }
 25
 26        /// <inheritdoc />
 27        protected override void Down(MigrationBuilder migrationBuilder)
 28        {
 029            migrationBuilder.DropColumn(
 030                name: "RetentionDate",
 031                table: "UserData");
 32
 033            migrationBuilder.DeleteData(
 034                table: "BaseItems",
 035                keyColumn: "Id",
 036                keyValue: new Guid("00000000-0000-0000-0000-000000000001"));
 037        }
 38    }
 39}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250609115616_DetachUserDataInsteadOfDelete.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("20250609115616_DetachUserDataInsteadOfDelete")]
 15    partial class DetachUserDataInsteadOfDelete
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "9.0.5");
 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
 22730                    b.HasIndex("Type", "Value")
 22731                        .IsUnique();
 22732
 22733                    b.ToTable("ItemValues");
 22734
 22735                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22736                });
 737
 22738            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 22739                {
 22740                    b.Property<Guid>("ItemValueId")
 22741                        .HasColumnType("TEXT");
 22742
 22743                    b.Property<Guid>("ItemId")
 22744                        .HasColumnType("TEXT");
 22745
 22746                    b.HasKey("ItemValueId", "ItemId");
 22747
 22748                    b.HasIndex("ItemId");
 22749
 22750                    b.ToTable("ItemValuesMap");
 22751
 22752                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22753                });
 754
 22755            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 22756                {
 22757                    b.Property<Guid>("ItemId")
 22758                        .HasColumnType("TEXT");
 22759
 22760                    b.PrimitiveCollection<string>("KeyframeTicks")
 22761                        .HasColumnType("TEXT");
 22762
 22763                    b.Property<long>("TotalDuration")
 22764                        .HasColumnType("INTEGER");
 22765
 22766                    b.HasKey("ItemId");
 22767
 22768                    b.ToTable("KeyframeData");
 22769
 22770                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22771                });
 772
 22773            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 22774                {
 22775                    b.Property<Guid>("Id")
 22776                        .ValueGeneratedOnAdd()
 22777                        .HasColumnType("TEXT");
 22778
 22779                    b.Property<long>("EndTicks")
 22780                        .HasColumnType("INTEGER");
 22781
 22782                    b.Property<Guid>("ItemId")
 22783                        .HasColumnType("TEXT");
 22784
 22785                    b.Property<string>("SegmentProviderId")
 22786                        .IsRequired()
 22787                        .HasColumnType("TEXT");
 22788
 22789                    b.Property<long>("StartTicks")
 22790                        .HasColumnType("INTEGER");
 22791
 22792                    b.Property<int>("Type")
 22793                        .HasColumnType("INTEGER");
 22794
 22795                    b.HasKey("Id");
 22796
 22797                    b.ToTable("MediaSegments");
 22798
 22799                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22800                });
 801
 22802            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 22803                {
 22804                    b.Property<Guid>("ItemId")
 22805                        .HasColumnType("TEXT");
 22806
 22807                    b.Property<int>("StreamIndex")
 22808                        .HasColumnType("INTEGER");
 22809
 22810                    b.Property<string>("AspectRatio")
 22811                        .HasColumnType("TEXT");
 22812
 22813                    b.Property<float?>("AverageFrameRate")
 22814                        .HasColumnType("REAL");
 22815
 22816                    b.Property<int?>("BitDepth")
 22817                        .HasColumnType("INTEGER");
 22818
 22819                    b.Property<int?>("BitRate")
 22820                        .HasColumnType("INTEGER");
 22821
 22822                    b.Property<int?>("BlPresentFlag")
 22823                        .HasColumnType("INTEGER");
 22824
 22825                    b.Property<string>("ChannelLayout")
 22826                        .HasColumnType("TEXT");
 22827
 22828                    b.Property<int?>("Channels")
 22829                        .HasColumnType("INTEGER");
 22830
 22831                    b.Property<string>("Codec")
 22832                        .HasColumnType("TEXT");
 22833
 22834                    b.Property<string>("CodecTag")
 22835                        .HasColumnType("TEXT");
 22836
 22837                    b.Property<string>("CodecTimeBase")
 22838                        .HasColumnType("TEXT");
 22839
 22840                    b.Property<string>("ColorPrimaries")
 22841                        .HasColumnType("TEXT");
 22842
 22843                    b.Property<string>("ColorSpace")
 22844                        .HasColumnType("TEXT");
 22845
 22846                    b.Property<string>("ColorTransfer")
 22847                        .HasColumnType("TEXT");
 22848
 22849                    b.Property<string>("Comment")
 22850                        .HasColumnType("TEXT");
 22851
 22852                    b.Property<int?>("DvBlSignalCompatibilityId")
 22853                        .HasColumnType("INTEGER");
 22854
 22855                    b.Property<int?>("DvLevel")
 22856                        .HasColumnType("INTEGER");
 22857
 22858                    b.Property<int?>("DvProfile")
 22859                        .HasColumnType("INTEGER");
 22860
 22861                    b.Property<int?>("DvVersionMajor")
 22862                        .HasColumnType("INTEGER");
 22863
 22864                    b.Property<int?>("DvVersionMinor")
 22865                        .HasColumnType("INTEGER");
 22866
 22867                    b.Property<int?>("ElPresentFlag")
 22868                        .HasColumnType("INTEGER");
 22869
 22870                    b.Property<bool?>("Hdr10PlusPresentFlag")
 22871                        .HasColumnType("INTEGER");
 22872
 22873                    b.Property<int?>("Height")
 22874                        .HasColumnType("INTEGER");
 22875
 22876                    b.Property<bool?>("IsAnamorphic")
 22877                        .HasColumnType("INTEGER");
 22878
 22879                    b.Property<bool?>("IsAvc")
 22880                        .HasColumnType("INTEGER");
 22881
 22882                    b.Property<bool>("IsDefault")
 22883                        .HasColumnType("INTEGER");
 22884
 22885                    b.Property<bool>("IsExternal")
 22886                        .HasColumnType("INTEGER");
 22887
 22888                    b.Property<bool>("IsForced")
 22889                        .HasColumnType("INTEGER");
 22890
 22891                    b.Property<bool?>("IsHearingImpaired")
 22892                        .HasColumnType("INTEGER");
 22893
 22894                    b.Property<bool?>("IsInterlaced")
 22895                        .HasColumnType("INTEGER");
 22896
 22897                    b.Property<string>("KeyFrames")
 22898                        .HasColumnType("TEXT");
 22899
 22900                    b.Property<string>("Language")
 22901                        .HasColumnType("TEXT");
 22902
 22903                    b.Property<float?>("Level")
 22904                        .HasColumnType("REAL");
 22905
 22906                    b.Property<string>("NalLengthSize")
 22907                        .HasColumnType("TEXT");
 22908
 22909                    b.Property<string>("Path")
 22910                        .HasColumnType("TEXT");
 22911
 22912                    b.Property<string>("PixelFormat")
 22913                        .HasColumnType("TEXT");
 22914
 22915                    b.Property<string>("Profile")
 22916                        .HasColumnType("TEXT");
 22917
 22918                    b.Property<float?>("RealFrameRate")
 22919                        .HasColumnType("REAL");
 22920
 22921                    b.Property<int?>("RefFrames")
 22922                        .HasColumnType("INTEGER");
 22923
 22924                    b.Property<int?>("Rotation")
 22925                        .HasColumnType("INTEGER");
 22926
 22927                    b.Property<int?>("RpuPresentFlag")
 22928                        .HasColumnType("INTEGER");
 22929
 22930                    b.Property<int?>("SampleRate")
 22931                        .HasColumnType("INTEGER");
 22932
 22933                    b.Property<int>("StreamType")
 22934                        .HasColumnType("INTEGER");
 22935
 22936                    b.Property<string>("TimeBase")
 22937                        .HasColumnType("TEXT");
 22938
 22939                    b.Property<string>("Title")
 22940                        .HasColumnType("TEXT");
 22941
 22942                    b.Property<int?>("Width")
 22943                        .HasColumnType("INTEGER");
 22944
 22945                    b.HasKey("ItemId", "StreamIndex");
 22946
 22947                    b.HasIndex("StreamIndex");
 22948
 22949                    b.HasIndex("StreamType");
 22950
 22951                    b.HasIndex("StreamIndex", "StreamType");
 22952
 22953                    b.HasIndex("StreamIndex", "StreamType", "Language");
 22954
 22955                    b.ToTable("MediaStreamInfos");
 22956
 22957                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22958                });
 959
 22960            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 22961                {
 22962                    b.Property<Guid>("Id")
 22963                        .ValueGeneratedOnAdd()
 22964                        .HasColumnType("TEXT");
 22965
 22966                    b.Property<string>("Name")
 22967                        .IsRequired()
 22968                        .HasColumnType("TEXT");
 22969
 22970                    b.Property<string>("PersonType")
 22971                        .HasColumnType("TEXT");
 22972
 22973                    b.HasKey("Id");
 22974
 22975                    b.HasIndex("Name");
 22976
 22977                    b.ToTable("Peoples");
 22978
 22979                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 22980                });
 981
 22982            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 22983                {
 22984                    b.Property<Guid>("ItemId")
 22985                        .HasColumnType("TEXT");
 22986
 22987                    b.Property<Guid>("PeopleId")
 22988                        .HasColumnType("TEXT");
 22989
 22990                    b.Property<int?>("ListOrder")
 22991                        .HasColumnType("INTEGER");
 22992
 22993                    b.Property<string>("Role")
 22994                        .HasColumnType("TEXT");
 22995
 22996                    b.Property<int?>("SortOrder")
 22997                        .HasColumnType("INTEGER");
 22998
 22999                    b.HasKey("ItemId", "PeopleId");
 221000
 221001                    b.HasIndex("PeopleId");
 221002
 221003                    b.HasIndex("ItemId", "ListOrder");
 221004
 221005                    b.HasIndex("ItemId", "SortOrder");
 221006
 221007                    b.ToTable("PeopleBaseItemMap");
 221008
 221009                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221010                });
 1011
 221012            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221013                {
 221014                    b.Property<int>("Id")
 221015                        .ValueGeneratedOnAdd()
 221016                        .HasColumnType("INTEGER");
 221017
 221018                    b.Property<int>("Kind")
 221019                        .HasColumnType("INTEGER");
 221020
 221021                    b.Property<Guid?>("Permission_Permissions_Guid")
 221022                        .HasColumnType("TEXT");
 221023
 221024                    b.Property<uint>("RowVersion")
 221025                        .IsConcurrencyToken()
 221026                        .HasColumnType("INTEGER");
 221027
 221028                    b.Property<Guid?>("UserId")
 221029                        .HasColumnType("TEXT");
 221030
 221031                    b.Property<bool>("Value")
 221032                        .HasColumnType("INTEGER");
 221033
 221034                    b.HasKey("Id");
 221035
 221036                    b.HasIndex("UserId", "Kind")
 221037                        .IsUnique()
 221038                        .HasFilter("[UserId] IS NOT NULL");
 221039
 221040                    b.ToTable("Permissions");
 221041
 221042                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221043                });
 1044
 221045            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221046                {
 221047                    b.Property<int>("Id")
 221048                        .ValueGeneratedOnAdd()
 221049                        .HasColumnType("INTEGER");
 221050
 221051                    b.Property<int>("Kind")
 221052                        .HasColumnType("INTEGER");
 221053
 221054                    b.Property<Guid?>("Preference_Preferences_Guid")
 221055                        .HasColumnType("TEXT");
 221056
 221057                    b.Property<uint>("RowVersion")
 221058                        .IsConcurrencyToken()
 221059                        .HasColumnType("INTEGER");
 221060
 221061                    b.Property<Guid?>("UserId")
 221062                        .HasColumnType("TEXT");
 221063
 221064                    b.Property<string>("Value")
 221065                        .IsRequired()
 221066                        .HasMaxLength(65535)
 221067                        .HasColumnType("TEXT");
 221068
 221069                    b.HasKey("Id");
 221070
 221071                    b.HasIndex("UserId", "Kind")
 221072                        .IsUnique()
 221073                        .HasFilter("[UserId] IS NOT NULL");
 221074
 221075                    b.ToTable("Preferences");
 221076
 221077                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221078                });
 1079
 221080            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 221081                {
 221082                    b.Property<int>("Id")
 221083                        .ValueGeneratedOnAdd()
 221084                        .HasColumnType("INTEGER");
 221085
 221086                    b.Property<string>("AccessToken")
 221087                        .IsRequired()
 221088                        .HasColumnType("TEXT");
 221089
 221090                    b.Property<DateTime>("DateCreated")
 221091                        .HasColumnType("TEXT");
 221092
 221093                    b.Property<DateTime>("DateLastActivity")
 221094                        .HasColumnType("TEXT");
 221095
 221096                    b.Property<string>("Name")
 221097                        .IsRequired()
 221098                        .HasMaxLength(64)
 221099                        .HasColumnType("TEXT");
 221100
 221101                    b.HasKey("Id");
 221102
 221103                    b.HasIndex("AccessToken")
 221104                        .IsUnique();
 221105
 221106                    b.ToTable("ApiKeys");
 221107
 221108                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221109                });
 1110
 221111            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221112                {
 221113                    b.Property<int>("Id")
 221114                        .ValueGeneratedOnAdd()
 221115                        .HasColumnType("INTEGER");
 221116
 221117                    b.Property<string>("AccessToken")
 221118                        .IsRequired()
 221119                        .HasColumnType("TEXT");
 221120
 221121                    b.Property<string>("AppName")
 221122                        .IsRequired()
 221123                        .HasMaxLength(64)
 221124                        .HasColumnType("TEXT");
 221125
 221126                    b.Property<string>("AppVersion")
 221127                        .IsRequired()
 221128                        .HasMaxLength(32)
 221129                        .HasColumnType("TEXT");
 221130
 221131                    b.Property<DateTime>("DateCreated")
 221132                        .HasColumnType("TEXT");
 221133
 221134                    b.Property<DateTime>("DateLastActivity")
 221135                        .HasColumnType("TEXT");
 221136
 221137                    b.Property<DateTime>("DateModified")
 221138                        .HasColumnType("TEXT");
 221139
 221140                    b.Property<string>("DeviceId")
 221141                        .IsRequired()
 221142                        .HasMaxLength(256)
 221143                        .HasColumnType("TEXT");
 221144
 221145                    b.Property<string>("DeviceName")
 221146                        .IsRequired()
 221147                        .HasMaxLength(64)
 221148                        .HasColumnType("TEXT");
 221149
 221150                    b.Property<bool>("IsActive")
 221151                        .HasColumnType("INTEGER");
 221152
 221153                    b.Property<Guid>("UserId")
 221154                        .HasColumnType("TEXT");
 221155
 221156                    b.HasKey("Id");
 221157
 221158                    b.HasIndex("DeviceId");
 221159
 221160                    b.HasIndex("AccessToken", "DateLastActivity");
 221161
 221162                    b.HasIndex("DeviceId", "DateLastActivity");
 221163
 221164                    b.HasIndex("UserId", "DeviceId");
 221165
 221166                    b.ToTable("Devices");
 221167
 221168                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221169                });
 1170
 221171            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 221172                {
 221173                    b.Property<int>("Id")
 221174                        .ValueGeneratedOnAdd()
 221175                        .HasColumnType("INTEGER");
 221176
 221177                    b.Property<string>("CustomName")
 221178                        .HasColumnType("TEXT");
 221179
 221180                    b.Property<string>("DeviceId")
 221181                        .IsRequired()
 221182                        .HasColumnType("TEXT");
 221183
 221184                    b.HasKey("Id");
 221185
 221186                    b.HasIndex("DeviceId")
 221187                        .IsUnique();
 221188
 221189                    b.ToTable("DeviceOptions");
 221190
 221191                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221192                });
 1193
 221194            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 221195                {
 221196                    b.Property<Guid>("ItemId")
 221197                        .HasColumnType("TEXT");
 221198
 221199                    b.Property<int>("Width")
 221200                        .HasColumnType("INTEGER");
 221201
 221202                    b.Property<int>("Bandwidth")
 221203                        .HasColumnType("INTEGER");
 221204
 221205                    b.Property<int>("Height")
 221206                        .HasColumnType("INTEGER");
 221207
 221208                    b.Property<int>("Interval")
 221209                        .HasColumnType("INTEGER");
 221210
 221211                    b.Property<int>("ThumbnailCount")
 221212                        .HasColumnType("INTEGER");
 221213
 221214                    b.Property<int>("TileHeight")
 221215                        .HasColumnType("INTEGER");
 221216
 221217                    b.Property<int>("TileWidth")
 221218                        .HasColumnType("INTEGER");
 221219
 221220                    b.HasKey("ItemId", "Width");
 221221
 221222                    b.ToTable("TrickplayInfos");
 221223
 221224                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221225                });
 1226
 221227            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221228                {
 221229                    b.Property<Guid>("Id")
 221230                        .ValueGeneratedOnAdd()
 221231                        .HasColumnType("TEXT");
 221232
 221233                    b.Property<string>("AudioLanguagePreference")
 221234                        .HasMaxLength(255)
 221235                        .HasColumnType("TEXT");
 221236
 221237                    b.Property<string>("AuthenticationProviderId")
 221238                        .IsRequired()
 221239                        .HasMaxLength(255)
 221240                        .HasColumnType("TEXT");
 221241
 221242                    b.Property<string>("CastReceiverId")
 221243                        .HasMaxLength(32)
 221244                        .HasColumnType("TEXT");
 221245
 221246                    b.Property<bool>("DisplayCollectionsView")
 221247                        .HasColumnType("INTEGER");
 221248
 221249                    b.Property<bool>("DisplayMissingEpisodes")
 221250                        .HasColumnType("INTEGER");
 221251
 221252                    b.Property<bool>("EnableAutoLogin")
 221253                        .HasColumnType("INTEGER");
 221254
 221255                    b.Property<bool>("EnableLocalPassword")
 221256                        .HasColumnType("INTEGER");
 221257
 221258                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 221259                        .HasColumnType("INTEGER");
 221260
 221261                    b.Property<bool>("EnableUserPreferenceAccess")
 221262                        .HasColumnType("INTEGER");
 221263
 221264                    b.Property<bool>("HidePlayedInLatest")
 221265                        .HasColumnType("INTEGER");
 221266
 221267                    b.Property<long>("InternalId")
 221268                        .HasColumnType("INTEGER");
 221269
 221270                    b.Property<int>("InvalidLoginAttemptCount")
 221271                        .HasColumnType("INTEGER");
 221272
 221273                    b.Property<DateTime?>("LastActivityDate")
 221274                        .HasColumnType("TEXT");
 221275
 221276                    b.Property<DateTime?>("LastLoginDate")
 221277                        .HasColumnType("TEXT");
 221278
 221279                    b.Property<int?>("LoginAttemptsBeforeLockout")
 221280                        .HasColumnType("INTEGER");
 221281
 221282                    b.Property<int>("MaxActiveSessions")
 221283                        .HasColumnType("INTEGER");
 221284
 221285                    b.Property<int?>("MaxParentalRatingScore")
 221286                        .HasColumnType("INTEGER");
 221287
 221288                    b.Property<int?>("MaxParentalRatingSubScore")
 221289                        .HasColumnType("INTEGER");
 221290
 221291                    b.Property<bool>("MustUpdatePassword")
 221292                        .HasColumnType("INTEGER");
 221293
 221294                    b.Property<string>("Password")
 221295                        .HasMaxLength(65535)
 221296                        .HasColumnType("TEXT");
 221297
 221298                    b.Property<string>("PasswordResetProviderId")
 221299                        .IsRequired()
 221300                        .HasMaxLength(255)
 221301                        .HasColumnType("TEXT");
 221302
 221303                    b.Property<bool>("PlayDefaultAudioTrack")
 221304                        .HasColumnType("INTEGER");
 221305
 221306                    b.Property<bool>("RememberAudioSelections")
 221307                        .HasColumnType("INTEGER");
 221308
 221309                    b.Property<bool>("RememberSubtitleSelections")
 221310                        .HasColumnType("INTEGER");
 221311
 221312                    b.Property<int?>("RemoteClientBitrateLimit")
 221313                        .HasColumnType("INTEGER");
 221314
 221315                    b.Property<uint>("RowVersion")
 221316                        .IsConcurrencyToken()
 221317                        .HasColumnType("INTEGER");
 221318
 221319                    b.Property<string>("SubtitleLanguagePreference")
 221320                        .HasMaxLength(255)
 221321                        .HasColumnType("TEXT");
 221322
 221323                    b.Property<int>("SubtitleMode")
 221324                        .HasColumnType("INTEGER");
 221325
 221326                    b.Property<int>("SyncPlayAccess")
 221327                        .HasColumnType("INTEGER");
 221328
 221329                    b.Property<string>("Username")
 221330                        .IsRequired()
 221331                        .HasMaxLength(255)
 221332                        .HasColumnType("TEXT");
 221333
 221334                    b.HasKey("Id");
 221335
 221336                    b.HasIndex("Username")
 221337                        .IsUnique();
 221338
 221339                    b.ToTable("Users");
 221340
 221341                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221342                });
 1343
 221344            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221345                {
 221346                    b.Property<Guid>("ItemId")
 221347                        .HasColumnType("TEXT");
 221348
 221349                    b.Property<Guid>("UserId")
 221350                        .HasColumnType("TEXT");
 221351
 221352                    b.Property<string>("CustomDataKey")
 221353                        .HasColumnType("TEXT");
 221354
 221355                    b.Property<int?>("AudioStreamIndex")
 221356                        .HasColumnType("INTEGER");
 221357
 221358                    b.Property<bool>("IsFavorite")
 221359                        .HasColumnType("INTEGER");
 221360
 221361                    b.Property<DateTime?>("LastPlayedDate")
 221362                        .HasColumnType("TEXT");
 221363
 221364                    b.Property<bool?>("Likes")
 221365                        .HasColumnType("INTEGER");
 221366
 221367                    b.Property<int>("PlayCount")
 221368                        .HasColumnType("INTEGER");
 221369
 221370                    b.Property<long>("PlaybackPositionTicks")
 221371                        .HasColumnType("INTEGER");
 221372
 221373                    b.Property<bool>("Played")
 221374                        .HasColumnType("INTEGER");
 221375
 221376                    b.Property<double?>("Rating")
 221377                        .HasColumnType("REAL");
 221378
 221379                    b.Property<DateTimeOffset?>("RetentionDate")
 221380                        .HasColumnType("TEXT");
 221381
 221382                    b.Property<int?>("SubtitleStreamIndex")
 221383                        .HasColumnType("INTEGER");
 221384
 221385                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 221386
 221387                    b.HasIndex("UserId");
 221388
 221389                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 221390
 221391                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 221392
 221393                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 221394
 221395                    b.HasIndex("ItemId", "UserId", "Played");
 221396
 221397                    b.ToTable("UserData");
 221398
 221399                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 221400                });
 1401
 221402            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 221403                {
 221404                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221405                        .WithMany("AccessSchedules")
 221406                        .HasForeignKey("UserId")
 221407                        .OnDelete(DeleteBehavior.Cascade)
 221408                        .IsRequired();
 221409                });
 1410
 221411            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 221412                {
 221413                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221414                        .WithMany("Parents")
 221415                        .HasForeignKey("ItemId")
 221416                        .OnDelete(DeleteBehavior.Cascade)
 221417                        .IsRequired();
 221418
 221419                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 221420                        .WithMany("Children")
 221421                        .HasForeignKey("ParentItemId")
 221422                        .OnDelete(DeleteBehavior.Cascade)
 221423                        .IsRequired();
 221424
 221425                    b.Navigation("Item");
 221426
 221427                    b.Navigation("ParentItem");
 221428                });
 1429
 221430            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 221431                {
 221432                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221433                        .WithMany()
 221434                        .HasForeignKey("ItemId")
 221435                        .OnDelete(DeleteBehavior.Cascade)
 221436                        .IsRequired();
 221437
 221438                    b.Navigation("Item");
 221439                });
 1440
 221441            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 221442                {
 221443                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221444                        .WithMany("Images")
 221445                        .HasForeignKey("ItemId")
 221446                        .OnDelete(DeleteBehavior.Cascade)
 221447                        .IsRequired();
 221448
 221449                    b.Navigation("Item");
 221450                });
 1451
 221452            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 221453                {
 221454                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221455                        .WithMany("LockedFields")
 221456                        .HasForeignKey("ItemId")
 221457                        .OnDelete(DeleteBehavior.Cascade)
 221458                        .IsRequired();
 221459
 221460                    b.Navigation("Item");
 221461                });
 1462
 221463            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 221464                {
 221465                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221466                        .WithMany("Provider")
 221467                        .HasForeignKey("ItemId")
 221468                        .OnDelete(DeleteBehavior.Cascade)
 221469                        .IsRequired();
 221470
 221471                    b.Navigation("Item");
 221472                });
 1473
 221474            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 221475                {
 221476                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221477                        .WithMany("TrailerTypes")
 221478                        .HasForeignKey("ItemId")
 221479                        .OnDelete(DeleteBehavior.Cascade)
 221480                        .IsRequired();
 221481
 221482                    b.Navigation("Item");
 221483                });
 1484
 221485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 221486                {
 221487                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221488                        .WithMany("Chapters")
 221489                        .HasForeignKey("ItemId")
 221490                        .OnDelete(DeleteBehavior.Cascade)
 221491                        .IsRequired();
 221492
 221493                    b.Navigation("Item");
 221494                });
 1495
 221496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221497                {
 221498                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221499                        .WithMany("DisplayPreferences")
 221500                        .HasForeignKey("UserId")
 221501                        .OnDelete(DeleteBehavior.Cascade)
 221502                        .IsRequired();
 221503                });
 1504
 221505            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 221506                {
 221507                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 221508                        .WithMany("HomeSections")
 221509                        .HasForeignKey("DisplayPreferencesId")
 221510                        .OnDelete(DeleteBehavior.Cascade)
 221511                        .IsRequired();
 221512                });
 1513
 221514            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 221515                {
 221516                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221517                        .WithOne("ProfileImage")
 221518                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 221519                        .OnDelete(DeleteBehavior.Cascade);
 221520                });
 1521
 221522            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 221523                {
 221524                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221525                        .WithMany("ItemDisplayPreferences")
 221526                        .HasForeignKey("UserId")
 221527                        .OnDelete(DeleteBehavior.Cascade)
 221528                        .IsRequired();
 221529                });
 1530
 221531            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 221532                {
 221533                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221534                        .WithMany("ItemValues")
 221535                        .HasForeignKey("ItemId")
 221536                        .OnDelete(DeleteBehavior.Cascade)
 221537                        .IsRequired();
 221538
 221539                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 221540                        .WithMany("BaseItemsMap")
 221541                        .HasForeignKey("ItemValueId")
 221542                        .OnDelete(DeleteBehavior.Cascade)
 221543                        .IsRequired();
 221544
 221545                    b.Navigation("Item");
 221546
 221547                    b.Navigation("ItemValue");
 221548                });
 1549
 221550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 221551                {
 221552                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221553                        .WithMany()
 221554                        .HasForeignKey("ItemId")
 221555                        .OnDelete(DeleteBehavior.Cascade)
 221556                        .IsRequired();
 221557
 221558                    b.Navigation("Item");
 221559                });
 1560
 221561            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 221562                {
 221563                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221564                        .WithMany("MediaStreams")
 221565                        .HasForeignKey("ItemId")
 221566                        .OnDelete(DeleteBehavior.Cascade)
 221567                        .IsRequired();
 221568
 221569                    b.Navigation("Item");
 221570                });
 1571
 221572            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 221573                {
 221574                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221575                        .WithMany("Peoples")
 221576                        .HasForeignKey("ItemId")
 221577                        .OnDelete(DeleteBehavior.Cascade)
 221578                        .IsRequired();
 221579
 221580                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 221581                        .WithMany("BaseItems")
 221582                        .HasForeignKey("PeopleId")
 221583                        .OnDelete(DeleteBehavior.Cascade)
 221584                        .IsRequired();
 221585
 221586                    b.Navigation("Item");
 221587
 221588                    b.Navigation("People");
 221589                });
 1590
 221591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 221592                {
 221593                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221594                        .WithMany("Permissions")
 221595                        .HasForeignKey("UserId")
 221596                        .OnDelete(DeleteBehavior.Cascade);
 221597                });
 1598
 221599            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 221600                {
 221601                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 221602                        .WithMany("Preferences")
 221603                        .HasForeignKey("UserId")
 221604                        .OnDelete(DeleteBehavior.Cascade);
 221605                });
 1606
 221607            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 221608                {
 221609                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221610                        .WithMany()
 221611                        .HasForeignKey("UserId")
 221612                        .OnDelete(DeleteBehavior.Cascade)
 221613                        .IsRequired();
 221614
 221615                    b.Navigation("User");
 221616                });
 1617
 221618            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 221619                {
 221620                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 221621                        .WithMany("UserData")
 221622                        .HasForeignKey("ItemId")
 221623                        .OnDelete(DeleteBehavior.SetNull);
 221624
 221625                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 221626                        .WithMany()
 221627                        .HasForeignKey("UserId")
 221628                        .OnDelete(DeleteBehavior.Cascade)
 221629                        .IsRequired();
 221630
 221631                    b.Navigation("Item");
 221632
 221633                    b.Navigation("User");
 221634                });
 1635
 221636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 221637                {
 221638                    b.Navigation("Chapters");
 221639
 221640                    b.Navigation("Children");
 221641
 221642                    b.Navigation("Images");
 221643
 221644                    b.Navigation("ItemValues");
 221645
 221646                    b.Navigation("LockedFields");
 221647
 221648                    b.Navigation("MediaStreams");
 221649
 221650                    b.Navigation("Parents");
 221651
 221652                    b.Navigation("Peoples");
 221653
 221654                    b.Navigation("Provider");
 221655
 221656                    b.Navigation("TrailerTypes");
 221657
 221658                    b.Navigation("UserData");
 221659                });
 1660
 221661            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 221662                {
 221663                    b.Navigation("HomeSections");
 221664                });
 1665
 221666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 221667                {
 221668                    b.Navigation("BaseItemsMap");
 221669                });
 1670
 221671            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 221672                {
 221673                    b.Navigation("BaseItems");
 221674                });
 1675
 221676            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 221677                {
 221678                    b.Navigation("AccessSchedules");
 221679
 221680                    b.Navigation("DisplayPreferences");
 221681
 221682                    b.Navigation("ItemDisplayPreferences");
 221683
 221684                    b.Navigation("Permissions");
 221685
 221686                    b.Navigation("Preferences");
 221687
 221688                    b.Navigation("ProfileImage");
 221689                });
 1690#pragma warning restore 612, 618
 221691        }
 1692    }
 1693}