< Summary - Jellyfin

Line coverage
99%
Covered lines: 1622
Uncovered lines: 3
Coverable lines: 1625
Total lines: 1722
Line coverage: 99.8%
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.8% (1622/1625) Total lines: 1722

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/20250327101120_AddKeyframeData.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 AddKeyframeData : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2214            migrationBuilder.CreateTable(
 2215                name: "KeyframeData",
 2216                columns: table => new
 2217                {
 2218                    ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
 2219                    TotalDuration = table.Column<long>(type: "INTEGER", nullable: false),
 2220                    KeyframeTicks = table.Column<string>(type: "TEXT", nullable: true)
 2221                },
 2222                constraints: table =>
 2223                {
 2224                    table.PrimaryKey("PK_KeyframeData", x => x.ItemId);
 2225                    table.ForeignKey(
 2226                        name: "FK_KeyframeData_BaseItems_ItemId",
 2227                        column: x => x.ItemId,
 2228                        principalTable: "BaseItems",
 2229                        principalColumn: "Id",
 2230                        onDelete: ReferentialAction.Cascade);
 2231                });
 2232        }
 33
 34        /// <inheritdoc />
 35        protected override void Down(MigrationBuilder migrationBuilder)
 36        {
 037            migrationBuilder.DropTable(
 038                name: "KeyframeData");
 039        }
 40    }
 41}

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