< Summary - Jellyfin

Line coverage
99%
Covered lines: 1736
Uncovered lines: 10
Coverable lines: 1746
Total lines: 1849
Line coverage: 99.4%
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/4/2026 - 12:15:16 AM Line coverage: 99.4% (1733/1743) Total lines: 18465/22/2026 - 12:15:17 AM Line coverage: 99.4% (1736/1746) Total lines: 1849

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/20260130232147_AddBaseItemNameIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Database.Providers.Sqlite.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddBaseItemNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.CreateIndex(
 2114                name: "IX_UserData_UserId_IsFavorite_ItemId",
 2115                table: "UserData",
 2116                columns: new[] { "UserId", "IsFavorite", "ItemId" });
 17
 2118            migrationBuilder.CreateIndex(
 2119                name: "IX_UserData_UserId_Played_ItemId",
 2120                table: "UserData",
 2121                columns: new[] { "UserId", "Played", "ItemId" });
 22
 2123            migrationBuilder.CreateIndex(
 2124                name: "IX_BaseItems_Name",
 2125                table: "BaseItems",
 2126                column: "Name");
 2127        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_UserData_UserId_IsFavorite_ItemId",
 034                table: "UserData");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_UserData_UserId_Played_ItemId",
 038                table: "UserData");
 39
 040            migrationBuilder.DropIndex(
 041                name: "IX_BaseItems_Name",
 042                table: "BaseItems");
 043        }
 44    }
 45}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.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.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260130232147_AddBaseItemNameIndex")]
 15    partial class AddBaseItemNameIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2121            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2123            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2124                {
 2125                    b.Property<int>("Id")
 2126                        .ValueGeneratedOnAdd()
 2127                        .HasColumnType("INTEGER");
 2128
 2129                    b.Property<int>("DayOfWeek")
 2130                        .HasColumnType("INTEGER");
 2131
 2132                    b.Property<double>("EndHour")
 2133                        .HasColumnType("REAL");
 2134
 2135                    b.Property<double>("StartHour")
 2136                        .HasColumnType("REAL");
 2137
 2138                    b.Property<Guid>("UserId")
 2139                        .HasColumnType("TEXT");
 2140
 2141                    b.HasKey("Id");
 2142
 2143                    b.HasIndex("UserId");
 2144
 2145                    b.ToTable("AccessSchedules");
 2146
 2147                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2148                });
 49
 2150            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2151                {
 2152                    b.Property<int>("Id")
 2153                        .ValueGeneratedOnAdd()
 2154                        .HasColumnType("INTEGER");
 2155
 2156                    b.Property<DateTime>("DateCreated")
 2157                        .HasColumnType("TEXT");
 2158
 2159                    b.Property<string>("ItemId")
 2160                        .HasMaxLength(256)
 2161                        .HasColumnType("TEXT");
 2162
 2163                    b.Property<int>("LogSeverity")
 2164                        .HasColumnType("INTEGER");
 2165
 2166                    b.Property<string>("Name")
 2167                        .IsRequired()
 2168                        .HasMaxLength(512)
 2169                        .HasColumnType("TEXT");
 2170
 2171                    b.Property<string>("Overview")
 2172                        .HasMaxLength(512)
 2173                        .HasColumnType("TEXT");
 2174
 2175                    b.Property<uint>("RowVersion")
 2176                        .IsConcurrencyToken()
 2177                        .HasColumnType("INTEGER");
 2178
 2179                    b.Property<string>("ShortOverview")
 2180                        .HasMaxLength(512)
 2181                        .HasColumnType("TEXT");
 2182
 2183                    b.Property<string>("Type")
 2184                        .IsRequired()
 2185                        .HasMaxLength(256)
 2186                        .HasColumnType("TEXT");
 2187
 2188                    b.Property<Guid>("UserId")
 2189                        .HasColumnType("TEXT");
 2190
 2191                    b.HasKey("Id");
 2192
 2193                    b.HasIndex("DateCreated");
 2194
 2195                    b.ToTable("ActivityLogs");
 2196
 2197                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2198                });
 99
 21100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 21101                {
 21102                    b.Property<Guid>("ItemId")
 21103                        .HasColumnType("TEXT");
 21104
 21105                    b.Property<Guid>("ParentItemId")
 21106                        .HasColumnType("TEXT");
 21107
 21108                    b.HasKey("ItemId", "ParentItemId");
 21109
 21110                    b.HasIndex("ParentItemId");
 21111
 21112                    b.ToTable("AncestorIds");
 21113
 21114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21115                });
 116
 21117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 21118                {
 21119                    b.Property<Guid>("ItemId")
 21120                        .HasColumnType("TEXT");
 21121
 21122                    b.Property<int>("Index")
 21123                        .HasColumnType("INTEGER");
 21124
 21125                    b.Property<string>("Codec")
 21126                        .HasColumnType("TEXT");
 21127
 21128                    b.Property<string>("CodecTag")
 21129                        .HasColumnType("TEXT");
 21130
 21131                    b.Property<string>("Comment")
 21132                        .HasColumnType("TEXT");
 21133
 21134                    b.Property<string>("Filename")
 21135                        .HasColumnType("TEXT");
 21136
 21137                    b.Property<string>("MimeType")
 21138                        .HasColumnType("TEXT");
 21139
 21140                    b.HasKey("ItemId", "Index");
 21141
 21142                    b.ToTable("AttachmentStreamInfos");
 21143
 21144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21145                });
 146
 21147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 21148                {
 21149                    b.Property<Guid>("Id")
 21150                        .ValueGeneratedOnAdd()
 21151                        .HasColumnType("TEXT");
 21152
 21153                    b.Property<string>("Album")
 21154                        .HasColumnType("TEXT");
 21155
 21156                    b.Property<string>("AlbumArtists")
 21157                        .HasColumnType("TEXT");
 21158
 21159                    b.Property<string>("Artists")
 21160                        .HasColumnType("TEXT");
 21161
 21162                    b.Property<int?>("Audio")
 21163                        .HasColumnType("INTEGER");
 21164
 21165                    b.Property<Guid?>("ChannelId")
 21166                        .HasColumnType("TEXT");
 21167
 21168                    b.Property<string>("CleanName")
 21169                        .HasColumnType("TEXT");
 21170
 21171                    b.Property<float?>("CommunityRating")
 21172                        .HasColumnType("REAL");
 21173
 21174                    b.Property<float?>("CriticRating")
 21175                        .HasColumnType("REAL");
 21176
 21177                    b.Property<string>("CustomRating")
 21178                        .HasColumnType("TEXT");
 21179
 21180                    b.Property<string>("Data")
 21181                        .HasColumnType("TEXT");
 21182
 21183                    b.Property<DateTime?>("DateCreated")
 21184                        .HasColumnType("TEXT");
 21185
 21186                    b.Property<DateTime?>("DateLastMediaAdded")
 21187                        .HasColumnType("TEXT");
 21188
 21189                    b.Property<DateTime?>("DateLastRefreshed")
 21190                        .HasColumnType("TEXT");
 21191
 21192                    b.Property<DateTime?>("DateLastSaved")
 21193                        .HasColumnType("TEXT");
 21194
 21195                    b.Property<DateTime?>("DateModified")
 21196                        .HasColumnType("TEXT");
 21197
 21198                    b.Property<DateTime?>("EndDate")
 21199                        .HasColumnType("TEXT");
 21200
 21201                    b.Property<string>("EpisodeTitle")
 21202                        .HasColumnType("TEXT");
 21203
 21204                    b.Property<string>("ExternalId")
 21205                        .HasColumnType("TEXT");
 21206
 21207                    b.Property<string>("ExternalSeriesId")
 21208                        .HasColumnType("TEXT");
 21209
 21210                    b.Property<string>("ExternalServiceId")
 21211                        .HasColumnType("TEXT");
 21212
 21213                    b.Property<int?>("ExtraType")
 21214                        .HasColumnType("INTEGER");
 21215
 21216                    b.Property<string>("ForcedSortName")
 21217                        .HasColumnType("TEXT");
 21218
 21219                    b.Property<string>("Genres")
 21220                        .HasColumnType("TEXT");
 21221
 21222                    b.Property<int?>("Height")
 21223                        .HasColumnType("INTEGER");
 21224
 21225                    b.Property<int?>("IndexNumber")
 21226                        .HasColumnType("INTEGER");
 21227
 21228                    b.Property<int?>("InheritedParentalRatingSubValue")
 21229                        .HasColumnType("INTEGER");
 21230
 21231                    b.Property<int?>("InheritedParentalRatingValue")
 21232                        .HasColumnType("INTEGER");
 21233
 21234                    b.Property<bool>("IsFolder")
 21235                        .HasColumnType("INTEGER");
 21236
 21237                    b.Property<bool>("IsInMixedFolder")
 21238                        .HasColumnType("INTEGER");
 21239
 21240                    b.Property<bool>("IsLocked")
 21241                        .HasColumnType("INTEGER");
 21242
 21243                    b.Property<bool>("IsMovie")
 21244                        .HasColumnType("INTEGER");
 21245
 21246                    b.Property<bool>("IsRepeat")
 21247                        .HasColumnType("INTEGER");
 21248
 21249                    b.Property<bool>("IsSeries")
 21250                        .HasColumnType("INTEGER");
 21251
 21252                    b.Property<bool>("IsVirtualItem")
 21253                        .HasColumnType("INTEGER");
 21254
 21255                    b.Property<float?>("LUFS")
 21256                        .HasColumnType("REAL");
 21257
 21258                    b.Property<string>("MediaType")
 21259                        .HasColumnType("TEXT");
 21260
 21261                    b.Property<string>("Name")
 21262                        .HasColumnType("TEXT");
 21263
 21264                    b.Property<float?>("NormalizationGain")
 21265                        .HasColumnType("REAL");
 21266
 21267                    b.Property<string>("OfficialRating")
 21268                        .HasColumnType("TEXT");
 21269
 21270                    b.Property<string>("OriginalLanguage")
 21271                        .HasColumnType("TEXT");
 21272
 21273                    b.Property<string>("OriginalTitle")
 21274                        .HasColumnType("TEXT");
 21275
 21276                    b.Property<string>("Overview")
 21277                        .HasColumnType("TEXT");
 21278
 21279                    b.Property<Guid?>("OwnerId")
 21280                        .HasColumnType("TEXT");
 21281
 21282                    b.Property<Guid?>("ParentId")
 21283                        .HasColumnType("TEXT");
 21284
 21285                    b.Property<int?>("ParentIndexNumber")
 21286                        .HasColumnType("INTEGER");
 21287
 21288                    b.Property<string>("Path")
 21289                        .HasColumnType("TEXT");
 21290
 21291                    b.Property<string>("PreferredMetadataCountryCode")
 21292                        .HasColumnType("TEXT");
 21293
 21294                    b.Property<string>("PreferredMetadataLanguage")
 21295                        .HasColumnType("TEXT");
 21296
 21297                    b.Property<DateTime?>("PremiereDate")
 21298                        .HasColumnType("TEXT");
 21299
 21300                    b.Property<string>("PresentationUniqueKey")
 21301                        .HasColumnType("TEXT");
 21302
 21303                    b.Property<string>("PrimaryVersionId")
 21304                        .HasColumnType("TEXT");
 21305
 21306                    b.Property<string>("ProductionLocations")
 21307                        .HasColumnType("TEXT");
 21308
 21309                    b.Property<int?>("ProductionYear")
 21310                        .HasColumnType("INTEGER");
 21311
 21312                    b.Property<long?>("RunTimeTicks")
 21313                        .HasColumnType("INTEGER");
 21314
 21315                    b.Property<Guid?>("SeasonId")
 21316                        .HasColumnType("TEXT");
 21317
 21318                    b.Property<string>("SeasonName")
 21319                        .HasColumnType("TEXT");
 21320
 21321                    b.Property<Guid?>("SeriesId")
 21322                        .HasColumnType("TEXT");
 21323
 21324                    b.Property<string>("SeriesName")
 21325                        .HasColumnType("TEXT");
 21326
 21327                    b.Property<string>("SeriesPresentationUniqueKey")
 21328                        .HasColumnType("TEXT");
 21329
 21330                    b.Property<string>("ShowId")
 21331                        .HasColumnType("TEXT");
 21332
 21333                    b.Property<long?>("Size")
 21334                        .HasColumnType("INTEGER");
 21335
 21336                    b.Property<string>("SortName")
 21337                        .HasColumnType("TEXT");
 21338
 21339                    b.Property<DateTime?>("StartDate")
 21340                        .HasColumnType("TEXT");
 21341
 21342                    b.Property<string>("Studios")
 21343                        .HasColumnType("TEXT");
 21344
 21345                    b.Property<string>("Tagline")
 21346                        .HasColumnType("TEXT");
 21347
 21348                    b.Property<string>("Tags")
 21349                        .HasColumnType("TEXT");
 21350
 21351                    b.Property<Guid?>("TopParentId")
 21352                        .HasColumnType("TEXT");
 21353
 21354                    b.Property<int?>("TotalBitrate")
 21355                        .HasColumnType("INTEGER");
 21356
 21357                    b.Property<string>("Type")
 21358                        .IsRequired()
 21359                        .HasColumnType("TEXT");
 21360
 21361                    b.Property<string>("UnratedType")
 21362                        .HasColumnType("TEXT");
 21363
 21364                    b.Property<int?>("Width")
 21365                        .HasColumnType("INTEGER");
 21366
 21367                    b.HasKey("Id");
 21368
 21369                    b.HasIndex("ExtraType");
 21370
 21371                    b.HasIndex("Name");
 21372
 21373                    b.HasIndex("OwnerId");
 21374
 21375                    b.HasIndex("ParentId");
 21376
 21377                    b.HasIndex("Path");
 21378
 21379                    b.HasIndex("PresentationUniqueKey");
 21380
 21381                    b.HasIndex("ExtraType", "OwnerId");
 21382
 21383                    b.HasIndex("TopParentId", "Id");
 21384
 21385                    b.HasIndex("Type", "TopParentId", "Id");
 21386
 21387                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21388
 21389                    b.HasIndex("Type", "TopParentId", "StartDate");
 21390
 21391                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 21392
 21393                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21394
 21395                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 21396
 21397                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 21398
 21399                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 21400
 21401                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21402
 21403                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21404
 21405                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21406
 21407                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21408
 21409                    b.ToTable("BaseItems");
 21410
 21411                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21412
 21413                    b.HasData(
 21414                        new
 21415                        {
 21416                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 21417                            IsFolder = false,
 21418                            IsInMixedFolder = false,
 21419                            IsLocked = false,
 21420                            IsMovie = false,
 21421                            IsRepeat = false,
 21422                            IsSeries = false,
 21423                            IsVirtualItem = false,
 21424                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 21425                            Type = "PLACEHOLDER"
 21426                        });
 21427                });
 428
 21429            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21430                {
 21431                    b.Property<Guid>("Id")
 21432                        .ValueGeneratedOnAdd()
 21433                        .HasColumnType("TEXT");
 21434
 21435                    b.Property<byte[]>("Blurhash")
 21436                        .HasColumnType("BLOB");
 21437
 21438                    b.Property<DateTime?>("DateModified")
 21439                        .HasColumnType("TEXT");
 21440
 21441                    b.Property<int>("Height")
 21442                        .HasColumnType("INTEGER");
 21443
 21444                    b.Property<int>("ImageType")
 21445                        .HasColumnType("INTEGER");
 21446
 21447                    b.Property<Guid>("ItemId")
 21448                        .HasColumnType("TEXT");
 21449
 21450                    b.Property<string>("Path")
 21451                        .IsRequired()
 21452                        .HasColumnType("TEXT");
 21453
 21454                    b.Property<int>("Width")
 21455                        .HasColumnType("INTEGER");
 21456
 21457                    b.HasKey("Id");
 21458
 21459                    b.HasIndex("ItemId");
 21460
 21461                    b.HasIndex("ItemId", "ImageType");
 21462
 21463                    b.ToTable("BaseItemImageInfos");
 21464
 21465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21466                });
 467
 21468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21469                {
 21470                    b.Property<int>("Id")
 21471                        .HasColumnType("INTEGER");
 21472
 21473                    b.Property<Guid>("ItemId")
 21474                        .HasColumnType("TEXT");
 21475
 21476                    b.HasKey("Id", "ItemId");
 21477
 21478                    b.HasIndex("ItemId");
 21479
 21480                    b.ToTable("BaseItemMetadataFields");
 21481
 21482                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21483                });
 484
 21485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21486                {
 21487                    b.Property<Guid>("ItemId")
 21488                        .HasColumnType("TEXT");
 21489
 21490                    b.Property<string>("ProviderId")
 21491                        .HasColumnType("TEXT");
 21492
 21493                    b.Property<string>("ProviderValue")
 21494                        .IsRequired()
 21495                        .HasColumnType("TEXT");
 21496
 21497                    b.HasKey("ItemId", "ProviderId");
 21498
 21499                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21500
 21501                    b.ToTable("BaseItemProviders");
 21502
 21503                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21504                });
 505
 21506            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21507                {
 21508                    b.Property<int>("Id")
 21509                        .HasColumnType("INTEGER");
 21510
 21511                    b.Property<Guid>("ItemId")
 21512                        .HasColumnType("TEXT");
 21513
 21514                    b.HasKey("Id", "ItemId");
 21515
 21516                    b.HasIndex("ItemId");
 21517
 21518                    b.ToTable("BaseItemTrailerTypes");
 21519
 21520                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21521                });
 522
 21523            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21524                {
 21525                    b.Property<Guid>("ItemId")
 21526                        .HasColumnType("TEXT");
 21527
 21528                    b.Property<int>("ChapterIndex")
 21529                        .HasColumnType("INTEGER");
 21530
 21531                    b.Property<DateTime?>("ImageDateModified")
 21532                        .HasColumnType("TEXT");
 21533
 21534                    b.Property<string>("ImagePath")
 21535                        .HasColumnType("TEXT");
 21536
 21537                    b.Property<string>("Name")
 21538                        .HasColumnType("TEXT");
 21539
 21540                    b.Property<long>("StartPositionTicks")
 21541                        .HasColumnType("INTEGER");
 21542
 21543                    b.HasKey("ItemId", "ChapterIndex");
 21544
 21545                    b.ToTable("Chapters");
 21546
 21547                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21548                });
 549
 21550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21551                {
 21552                    b.Property<int>("Id")
 21553                        .ValueGeneratedOnAdd()
 21554                        .HasColumnType("INTEGER");
 21555
 21556                    b.Property<string>("Client")
 21557                        .IsRequired()
 21558                        .HasMaxLength(32)
 21559                        .HasColumnType("TEXT");
 21560
 21561                    b.Property<Guid>("ItemId")
 21562                        .HasColumnType("TEXT");
 21563
 21564                    b.Property<string>("Key")
 21565                        .IsRequired()
 21566                        .HasColumnType("TEXT");
 21567
 21568                    b.Property<Guid>("UserId")
 21569                        .HasColumnType("TEXT");
 21570
 21571                    b.Property<string>("Value")
 21572                        .HasColumnType("TEXT");
 21573
 21574                    b.HasKey("Id");
 21575
 21576                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21577                        .IsUnique();
 21578
 21579                    b.ToTable("CustomItemDisplayPreferences");
 21580
 21581                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21582                });
 583
 21584            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21585                {
 21586                    b.Property<int>("Id")
 21587                        .ValueGeneratedOnAdd()
 21588                        .HasColumnType("INTEGER");
 21589
 21590                    b.Property<int>("ChromecastVersion")
 21591                        .HasColumnType("INTEGER");
 21592
 21593                    b.Property<string>("Client")
 21594                        .IsRequired()
 21595                        .HasMaxLength(32)
 21596                        .HasColumnType("TEXT");
 21597
 21598                    b.Property<string>("DashboardTheme")
 21599                        .HasMaxLength(32)
 21600                        .HasColumnType("TEXT");
 21601
 21602                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21603                        .HasColumnType("INTEGER");
 21604
 21605                    b.Property<int?>("IndexBy")
 21606                        .HasColumnType("INTEGER");
 21607
 21608                    b.Property<Guid>("ItemId")
 21609                        .HasColumnType("TEXT");
 21610
 21611                    b.Property<int>("ScrollDirection")
 21612                        .HasColumnType("INTEGER");
 21613
 21614                    b.Property<bool>("ShowBackdrop")
 21615                        .HasColumnType("INTEGER");
 21616
 21617                    b.Property<bool>("ShowSidebar")
 21618                        .HasColumnType("INTEGER");
 21619
 21620                    b.Property<int>("SkipBackwardLength")
 21621                        .HasColumnType("INTEGER");
 21622
 21623                    b.Property<int>("SkipForwardLength")
 21624                        .HasColumnType("INTEGER");
 21625
 21626                    b.Property<string>("TvHome")
 21627                        .HasMaxLength(32)
 21628                        .HasColumnType("TEXT");
 21629
 21630                    b.Property<Guid>("UserId")
 21631                        .HasColumnType("TEXT");
 21632
 21633                    b.HasKey("Id");
 21634
 21635                    b.HasIndex("UserId", "ItemId", "Client")
 21636                        .IsUnique();
 21637
 21638                    b.ToTable("DisplayPreferences");
 21639
 21640                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21641                });
 642
 21643            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21644                {
 21645                    b.Property<int>("Id")
 21646                        .ValueGeneratedOnAdd()
 21647                        .HasColumnType("INTEGER");
 21648
 21649                    b.Property<int>("DisplayPreferencesId")
 21650                        .HasColumnType("INTEGER");
 21651
 21652                    b.Property<int>("Order")
 21653                        .HasColumnType("INTEGER");
 21654
 21655                    b.Property<int>("Type")
 21656                        .HasColumnType("INTEGER");
 21657
 21658                    b.HasKey("Id");
 21659
 21660                    b.HasIndex("DisplayPreferencesId");
 21661
 21662                    b.ToTable("HomeSection");
 21663
 21664                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21665                });
 666
 21667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21668                {
 21669                    b.Property<int>("Id")
 21670                        .ValueGeneratedOnAdd()
 21671                        .HasColumnType("INTEGER");
 21672
 21673                    b.Property<DateTime>("LastModified")
 21674                        .HasColumnType("TEXT");
 21675
 21676                    b.Property<string>("Path")
 21677                        .IsRequired()
 21678                        .HasMaxLength(512)
 21679                        .HasColumnType("TEXT");
 21680
 21681                    b.Property<Guid?>("UserId")
 21682                        .HasColumnType("TEXT");
 21683
 21684                    b.HasKey("Id");
 21685
 21686                    b.HasIndex("UserId")
 21687                        .IsUnique();
 21688
 21689                    b.ToTable("ImageInfos");
 21690
 21691                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21692                });
 693
 21694            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21695                {
 21696                    b.Property<int>("Id")
 21697                        .ValueGeneratedOnAdd()
 21698                        .HasColumnType("INTEGER");
 21699
 21700                    b.Property<string>("Client")
 21701                        .IsRequired()
 21702                        .HasMaxLength(32)
 21703                        .HasColumnType("TEXT");
 21704
 21705                    b.Property<int?>("IndexBy")
 21706                        .HasColumnType("INTEGER");
 21707
 21708                    b.Property<Guid>("ItemId")
 21709                        .HasColumnType("TEXT");
 21710
 21711                    b.Property<bool>("RememberIndexing")
 21712                        .HasColumnType("INTEGER");
 21713
 21714                    b.Property<bool>("RememberSorting")
 21715                        .HasColumnType("INTEGER");
 21716
 21717                    b.Property<string>("SortBy")
 21718                        .IsRequired()
 21719                        .HasMaxLength(64)
 21720                        .HasColumnType("TEXT");
 21721
 21722                    b.Property<int>("SortOrder")
 21723                        .HasColumnType("INTEGER");
 21724
 21725                    b.Property<Guid>("UserId")
 21726                        .HasColumnType("TEXT");
 21727
 21728                    b.Property<int>("ViewType")
 21729                        .HasColumnType("INTEGER");
 21730
 21731                    b.HasKey("Id");
 21732
 21733                    b.HasIndex("UserId");
 21734
 21735                    b.ToTable("ItemDisplayPreferences");
 21736
 21737                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21738                });
 739
 21740            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21741                {
 21742                    b.Property<Guid>("ItemValueId")
 21743                        .ValueGeneratedOnAdd()
 21744                        .HasColumnType("TEXT");
 21745
 21746                    b.Property<string>("CleanValue")
 21747                        .IsRequired()
 21748                        .HasColumnType("TEXT");
 21749
 21750                    b.Property<int>("Type")
 21751                        .HasColumnType("INTEGER");
 21752
 21753                    b.Property<string>("Value")
 21754                        .IsRequired()
 21755                        .HasColumnType("TEXT");
 21756
 21757                    b.HasKey("ItemValueId");
 21758
 21759                    b.HasIndex("Type", "CleanValue");
 21760
 21761                    b.HasIndex("Type", "Value")
 21762                        .IsUnique();
 21763
 21764                    b.ToTable("ItemValues");
 21765
 21766                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21767                });
 768
 21769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21770                {
 21771                    b.Property<Guid>("ItemValueId")
 21772                        .HasColumnType("TEXT");
 21773
 21774                    b.Property<Guid>("ItemId")
 21775                        .HasColumnType("TEXT");
 21776
 21777                    b.HasKey("ItemValueId", "ItemId");
 21778
 21779                    b.HasIndex("ItemId");
 21780
 21781                    b.ToTable("ItemValuesMap");
 21782
 21783                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21784                });
 785
 21786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21787                {
 21788                    b.Property<Guid>("ItemId")
 21789                        .HasColumnType("TEXT");
 21790
 21791                    b.PrimitiveCollection<string>("KeyframeTicks")
 21792                        .HasColumnType("TEXT");
 21793
 21794                    b.Property<long>("TotalDuration")
 21795                        .HasColumnType("INTEGER");
 21796
 21797                    b.HasKey("ItemId");
 21798
 21799                    b.ToTable("KeyframeData");
 21800
 21801                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21802                });
 803
 21804            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 21805                {
 21806                    b.Property<Guid>("ParentId")
 21807                        .HasColumnType("TEXT");
 21808
 21809                    b.Property<Guid>("ChildId")
 21810                        .HasColumnType("TEXT");
 21811
 21812                    b.Property<int>("ChildType")
 21813                        .HasColumnType("INTEGER");
 21814
 21815                    b.Property<int?>("SortOrder")
 21816                        .HasColumnType("INTEGER");
 21817
 21818                    b.HasKey("ParentId", "ChildId");
 21819
 21820                    b.HasIndex("ChildId");
 21821
 21822                    b.HasIndex("ParentId");
 21823
 21824                    b.HasIndex("ChildId", "ChildType");
 21825
 21826                    b.HasIndex("ParentId", "ChildType");
 21827
 21828                    b.HasIndex("ParentId", "SortOrder");
 21829
 21830                    b.ToTable("LinkedChildren", (string)null);
 21831
 21832                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21833                });
 834
 21835            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21836                {
 21837                    b.Property<Guid>("Id")
 21838                        .ValueGeneratedOnAdd()
 21839                        .HasColumnType("TEXT");
 21840
 21841                    b.Property<long>("EndTicks")
 21842                        .HasColumnType("INTEGER");
 21843
 21844                    b.Property<Guid>("ItemId")
 21845                        .HasColumnType("TEXT");
 21846
 21847                    b.Property<string>("SegmentProviderId")
 21848                        .IsRequired()
 21849                        .HasColumnType("TEXT");
 21850
 21851                    b.Property<long>("StartTicks")
 21852                        .HasColumnType("INTEGER");
 21853
 21854                    b.Property<int>("Type")
 21855                        .HasColumnType("INTEGER");
 21856
 21857                    b.HasKey("Id");
 21858
 21859                    b.ToTable("MediaSegments");
 21860
 21861                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21862                });
 863
 21864            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21865                {
 21866                    b.Property<Guid>("ItemId")
 21867                        .HasColumnType("TEXT");
 21868
 21869                    b.Property<int>("StreamIndex")
 21870                        .HasColumnType("INTEGER");
 21871
 21872                    b.Property<string>("AspectRatio")
 21873                        .HasColumnType("TEXT");
 21874
 21875                    b.Property<float?>("AverageFrameRate")
 21876                        .HasColumnType("REAL");
 21877
 21878                    b.Property<int?>("BitDepth")
 21879                        .HasColumnType("INTEGER");
 21880
 21881                    b.Property<int?>("BitRate")
 21882                        .HasColumnType("INTEGER");
 21883
 21884                    b.Property<int?>("BlPresentFlag")
 21885                        .HasColumnType("INTEGER");
 21886
 21887                    b.Property<string>("ChannelLayout")
 21888                        .HasColumnType("TEXT");
 21889
 21890                    b.Property<int?>("Channels")
 21891                        .HasColumnType("INTEGER");
 21892
 21893                    b.Property<string>("Codec")
 21894                        .HasColumnType("TEXT");
 21895
 21896                    b.Property<string>("CodecTag")
 21897                        .HasColumnType("TEXT");
 21898
 21899                    b.Property<string>("CodecTimeBase")
 21900                        .HasColumnType("TEXT");
 21901
 21902                    b.Property<string>("ColorPrimaries")
 21903                        .HasColumnType("TEXT");
 21904
 21905                    b.Property<string>("ColorSpace")
 21906                        .HasColumnType("TEXT");
 21907
 21908                    b.Property<string>("ColorTransfer")
 21909                        .HasColumnType("TEXT");
 21910
 21911                    b.Property<string>("Comment")
 21912                        .HasColumnType("TEXT");
 21913
 21914                    b.Property<int?>("DvBlSignalCompatibilityId")
 21915                        .HasColumnType("INTEGER");
 21916
 21917                    b.Property<int?>("DvLevel")
 21918                        .HasColumnType("INTEGER");
 21919
 21920                    b.Property<int?>("DvProfile")
 21921                        .HasColumnType("INTEGER");
 21922
 21923                    b.Property<int?>("DvVersionMajor")
 21924                        .HasColumnType("INTEGER");
 21925
 21926                    b.Property<int?>("DvVersionMinor")
 21927                        .HasColumnType("INTEGER");
 21928
 21929                    b.Property<int?>("ElPresentFlag")
 21930                        .HasColumnType("INTEGER");
 21931
 21932                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21933                        .HasColumnType("INTEGER");
 21934
 21935                    b.Property<int?>("Height")
 21936                        .HasColumnType("INTEGER");
 21937
 21938                    b.Property<bool?>("IsAnamorphic")
 21939                        .HasColumnType("INTEGER");
 21940
 21941                    b.Property<bool?>("IsAvc")
 21942                        .HasColumnType("INTEGER");
 21943
 21944                    b.Property<bool>("IsDefault")
 21945                        .HasColumnType("INTEGER");
 21946
 21947                    b.Property<bool>("IsExternal")
 21948                        .HasColumnType("INTEGER");
 21949
 21950                    b.Property<bool>("IsForced")
 21951                        .HasColumnType("INTEGER");
 21952
 21953                    b.Property<bool?>("IsHearingImpaired")
 21954                        .HasColumnType("INTEGER");
 21955
 21956                    b.Property<bool?>("IsInterlaced")
 21957                        .HasColumnType("INTEGER");
 21958
 21959                    b.Property<string>("KeyFrames")
 21960                        .HasColumnType("TEXT");
 21961
 21962                    b.Property<string>("Language")
 21963                        .HasColumnType("TEXT");
 21964
 21965                    b.Property<float?>("Level")
 21966                        .HasColumnType("REAL");
 21967
 21968                    b.Property<string>("NalLengthSize")
 21969                        .HasColumnType("TEXT");
 21970
 21971                    b.Property<string>("Path")
 21972                        .HasColumnType("TEXT");
 21973
 21974                    b.Property<string>("PixelFormat")
 21975                        .HasColumnType("TEXT");
 21976
 21977                    b.Property<string>("Profile")
 21978                        .HasColumnType("TEXT");
 21979
 21980                    b.Property<float?>("RealFrameRate")
 21981                        .HasColumnType("REAL");
 21982
 21983                    b.Property<int?>("RefFrames")
 21984                        .HasColumnType("INTEGER");
 21985
 21986                    b.Property<int?>("Rotation")
 21987                        .HasColumnType("INTEGER");
 21988
 21989                    b.Property<int?>("RpuPresentFlag")
 21990                        .HasColumnType("INTEGER");
 21991
 21992                    b.Property<int?>("SampleRate")
 21993                        .HasColumnType("INTEGER");
 21994
 21995                    b.Property<int>("StreamType")
 21996                        .HasColumnType("INTEGER");
 21997
 21998                    b.Property<string>("TimeBase")
 21999                        .HasColumnType("TEXT");
 211000
 211001                    b.Property<string>("Title")
 211002                        .HasColumnType("TEXT");
 211003
 211004                    b.Property<int?>("Width")
 211005                        .HasColumnType("INTEGER");
 211006
 211007                    b.HasKey("ItemId", "StreamIndex");
 211008
 211009                    b.HasIndex("StreamIndex");
 211010
 211011                    b.HasIndex("StreamType");
 211012
 211013                    b.HasIndex("StreamIndex", "StreamType");
 211014
 211015                    b.HasIndex("StreamIndex", "StreamType", "Language");
 211016
 211017                    b.ToTable("MediaStreamInfos");
 211018
 211019                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211020                });
 1021
 211022            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211023                {
 211024                    b.Property<Guid>("Id")
 211025                        .ValueGeneratedOnAdd()
 211026                        .HasColumnType("TEXT");
 211027
 211028                    b.Property<string>("Name")
 211029                        .IsRequired()
 211030                        .HasColumnType("TEXT");
 211031
 211032                    b.Property<string>("PersonType")
 211033                        .HasColumnType("TEXT");
 211034
 211035                    b.HasKey("Id");
 211036
 211037                    b.HasIndex("Name");
 211038
 211039                    b.ToTable("Peoples");
 211040
 211041                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211042                });
 1043
 211044            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211045                {
 211046                    b.Property<Guid>("ItemId")
 211047                        .HasColumnType("TEXT");
 211048
 211049                    b.Property<Guid>("PeopleId")
 211050                        .HasColumnType("TEXT");
 211051
 211052                    b.Property<string>("Role")
 211053                        .HasColumnType("TEXT");
 211054
 211055                    b.Property<int?>("ListOrder")
 211056                        .HasColumnType("INTEGER");
 211057
 211058                    b.Property<int?>("SortOrder")
 211059                        .HasColumnType("INTEGER");
 211060
 211061                    b.HasKey("ItemId", "PeopleId", "Role");
 211062
 211063                    b.HasIndex("PeopleId");
 211064
 211065                    b.HasIndex("ItemId", "ListOrder");
 211066
 211067                    b.HasIndex("ItemId", "SortOrder");
 211068
 211069                    b.ToTable("PeopleBaseItemMap");
 211070
 211071                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211072                });
 1073
 211074            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211075                {
 211076                    b.Property<int>("Id")
 211077                        .ValueGeneratedOnAdd()
 211078                        .HasColumnType("INTEGER");
 211079
 211080                    b.Property<int>("Kind")
 211081                        .HasColumnType("INTEGER");
 211082
 211083                    b.Property<Guid?>("Permission_Permissions_Guid")
 211084                        .HasColumnType("TEXT");
 211085
 211086                    b.Property<uint>("RowVersion")
 211087                        .IsConcurrencyToken()
 211088                        .HasColumnType("INTEGER");
 211089
 211090                    b.Property<Guid?>("UserId")
 211091                        .HasColumnType("TEXT");
 211092
 211093                    b.Property<bool>("Value")
 211094                        .HasColumnType("INTEGER");
 211095
 211096                    b.HasKey("Id");
 211097
 211098                    b.HasIndex("UserId", "Kind")
 211099                        .IsUnique()
 211100                        .HasFilter("[UserId] IS NOT NULL");
 211101
 211102                    b.ToTable("Permissions");
 211103
 211104                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211105                });
 1106
 211107            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211108                {
 211109                    b.Property<int>("Id")
 211110                        .ValueGeneratedOnAdd()
 211111                        .HasColumnType("INTEGER");
 211112
 211113                    b.Property<int>("Kind")
 211114                        .HasColumnType("INTEGER");
 211115
 211116                    b.Property<Guid?>("Preference_Preferences_Guid")
 211117                        .HasColumnType("TEXT");
 211118
 211119                    b.Property<uint>("RowVersion")
 211120                        .IsConcurrencyToken()
 211121                        .HasColumnType("INTEGER");
 211122
 211123                    b.Property<Guid?>("UserId")
 211124                        .HasColumnType("TEXT");
 211125
 211126                    b.Property<string>("Value")
 211127                        .IsRequired()
 211128                        .HasMaxLength(65535)
 211129                        .HasColumnType("TEXT");
 211130
 211131                    b.HasKey("Id");
 211132
 211133                    b.HasIndex("UserId", "Kind")
 211134                        .IsUnique()
 211135                        .HasFilter("[UserId] IS NOT NULL");
 211136
 211137                    b.ToTable("Preferences");
 211138
 211139                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211140                });
 1141
 211142            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211143                {
 211144                    b.Property<int>("Id")
 211145                        .ValueGeneratedOnAdd()
 211146                        .HasColumnType("INTEGER");
 211147
 211148                    b.Property<string>("AccessToken")
 211149                        .IsRequired()
 211150                        .HasColumnType("TEXT");
 211151
 211152                    b.Property<DateTime>("DateCreated")
 211153                        .HasColumnType("TEXT");
 211154
 211155                    b.Property<DateTime>("DateLastActivity")
 211156                        .HasColumnType("TEXT");
 211157
 211158                    b.Property<string>("Name")
 211159                        .IsRequired()
 211160                        .HasMaxLength(64)
 211161                        .HasColumnType("TEXT");
 211162
 211163                    b.HasKey("Id");
 211164
 211165                    b.HasIndex("AccessToken")
 211166                        .IsUnique();
 211167
 211168                    b.ToTable("ApiKeys");
 211169
 211170                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211171                });
 1172
 211173            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211174                {
 211175                    b.Property<int>("Id")
 211176                        .ValueGeneratedOnAdd()
 211177                        .HasColumnType("INTEGER");
 211178
 211179                    b.Property<string>("AccessToken")
 211180                        .IsRequired()
 211181                        .HasColumnType("TEXT");
 211182
 211183                    b.Property<string>("AppName")
 211184                        .IsRequired()
 211185                        .HasMaxLength(64)
 211186                        .HasColumnType("TEXT");
 211187
 211188                    b.Property<string>("AppVersion")
 211189                        .IsRequired()
 211190                        .HasMaxLength(32)
 211191                        .HasColumnType("TEXT");
 211192
 211193                    b.Property<DateTime>("DateCreated")
 211194                        .HasColumnType("TEXT");
 211195
 211196                    b.Property<DateTime>("DateLastActivity")
 211197                        .HasColumnType("TEXT");
 211198
 211199                    b.Property<DateTime>("DateModified")
 211200                        .HasColumnType("TEXT");
 211201
 211202                    b.Property<string>("DeviceId")
 211203                        .IsRequired()
 211204                        .HasMaxLength(256)
 211205                        .HasColumnType("TEXT");
 211206
 211207                    b.Property<string>("DeviceName")
 211208                        .IsRequired()
 211209                        .HasMaxLength(64)
 211210                        .HasColumnType("TEXT");
 211211
 211212                    b.Property<bool>("IsActive")
 211213                        .HasColumnType("INTEGER");
 211214
 211215                    b.Property<Guid>("UserId")
 211216                        .HasColumnType("TEXT");
 211217
 211218                    b.HasKey("Id");
 211219
 211220                    b.HasIndex("DeviceId");
 211221
 211222                    b.HasIndex("AccessToken", "DateLastActivity");
 211223
 211224                    b.HasIndex("DeviceId", "DateLastActivity");
 211225
 211226                    b.HasIndex("UserId", "DeviceId");
 211227
 211228                    b.ToTable("Devices");
 211229
 211230                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211231                });
 1232
 211233            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211234                {
 211235                    b.Property<int>("Id")
 211236                        .ValueGeneratedOnAdd()
 211237                        .HasColumnType("INTEGER");
 211238
 211239                    b.Property<string>("CustomName")
 211240                        .HasColumnType("TEXT");
 211241
 211242                    b.Property<string>("DeviceId")
 211243                        .IsRequired()
 211244                        .HasColumnType("TEXT");
 211245
 211246                    b.HasKey("Id");
 211247
 211248                    b.HasIndex("DeviceId")
 211249                        .IsUnique();
 211250
 211251                    b.ToTable("DeviceOptions");
 211252
 211253                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211254                });
 1255
 211256            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211257                {
 211258                    b.Property<Guid>("ItemId")
 211259                        .HasColumnType("TEXT");
 211260
 211261                    b.Property<int>("Width")
 211262                        .HasColumnType("INTEGER");
 211263
 211264                    b.Property<int>("Bandwidth")
 211265                        .HasColumnType("INTEGER");
 211266
 211267                    b.Property<int>("Height")
 211268                        .HasColumnType("INTEGER");
 211269
 211270                    b.Property<int>("Interval")
 211271                        .HasColumnType("INTEGER");
 211272
 211273                    b.Property<int>("ThumbnailCount")
 211274                        .HasColumnType("INTEGER");
 211275
 211276                    b.Property<int>("TileHeight")
 211277                        .HasColumnType("INTEGER");
 211278
 211279                    b.Property<int>("TileWidth")
 211280                        .HasColumnType("INTEGER");
 211281
 211282                    b.HasKey("ItemId", "Width");
 211283
 211284                    b.ToTable("TrickplayInfos");
 211285
 211286                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211287                });
 1288
 211289            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211290                {
 211291                    b.Property<Guid>("Id")
 211292                        .ValueGeneratedOnAdd()
 211293                        .HasColumnType("TEXT");
 211294
 211295                    b.Property<string>("AudioLanguagePreference")
 211296                        .HasMaxLength(255)
 211297                        .HasColumnType("TEXT");
 211298
 211299                    b.Property<string>("AuthenticationProviderId")
 211300                        .IsRequired()
 211301                        .HasMaxLength(255)
 211302                        .HasColumnType("TEXT");
 211303
 211304                    b.Property<string>("CastReceiverId")
 211305                        .HasMaxLength(32)
 211306                        .HasColumnType("TEXT");
 211307
 211308                    b.Property<bool>("DisplayCollectionsView")
 211309                        .HasColumnType("INTEGER");
 211310
 211311                    b.Property<bool>("DisplayMissingEpisodes")
 211312                        .HasColumnType("INTEGER");
 211313
 211314                    b.Property<bool>("EnableAutoLogin")
 211315                        .HasColumnType("INTEGER");
 211316
 211317                    b.Property<bool>("EnableLocalPassword")
 211318                        .HasColumnType("INTEGER");
 211319
 211320                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211321                        .HasColumnType("INTEGER");
 211322
 211323                    b.Property<bool>("EnableUserPreferenceAccess")
 211324                        .HasColumnType("INTEGER");
 211325
 211326                    b.Property<bool>("HidePlayedInLatest")
 211327                        .HasColumnType("INTEGER");
 211328
 211329                    b.Property<long>("InternalId")
 211330                        .HasColumnType("INTEGER");
 211331
 211332                    b.Property<int>("InvalidLoginAttemptCount")
 211333                        .HasColumnType("INTEGER");
 211334
 211335                    b.Property<DateTime?>("LastActivityDate")
 211336                        .HasColumnType("TEXT");
 211337
 211338                    b.Property<DateTime?>("LastLoginDate")
 211339                        .HasColumnType("TEXT");
 211340
 211341                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211342                        .HasColumnType("INTEGER");
 211343
 211344                    b.Property<int>("MaxActiveSessions")
 211345                        .HasColumnType("INTEGER");
 211346
 211347                    b.Property<int?>("MaxParentalRatingScore")
 211348                        .HasColumnType("INTEGER");
 211349
 211350                    b.Property<int?>("MaxParentalRatingSubScore")
 211351                        .HasColumnType("INTEGER");
 211352
 211353                    b.Property<bool>("MustUpdatePassword")
 211354                        .HasColumnType("INTEGER");
 211355
 211356                    b.Property<string>("Password")
 211357                        .HasMaxLength(65535)
 211358                        .HasColumnType("TEXT");
 211359
 211360                    b.Property<string>("PasswordResetProviderId")
 211361                        .IsRequired()
 211362                        .HasMaxLength(255)
 211363                        .HasColumnType("TEXT");
 211364
 211365                    b.Property<bool>("PlayDefaultAudioTrack")
 211366                        .HasColumnType("INTEGER");
 211367
 211368                    b.Property<bool>("RememberAudioSelections")
 211369                        .HasColumnType("INTEGER");
 211370
 211371                    b.Property<bool>("RememberSubtitleSelections")
 211372                        .HasColumnType("INTEGER");
 211373
 211374                    b.Property<int?>("RemoteClientBitrateLimit")
 211375                        .HasColumnType("INTEGER");
 211376
 211377                    b.Property<uint>("RowVersion")
 211378                        .IsConcurrencyToken()
 211379                        .HasColumnType("INTEGER");
 211380
 211381                    b.Property<string>("SubtitleLanguagePreference")
 211382                        .HasMaxLength(255)
 211383                        .HasColumnType("TEXT");
 211384
 211385                    b.Property<int>("SubtitleMode")
 211386                        .HasColumnType("INTEGER");
 211387
 211388                    b.Property<int>("SyncPlayAccess")
 211389                        .HasColumnType("INTEGER");
 211390
 211391                    b.Property<string>("Username")
 211392                        .IsRequired()
 211393                        .HasMaxLength(255)
 211394                        .HasColumnType("TEXT");
 211395
 211396                    b.HasKey("Id");
 211397
 211398                    b.HasIndex("Username")
 211399                        .IsUnique();
 211400
 211401                    b.ToTable("Users");
 211402
 211403                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211404                });
 1405
 211406            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211407                {
 211408                    b.Property<Guid>("ItemId")
 211409                        .HasColumnType("TEXT");
 211410
 211411                    b.Property<Guid>("UserId")
 211412                        .HasColumnType("TEXT");
 211413
 211414                    b.Property<string>("CustomDataKey")
 211415                        .HasColumnType("TEXT");
 211416
 211417                    b.Property<int?>("AudioStreamIndex")
 211418                        .HasColumnType("INTEGER");
 211419
 211420                    b.Property<bool>("IsFavorite")
 211421                        .HasColumnType("INTEGER");
 211422
 211423                    b.Property<DateTime?>("LastPlayedDate")
 211424                        .HasColumnType("TEXT");
 211425
 211426                    b.Property<bool?>("Likes")
 211427                        .HasColumnType("INTEGER");
 211428
 211429                    b.Property<int>("PlayCount")
 211430                        .HasColumnType("INTEGER");
 211431
 211432                    b.Property<long>("PlaybackPositionTicks")
 211433                        .HasColumnType("INTEGER");
 211434
 211435                    b.Property<bool>("Played")
 211436                        .HasColumnType("INTEGER");
 211437
 211438                    b.Property<double?>("Rating")
 211439                        .HasColumnType("REAL");
 211440
 211441                    b.Property<DateTime?>("RetentionDate")
 211442                        .HasColumnType("TEXT");
 211443
 211444                    b.Property<int?>("SubtitleStreamIndex")
 211445                        .HasColumnType("INTEGER");
 211446
 211447                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211448
 211449                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211450
 211451                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211452
 211453                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211454
 211455                    b.HasIndex("ItemId", "UserId", "Played");
 211456
 211457                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 211458
 211459                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 211460
 211461                    b.HasIndex("UserId", "Played", "ItemId");
 211462
 211463                    b.ToTable("UserData");
 211464
 211465                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211466                });
 1467
 211468            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211469                {
 211470                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211471                        .WithMany("AccessSchedules")
 211472                        .HasForeignKey("UserId")
 211473                        .OnDelete(DeleteBehavior.Cascade)
 211474                        .IsRequired();
 211475                });
 1476
 211477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211478                {
 211479                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211480                        .WithMany("Parents")
 211481                        .HasForeignKey("ItemId")
 211482                        .OnDelete(DeleteBehavior.Cascade)
 211483                        .IsRequired();
 211484
 211485                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211486                        .WithMany("Children")
 211487                        .HasForeignKey("ParentItemId")
 211488                        .OnDelete(DeleteBehavior.Cascade)
 211489                        .IsRequired();
 211490
 211491                    b.Navigation("Item");
 211492
 211493                    b.Navigation("ParentItem");
 211494                });
 1495
 211496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211497                {
 211498                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211499                        .WithMany()
 211500                        .HasForeignKey("ItemId")
 211501                        .OnDelete(DeleteBehavior.Cascade)
 211502                        .IsRequired();
 211503
 211504                    b.Navigation("Item");
 211505                });
 1506
 211507            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211508                {
 211509                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 211510                        .WithMany("Extras")
 211511                        .HasForeignKey("OwnerId")
 211512                        .OnDelete(DeleteBehavior.NoAction);
 211513
 211514                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 211515                        .WithMany("DirectChildren")
 211516                        .HasForeignKey("ParentId")
 211517                        .OnDelete(DeleteBehavior.Cascade);
 211518
 211519                    b.Navigation("DirectParent");
 211520
 211521                    b.Navigation("Owner");
 211522                });
 1523
 211524            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211525                {
 211526                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211527                        .WithMany("Images")
 211528                        .HasForeignKey("ItemId")
 211529                        .OnDelete(DeleteBehavior.Cascade)
 211530                        .IsRequired();
 211531
 211532                    b.Navigation("Item");
 211533                });
 1534
 211535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211536                {
 211537                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211538                        .WithMany("LockedFields")
 211539                        .HasForeignKey("ItemId")
 211540                        .OnDelete(DeleteBehavior.Cascade)
 211541                        .IsRequired();
 211542
 211543                    b.Navigation("Item");
 211544                });
 1545
 211546            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211547                {
 211548                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211549                        .WithMany("Provider")
 211550                        .HasForeignKey("ItemId")
 211551                        .OnDelete(DeleteBehavior.Cascade)
 211552                        .IsRequired();
 211553
 211554                    b.Navigation("Item");
 211555                });
 1556
 211557            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211558                {
 211559                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211560                        .WithMany("TrailerTypes")
 211561                        .HasForeignKey("ItemId")
 211562                        .OnDelete(DeleteBehavior.Cascade)
 211563                        .IsRequired();
 211564
 211565                    b.Navigation("Item");
 211566                });
 1567
 211568            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211569                {
 211570                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211571                        .WithMany("Chapters")
 211572                        .HasForeignKey("ItemId")
 211573                        .OnDelete(DeleteBehavior.Cascade)
 211574                        .IsRequired();
 211575
 211576                    b.Navigation("Item");
 211577                });
 1578
 211579            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211580                {
 211581                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211582                        .WithMany("DisplayPreferences")
 211583                        .HasForeignKey("UserId")
 211584                        .OnDelete(DeleteBehavior.Cascade)
 211585                        .IsRequired();
 211586                });
 1587
 211588            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211589                {
 211590                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211591                        .WithMany("HomeSections")
 211592                        .HasForeignKey("DisplayPreferencesId")
 211593                        .OnDelete(DeleteBehavior.Cascade)
 211594                        .IsRequired();
 211595                });
 1596
 211597            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211598                {
 211599                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211600                        .WithOne("ProfileImage")
 211601                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211602                        .OnDelete(DeleteBehavior.Cascade);
 211603                });
 1604
 211605            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211606                {
 211607                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211608                        .WithMany("ItemDisplayPreferences")
 211609                        .HasForeignKey("UserId")
 211610                        .OnDelete(DeleteBehavior.Cascade)
 211611                        .IsRequired();
 211612                });
 1613
 211614            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211615                {
 211616                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211617                        .WithMany("ItemValues")
 211618                        .HasForeignKey("ItemId")
 211619                        .OnDelete(DeleteBehavior.Cascade)
 211620                        .IsRequired();
 211621
 211622                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211623                        .WithMany("BaseItemsMap")
 211624                        .HasForeignKey("ItemValueId")
 211625                        .OnDelete(DeleteBehavior.Cascade)
 211626                        .IsRequired();
 211627
 211628                    b.Navigation("Item");
 211629
 211630                    b.Navigation("ItemValue");
 211631                });
 1632
 211633            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211634                {
 211635                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211636                        .WithMany()
 211637                        .HasForeignKey("ItemId")
 211638                        .OnDelete(DeleteBehavior.Cascade)
 211639                        .IsRequired();
 211640
 211641                    b.Navigation("Item");
 211642                });
 1643
 211644            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 211645                {
 211646                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 211647                        .WithMany("LinkedChildOfEntities")
 211648                        .HasForeignKey("ChildId")
 211649                        .OnDelete(DeleteBehavior.NoAction)
 211650                        .IsRequired();
 211651
 211652                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 211653                        .WithMany("LinkedChildEntities")
 211654                        .HasForeignKey("ParentId")
 211655                        .OnDelete(DeleteBehavior.NoAction)
 211656                        .IsRequired();
 211657
 211658                    b.Navigation("Child");
 211659
 211660                    b.Navigation("Parent");
 211661                });
 1662
 211663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211664                {
 211665                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211666                        .WithMany("MediaStreams")
 211667                        .HasForeignKey("ItemId")
 211668                        .OnDelete(DeleteBehavior.Cascade)
 211669                        .IsRequired();
 211670
 211671                    b.Navigation("Item");
 211672                });
 1673
 211674            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211675                {
 211676                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211677                        .WithMany("Peoples")
 211678                        .HasForeignKey("ItemId")
 211679                        .OnDelete(DeleteBehavior.Cascade)
 211680                        .IsRequired();
 211681
 211682                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211683                        .WithMany("BaseItems")
 211684                        .HasForeignKey("PeopleId")
 211685                        .OnDelete(DeleteBehavior.Cascade)
 211686                        .IsRequired();
 211687
 211688                    b.Navigation("Item");
 211689
 211690                    b.Navigation("People");
 211691                });
 1692
 211693            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211694                {
 211695                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211696                        .WithMany("Permissions")
 211697                        .HasForeignKey("UserId")
 211698                        .OnDelete(DeleteBehavior.Cascade);
 211699                });
 1700
 211701            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211702                {
 211703                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211704                        .WithMany("Preferences")
 211705                        .HasForeignKey("UserId")
 211706                        .OnDelete(DeleteBehavior.Cascade);
 211707                });
 1708
 211709            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211710                {
 211711                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211712                        .WithMany()
 211713                        .HasForeignKey("UserId")
 211714                        .OnDelete(DeleteBehavior.Cascade)
 211715                        .IsRequired();
 211716
 211717                    b.Navigation("User");
 211718                });
 1719
 211720            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211721                {
 211722                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211723                        .WithMany("UserData")
 211724                        .HasForeignKey("ItemId")
 211725                        .OnDelete(DeleteBehavior.Cascade)
 211726                        .IsRequired();
 211727
 211728                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211729                        .WithMany()
 211730                        .HasForeignKey("UserId")
 211731                        .OnDelete(DeleteBehavior.Cascade)
 211732                        .IsRequired();
 211733
 211734                    b.Navigation("Item");
 211735
 211736                    b.Navigation("User");
 211737                });
 1738
 211739            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211740                {
 211741                    b.Navigation("Chapters");
 211742
 211743                    b.Navigation("Children");
 211744
 211745                    b.Navigation("DirectChildren");
 211746
 211747                    b.Navigation("Extras");
 211748
 211749                    b.Navigation("Images");
 211750
 211751                    b.Navigation("ItemValues");
 211752
 211753                    b.Navigation("LinkedChildEntities");
 211754
 211755                    b.Navigation("LinkedChildOfEntities");
 211756
 211757                    b.Navigation("LockedFields");
 211758
 211759                    b.Navigation("MediaStreams");
 211760
 211761                    b.Navigation("Parents");
 211762
 211763                    b.Navigation("Peoples");
 211764
 211765                    b.Navigation("Provider");
 211766
 211767                    b.Navigation("TrailerTypes");
 211768
 211769                    b.Navigation("UserData");
 211770                });
 1771
 211772            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211773                {
 211774                    b.Navigation("HomeSections");
 211775                });
 1776
 211777            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211778                {
 211779                    b.Navigation("BaseItemsMap");
 211780                });
 1781
 211782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211783                {
 211784                    b.Navigation("BaseItems");
 211785                });
 1786
 211787            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211788                {
 211789                    b.Navigation("AccessSchedules");
 211790
 211791                    b.Navigation("DisplayPreferences");
 211792
 211793                    b.Navigation("ItemDisplayPreferences");
 211794
 211795                    b.Navigation("Permissions");
 211796
 211797                    b.Navigation("Preferences");
 211798
 211799                    b.Navigation("ProfileImage");
 211800                });
 1801#pragma warning restore 612, 618
 211802        }
 1803    }
 1804}