< Summary - Jellyfin

Line coverage
99%
Covered lines: 1628
Uncovered lines: 3
Coverable lines: 1631
Total lines: 1728
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 5/6/2026 - 12:15:23 AM Line coverage: 99.8% (1622/1625) Total lines: 17228/11/2026 - 12:17:00 AM Line coverage: 99.8% (1628/1631) Total lines: 1728

Coverage delta

Coverage delta 1 -1

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