< Summary - Jellyfin

Line coverage
99%
Covered lines: 1721
Uncovered lines: 4
Coverable lines: 1725
Total lines: 1824
Line coverage: 99.7%
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/5/2026 - 12:15:44 AM Line coverage: 99.7% (1721/1725) Total lines: 1824

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/20260504075755_AddPartialIndexForItemCounts.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 AddPartialIndexForItemCounts : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.CreateIndex(
 2114                name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
 2115                table: "BaseItems",
 2116                columns: new[] { "TopParentId", "Type", "IsVirtualItem" },
 2117                filter: "\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)");
 2118        }
 19
 20        /// <inheritdoc />
 21        protected override void Down(MigrationBuilder migrationBuilder)
 22        {
 023            migrationBuilder.DropIndex(
 024                name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
 025                table: "BaseItems");
 026        }
 27    }
 28}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260504075755_AddPartialIndexForItemCounts.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("20260504075755_AddPartialIndexForItemCounts")]
 15    partial class AddPartialIndexForItemCounts
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2121            modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
 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>("OriginalTitle")
 21271                        .HasColumnType("TEXT");
 21272
 21273                    b.Property<string>("Overview")
 21274                        .HasColumnType("TEXT");
 21275
 21276                    b.Property<Guid?>("OwnerId")
 21277                        .HasColumnType("TEXT");
 21278
 21279                    b.Property<Guid?>("ParentId")
 21280                        .HasColumnType("TEXT");
 21281
 21282                    b.Property<int?>("ParentIndexNumber")
 21283                        .HasColumnType("INTEGER");
 21284
 21285                    b.Property<string>("Path")
 21286                        .HasColumnType("TEXT");
 21287
 21288                    b.Property<string>("PreferredMetadataCountryCode")
 21289                        .HasColumnType("TEXT");
 21290
 21291                    b.Property<string>("PreferredMetadataLanguage")
 21292                        .HasColumnType("TEXT");
 21293
 21294                    b.Property<DateTime?>("PremiereDate")
 21295                        .HasColumnType("TEXT");
 21296
 21297                    b.Property<string>("PresentationUniqueKey")
 21298                        .HasColumnType("TEXT");
 21299
 21300                    b.Property<Guid?>("PrimaryVersionId")
 21301                        .HasColumnType("TEXT");
 21302
 21303                    b.Property<string>("ProductionLocations")
 21304                        .HasColumnType("TEXT");
 21305
 21306                    b.Property<int?>("ProductionYear")
 21307                        .HasColumnType("INTEGER");
 21308
 21309                    b.Property<long?>("RunTimeTicks")
 21310                        .HasColumnType("INTEGER");
 21311
 21312                    b.Property<Guid?>("SeasonId")
 21313                        .HasColumnType("TEXT");
 21314
 21315                    b.Property<string>("SeasonName")
 21316                        .HasColumnType("TEXT");
 21317
 21318                    b.Property<Guid?>("SeriesId")
 21319                        .HasColumnType("TEXT");
 21320
 21321                    b.Property<string>("SeriesName")
 21322                        .HasColumnType("TEXT");
 21323
 21324                    b.Property<string>("SeriesPresentationUniqueKey")
 21325                        .HasColumnType("TEXT");
 21326
 21327                    b.Property<string>("ShowId")
 21328                        .HasColumnType("TEXT");
 21329
 21330                    b.Property<long?>("Size")
 21331                        .HasColumnType("INTEGER");
 21332
 21333                    b.Property<string>("SortName")
 21334                        .HasColumnType("TEXT");
 21335
 21336                    b.Property<DateTime?>("StartDate")
 21337                        .HasColumnType("TEXT");
 21338
 21339                    b.Property<string>("Studios")
 21340                        .HasColumnType("TEXT");
 21341
 21342                    b.Property<string>("Tagline")
 21343                        .HasColumnType("TEXT");
 21344
 21345                    b.Property<string>("Tags")
 21346                        .HasColumnType("TEXT");
 21347
 21348                    b.Property<Guid?>("TopParentId")
 21349                        .HasColumnType("TEXT");
 21350
 21351                    b.Property<int?>("TotalBitrate")
 21352                        .HasColumnType("INTEGER");
 21353
 21354                    b.Property<string>("Type")
 21355                        .IsRequired()
 21356                        .HasColumnType("TEXT");
 21357
 21358                    b.Property<string>("UnratedType")
 21359                        .HasColumnType("TEXT");
 21360
 21361                    b.Property<int?>("Width")
 21362                        .HasColumnType("INTEGER");
 21363
 21364                    b.HasKey("Id");
 21365
 21366                    b.HasIndex("Name");
 21367
 21368                    b.HasIndex("OwnerId");
 21369
 21370                    b.HasIndex("ParentId");
 21371
 21372                    b.HasIndex("Path");
 21373
 21374                    b.HasIndex("PresentationUniqueKey");
 21375
 21376                    b.HasIndex("SeasonId");
 21377
 21378                    b.HasIndex("SeriesId");
 21379
 21380                    b.HasIndex("SeriesName");
 21381
 21382                    b.HasIndex("ExtraType", "OwnerId");
 21383
 21384                    b.HasIndex("TopParentId", "Id");
 21385
 21386                    b.HasIndex("Type", "CleanName");
 21387
 21388                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 21389                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 21390
 21391                    b.HasIndex("Type", "TopParentId", "Id");
 21392
 21393                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21394
 21395                    b.HasIndex("Type", "TopParentId", "SortName");
 21396
 21397                    b.HasIndex("Type", "TopParentId", "StartDate");
 21398
 21399                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21400
 21401                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 21402
 21403                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 21404
 21405                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 21406
 21407                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21408
 21409                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 21410
 21411                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21412
 21413                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21414
 21415                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21416
 21417                    b.ToTable("BaseItems");
 21418
 21419                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21420
 21421                    b.HasData(
 21422                        new
 21423                        {
 21424                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 21425                            IsFolder = false,
 21426                            IsInMixedFolder = false,
 21427                            IsLocked = false,
 21428                            IsMovie = false,
 21429                            IsRepeat = false,
 21430                            IsSeries = false,
 21431                            IsVirtualItem = false,
 21432                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 21433                            Type = "PLACEHOLDER"
 21434                        });
 21435                });
 436
 21437            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21438                {
 21439                    b.Property<Guid>("Id")
 21440                        .ValueGeneratedOnAdd()
 21441                        .HasColumnType("TEXT");
 21442
 21443                    b.Property<byte[]>("Blurhash")
 21444                        .HasColumnType("BLOB");
 21445
 21446                    b.Property<DateTime?>("DateModified")
 21447                        .HasColumnType("TEXT");
 21448
 21449                    b.Property<int>("Height")
 21450                        .HasColumnType("INTEGER");
 21451
 21452                    b.Property<int>("ImageType")
 21453                        .HasColumnType("INTEGER");
 21454
 21455                    b.Property<Guid>("ItemId")
 21456                        .HasColumnType("TEXT");
 21457
 21458                    b.Property<string>("Path")
 21459                        .IsRequired()
 21460                        .HasColumnType("TEXT");
 21461
 21462                    b.Property<int>("Width")
 21463                        .HasColumnType("INTEGER");
 21464
 21465                    b.HasKey("Id");
 21466
 21467                    b.HasIndex("ItemId", "ImageType");
 21468
 21469                    b.ToTable("BaseItemImageInfos");
 21470
 21471                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21472                });
 473
 21474            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21475                {
 21476                    b.Property<int>("Id")
 21477                        .HasColumnType("INTEGER");
 21478
 21479                    b.Property<Guid>("ItemId")
 21480                        .HasColumnType("TEXT");
 21481
 21482                    b.HasKey("Id", "ItemId");
 21483
 21484                    b.HasIndex("ItemId");
 21485
 21486                    b.ToTable("BaseItemMetadataFields");
 21487
 21488                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21489                });
 490
 21491            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21492                {
 21493                    b.Property<Guid>("ItemId")
 21494                        .HasColumnType("TEXT");
 21495
 21496                    b.Property<string>("ProviderId")
 21497                        .HasColumnType("TEXT");
 21498
 21499                    b.Property<string>("ProviderValue")
 21500                        .IsRequired()
 21501                        .HasColumnType("TEXT");
 21502
 21503                    b.HasKey("ItemId", "ProviderId");
 21504
 21505                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 21506
 21507                    b.ToTable("BaseItemProviders");
 21508
 21509                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21510                });
 511
 21512            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21513                {
 21514                    b.Property<int>("Id")
 21515                        .HasColumnType("INTEGER");
 21516
 21517                    b.Property<Guid>("ItemId")
 21518                        .HasColumnType("TEXT");
 21519
 21520                    b.HasKey("Id", "ItemId");
 21521
 21522                    b.HasIndex("ItemId");
 21523
 21524                    b.ToTable("BaseItemTrailerTypes");
 21525
 21526                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21527                });
 528
 21529            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21530                {
 21531                    b.Property<Guid>("ItemId")
 21532                        .HasColumnType("TEXT");
 21533
 21534                    b.Property<int>("ChapterIndex")
 21535                        .HasColumnType("INTEGER");
 21536
 21537                    b.Property<DateTime?>("ImageDateModified")
 21538                        .HasColumnType("TEXT");
 21539
 21540                    b.Property<string>("ImagePath")
 21541                        .HasColumnType("TEXT");
 21542
 21543                    b.Property<string>("Name")
 21544                        .HasColumnType("TEXT");
 21545
 21546                    b.Property<long>("StartPositionTicks")
 21547                        .HasColumnType("INTEGER");
 21548
 21549                    b.HasKey("ItemId", "ChapterIndex");
 21550
 21551                    b.ToTable("Chapters");
 21552
 21553                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21554                });
 555
 21556            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21557                {
 21558                    b.Property<int>("Id")
 21559                        .ValueGeneratedOnAdd()
 21560                        .HasColumnType("INTEGER");
 21561
 21562                    b.Property<string>("Client")
 21563                        .IsRequired()
 21564                        .HasMaxLength(32)
 21565                        .HasColumnType("TEXT");
 21566
 21567                    b.Property<Guid>("ItemId")
 21568                        .HasColumnType("TEXT");
 21569
 21570                    b.Property<string>("Key")
 21571                        .IsRequired()
 21572                        .HasColumnType("TEXT");
 21573
 21574                    b.Property<Guid>("UserId")
 21575                        .HasColumnType("TEXT");
 21576
 21577                    b.Property<string>("Value")
 21578                        .HasColumnType("TEXT");
 21579
 21580                    b.HasKey("Id");
 21581
 21582                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21583                        .IsUnique();
 21584
 21585                    b.ToTable("CustomItemDisplayPreferences");
 21586
 21587                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21588                });
 589
 21590            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21591                {
 21592                    b.Property<int>("Id")
 21593                        .ValueGeneratedOnAdd()
 21594                        .HasColumnType("INTEGER");
 21595
 21596                    b.Property<int>("ChromecastVersion")
 21597                        .HasColumnType("INTEGER");
 21598
 21599                    b.Property<string>("Client")
 21600                        .IsRequired()
 21601                        .HasMaxLength(32)
 21602                        .HasColumnType("TEXT");
 21603
 21604                    b.Property<string>("DashboardTheme")
 21605                        .HasMaxLength(32)
 21606                        .HasColumnType("TEXT");
 21607
 21608                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21609                        .HasColumnType("INTEGER");
 21610
 21611                    b.Property<int?>("IndexBy")
 21612                        .HasColumnType("INTEGER");
 21613
 21614                    b.Property<Guid>("ItemId")
 21615                        .HasColumnType("TEXT");
 21616
 21617                    b.Property<int>("ScrollDirection")
 21618                        .HasColumnType("INTEGER");
 21619
 21620                    b.Property<bool>("ShowBackdrop")
 21621                        .HasColumnType("INTEGER");
 21622
 21623                    b.Property<bool>("ShowSidebar")
 21624                        .HasColumnType("INTEGER");
 21625
 21626                    b.Property<int>("SkipBackwardLength")
 21627                        .HasColumnType("INTEGER");
 21628
 21629                    b.Property<int>("SkipForwardLength")
 21630                        .HasColumnType("INTEGER");
 21631
 21632                    b.Property<string>("TvHome")
 21633                        .HasMaxLength(32)
 21634                        .HasColumnType("TEXT");
 21635
 21636                    b.Property<Guid>("UserId")
 21637                        .HasColumnType("TEXT");
 21638
 21639                    b.HasKey("Id");
 21640
 21641                    b.HasIndex("UserId", "ItemId", "Client")
 21642                        .IsUnique();
 21643
 21644                    b.ToTable("DisplayPreferences");
 21645
 21646                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21647                });
 648
 21649            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21650                {
 21651                    b.Property<int>("Id")
 21652                        .ValueGeneratedOnAdd()
 21653                        .HasColumnType("INTEGER");
 21654
 21655                    b.Property<int>("DisplayPreferencesId")
 21656                        .HasColumnType("INTEGER");
 21657
 21658                    b.Property<int>("Order")
 21659                        .HasColumnType("INTEGER");
 21660
 21661                    b.Property<int>("Type")
 21662                        .HasColumnType("INTEGER");
 21663
 21664                    b.HasKey("Id");
 21665
 21666                    b.HasIndex("DisplayPreferencesId");
 21667
 21668                    b.ToTable("HomeSection");
 21669
 21670                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21671                });
 672
 21673            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21674                {
 21675                    b.Property<int>("Id")
 21676                        .ValueGeneratedOnAdd()
 21677                        .HasColumnType("INTEGER");
 21678
 21679                    b.Property<DateTime>("LastModified")
 21680                        .HasColumnType("TEXT");
 21681
 21682                    b.Property<string>("Path")
 21683                        .IsRequired()
 21684                        .HasMaxLength(512)
 21685                        .HasColumnType("TEXT");
 21686
 21687                    b.Property<Guid?>("UserId")
 21688                        .HasColumnType("TEXT");
 21689
 21690                    b.HasKey("Id");
 21691
 21692                    b.HasIndex("UserId")
 21693                        .IsUnique();
 21694
 21695                    b.ToTable("ImageInfos");
 21696
 21697                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21698                });
 699
 21700            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21701                {
 21702                    b.Property<int>("Id")
 21703                        .ValueGeneratedOnAdd()
 21704                        .HasColumnType("INTEGER");
 21705
 21706                    b.Property<string>("Client")
 21707                        .IsRequired()
 21708                        .HasMaxLength(32)
 21709                        .HasColumnType("TEXT");
 21710
 21711                    b.Property<int?>("IndexBy")
 21712                        .HasColumnType("INTEGER");
 21713
 21714                    b.Property<Guid>("ItemId")
 21715                        .HasColumnType("TEXT");
 21716
 21717                    b.Property<bool>("RememberIndexing")
 21718                        .HasColumnType("INTEGER");
 21719
 21720                    b.Property<bool>("RememberSorting")
 21721                        .HasColumnType("INTEGER");
 21722
 21723                    b.Property<string>("SortBy")
 21724                        .IsRequired()
 21725                        .HasMaxLength(64)
 21726                        .HasColumnType("TEXT");
 21727
 21728                    b.Property<int>("SortOrder")
 21729                        .HasColumnType("INTEGER");
 21730
 21731                    b.Property<Guid>("UserId")
 21732                        .HasColumnType("TEXT");
 21733
 21734                    b.Property<int>("ViewType")
 21735                        .HasColumnType("INTEGER");
 21736
 21737                    b.HasKey("Id");
 21738
 21739                    b.HasIndex("UserId");
 21740
 21741                    b.ToTable("ItemDisplayPreferences");
 21742
 21743                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21744                });
 745
 21746            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21747                {
 21748                    b.Property<Guid>("ItemValueId")
 21749                        .ValueGeneratedOnAdd()
 21750                        .HasColumnType("TEXT");
 21751
 21752                    b.Property<string>("CleanValue")
 21753                        .IsRequired()
 21754                        .HasColumnType("TEXT");
 21755
 21756                    b.Property<int>("Type")
 21757                        .HasColumnType("INTEGER");
 21758
 21759                    b.Property<string>("Value")
 21760                        .IsRequired()
 21761                        .HasColumnType("TEXT");
 21762
 21763                    b.HasKey("ItemValueId");
 21764
 21765                    b.HasIndex("Type", "CleanValue");
 21766
 21767                    b.HasIndex("Type", "Value")
 21768                        .IsUnique();
 21769
 21770                    b.ToTable("ItemValues");
 21771
 21772                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21773                });
 774
 21775            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21776                {
 21777                    b.Property<Guid>("ItemValueId")
 21778                        .HasColumnType("TEXT");
 21779
 21780                    b.Property<Guid>("ItemId")
 21781                        .HasColumnType("TEXT");
 21782
 21783                    b.HasKey("ItemValueId", "ItemId");
 21784
 21785                    b.HasIndex("ItemId");
 21786
 21787                    b.ToTable("ItemValuesMap");
 21788
 21789                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21790                });
 791
 21792            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21793                {
 21794                    b.Property<Guid>("ItemId")
 21795                        .HasColumnType("TEXT");
 21796
 21797                    b.PrimitiveCollection<string>("KeyframeTicks")
 21798                        .HasColumnType("TEXT");
 21799
 21800                    b.Property<long>("TotalDuration")
 21801                        .HasColumnType("INTEGER");
 21802
 21803                    b.HasKey("ItemId");
 21804
 21805                    b.ToTable("KeyframeData");
 21806
 21807                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21808                });
 809
 21810            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 21811                {
 21812                    b.Property<Guid>("ParentId")
 21813                        .HasColumnType("TEXT");
 21814
 21815                    b.Property<Guid>("ChildId")
 21816                        .HasColumnType("TEXT");
 21817
 21818                    b.Property<int>("ChildType")
 21819                        .HasColumnType("INTEGER");
 21820
 21821                    b.Property<int?>("SortOrder")
 21822                        .HasColumnType("INTEGER");
 21823
 21824                    b.HasKey("ParentId", "ChildId");
 21825
 21826                    b.HasIndex("ChildId", "ChildType");
 21827
 21828                    b.HasIndex("ParentId", "ChildType");
 21829
 21830                    b.HasIndex("ParentId", "SortOrder");
 21831
 21832                    b.ToTable("LinkedChildren", (string)null);
 21833
 21834                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21835                });
 836
 21837            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21838                {
 21839                    b.Property<Guid>("Id")
 21840                        .ValueGeneratedOnAdd()
 21841                        .HasColumnType("TEXT");
 21842
 21843                    b.Property<long>("EndTicks")
 21844                        .HasColumnType("INTEGER");
 21845
 21846                    b.Property<Guid>("ItemId")
 21847                        .HasColumnType("TEXT");
 21848
 21849                    b.Property<string>("SegmentProviderId")
 21850                        .IsRequired()
 21851                        .HasColumnType("TEXT");
 21852
 21853                    b.Property<long>("StartTicks")
 21854                        .HasColumnType("INTEGER");
 21855
 21856                    b.Property<int>("Type")
 21857                        .HasColumnType("INTEGER");
 21858
 21859                    b.HasKey("Id");
 21860
 21861                    b.ToTable("MediaSegments");
 21862
 21863                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21864                });
 865
 21866            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21867                {
 21868                    b.Property<Guid>("ItemId")
 21869                        .HasColumnType("TEXT");
 21870
 21871                    b.Property<int>("StreamIndex")
 21872                        .HasColumnType("INTEGER");
 21873
 21874                    b.Property<string>("AspectRatio")
 21875                        .HasColumnType("TEXT");
 21876
 21877                    b.Property<float?>("AverageFrameRate")
 21878                        .HasColumnType("REAL");
 21879
 21880                    b.Property<int?>("BitDepth")
 21881                        .HasColumnType("INTEGER");
 21882
 21883                    b.Property<int?>("BitRate")
 21884                        .HasColumnType("INTEGER");
 21885
 21886                    b.Property<int?>("BlPresentFlag")
 21887                        .HasColumnType("INTEGER");
 21888
 21889                    b.Property<string>("ChannelLayout")
 21890                        .HasColumnType("TEXT");
 21891
 21892                    b.Property<int?>("Channels")
 21893                        .HasColumnType("INTEGER");
 21894
 21895                    b.Property<string>("Codec")
 21896                        .HasColumnType("TEXT");
 21897
 21898                    b.Property<string>("CodecTag")
 21899                        .HasColumnType("TEXT");
 21900
 21901                    b.Property<string>("CodecTimeBase")
 21902                        .HasColumnType("TEXT");
 21903
 21904                    b.Property<string>("ColorPrimaries")
 21905                        .HasColumnType("TEXT");
 21906
 21907                    b.Property<string>("ColorSpace")
 21908                        .HasColumnType("TEXT");
 21909
 21910                    b.Property<string>("ColorTransfer")
 21911                        .HasColumnType("TEXT");
 21912
 21913                    b.Property<string>("Comment")
 21914                        .HasColumnType("TEXT");
 21915
 21916                    b.Property<int?>("DvBlSignalCompatibilityId")
 21917                        .HasColumnType("INTEGER");
 21918
 21919                    b.Property<int?>("DvLevel")
 21920                        .HasColumnType("INTEGER");
 21921
 21922                    b.Property<int?>("DvProfile")
 21923                        .HasColumnType("INTEGER");
 21924
 21925                    b.Property<int?>("DvVersionMajor")
 21926                        .HasColumnType("INTEGER");
 21927
 21928                    b.Property<int?>("DvVersionMinor")
 21929                        .HasColumnType("INTEGER");
 21930
 21931                    b.Property<int?>("ElPresentFlag")
 21932                        .HasColumnType("INTEGER");
 21933
 21934                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21935                        .HasColumnType("INTEGER");
 21936
 21937                    b.Property<int?>("Height")
 21938                        .HasColumnType("INTEGER");
 21939
 21940                    b.Property<bool?>("IsAnamorphic")
 21941                        .HasColumnType("INTEGER");
 21942
 21943                    b.Property<bool?>("IsAvc")
 21944                        .HasColumnType("INTEGER");
 21945
 21946                    b.Property<bool>("IsDefault")
 21947                        .HasColumnType("INTEGER");
 21948
 21949                    b.Property<bool>("IsExternal")
 21950                        .HasColumnType("INTEGER");
 21951
 21952                    b.Property<bool>("IsForced")
 21953                        .HasColumnType("INTEGER");
 21954
 21955                    b.Property<bool?>("IsHearingImpaired")
 21956                        .HasColumnType("INTEGER");
 21957
 21958                    b.Property<bool?>("IsInterlaced")
 21959                        .HasColumnType("INTEGER");
 21960
 21961                    b.Property<string>("KeyFrames")
 21962                        .HasColumnType("TEXT");
 21963
 21964                    b.Property<string>("Language")
 21965                        .HasColumnType("TEXT");
 21966
 21967                    b.Property<float?>("Level")
 21968                        .HasColumnType("REAL");
 21969
 21970                    b.Property<string>("NalLengthSize")
 21971                        .HasColumnType("TEXT");
 21972
 21973                    b.Property<string>("Path")
 21974                        .HasColumnType("TEXT");
 21975
 21976                    b.Property<string>("PixelFormat")
 21977                        .HasColumnType("TEXT");
 21978
 21979                    b.Property<string>("Profile")
 21980                        .HasColumnType("TEXT");
 21981
 21982                    b.Property<float?>("RealFrameRate")
 21983                        .HasColumnType("REAL");
 21984
 21985                    b.Property<int?>("RefFrames")
 21986                        .HasColumnType("INTEGER");
 21987
 21988                    b.Property<int?>("Rotation")
 21989                        .HasColumnType("INTEGER");
 21990
 21991                    b.Property<int?>("RpuPresentFlag")
 21992                        .HasColumnType("INTEGER");
 21993
 21994                    b.Property<int?>("SampleRate")
 21995                        .HasColumnType("INTEGER");
 21996
 21997                    b.Property<int>("StreamType")
 21998                        .HasColumnType("INTEGER");
 21999
 211000                    b.Property<string>("TimeBase")
 211001                        .HasColumnType("TEXT");
 211002
 211003                    b.Property<string>("Title")
 211004                        .HasColumnType("TEXT");
 211005
 211006                    b.Property<int?>("Width")
 211007                        .HasColumnType("INTEGER");
 211008
 211009                    b.HasKey("ItemId", "StreamIndex");
 211010
 211011                    b.ToTable("MediaStreamInfos");
 211012
 211013                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211014                });
 1015
 211016            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211017                {
 211018                    b.Property<Guid>("Id")
 211019                        .ValueGeneratedOnAdd()
 211020                        .HasColumnType("TEXT");
 211021
 211022                    b.Property<string>("Name")
 211023                        .IsRequired()
 211024                        .HasColumnType("TEXT");
 211025
 211026                    b.Property<string>("PersonType")
 211027                        .HasColumnType("TEXT");
 211028
 211029                    b.HasKey("Id");
 211030
 211031                    b.HasIndex("Name");
 211032
 211033                    b.ToTable("Peoples");
 211034
 211035                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211036                });
 1037
 211038            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211039                {
 211040                    b.Property<Guid>("ItemId")
 211041                        .HasColumnType("TEXT");
 211042
 211043                    b.Property<Guid>("PeopleId")
 211044                        .HasColumnType("TEXT");
 211045
 211046                    b.Property<string>("Role")
 211047                        .HasColumnType("TEXT");
 211048
 211049                    b.Property<int?>("ListOrder")
 211050                        .HasColumnType("INTEGER");
 211051
 211052                    b.Property<int?>("SortOrder")
 211053                        .HasColumnType("INTEGER");
 211054
 211055                    b.HasKey("ItemId", "PeopleId", "Role");
 211056
 211057                    b.HasIndex("PeopleId");
 211058
 211059                    b.HasIndex("ItemId", "ListOrder");
 211060
 211061                    b.HasIndex("ItemId", "SortOrder");
 211062
 211063                    b.ToTable("PeopleBaseItemMap");
 211064
 211065                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211066                });
 1067
 211068            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211069                {
 211070                    b.Property<int>("Id")
 211071                        .ValueGeneratedOnAdd()
 211072                        .HasColumnType("INTEGER");
 211073
 211074                    b.Property<int>("Kind")
 211075                        .HasColumnType("INTEGER");
 211076
 211077                    b.Property<Guid?>("Permission_Permissions_Guid")
 211078                        .HasColumnType("TEXT");
 211079
 211080                    b.Property<uint>("RowVersion")
 211081                        .IsConcurrencyToken()
 211082                        .HasColumnType("INTEGER");
 211083
 211084                    b.Property<Guid?>("UserId")
 211085                        .HasColumnType("TEXT");
 211086
 211087                    b.Property<bool>("Value")
 211088                        .HasColumnType("INTEGER");
 211089
 211090                    b.HasKey("Id");
 211091
 211092                    b.HasIndex("UserId", "Kind")
 211093                        .IsUnique()
 211094                        .HasFilter("[UserId] IS NOT NULL");
 211095
 211096                    b.ToTable("Permissions");
 211097
 211098                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211099                });
 1100
 211101            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211102                {
 211103                    b.Property<int>("Id")
 211104                        .ValueGeneratedOnAdd()
 211105                        .HasColumnType("INTEGER");
 211106
 211107                    b.Property<int>("Kind")
 211108                        .HasColumnType("INTEGER");
 211109
 211110                    b.Property<Guid?>("Preference_Preferences_Guid")
 211111                        .HasColumnType("TEXT");
 211112
 211113                    b.Property<uint>("RowVersion")
 211114                        .IsConcurrencyToken()
 211115                        .HasColumnType("INTEGER");
 211116
 211117                    b.Property<Guid?>("UserId")
 211118                        .HasColumnType("TEXT");
 211119
 211120                    b.Property<string>("Value")
 211121                        .IsRequired()
 211122                        .HasMaxLength(65535)
 211123                        .HasColumnType("TEXT");
 211124
 211125                    b.HasKey("Id");
 211126
 211127                    b.HasIndex("UserId", "Kind")
 211128                        .IsUnique()
 211129                        .HasFilter("[UserId] IS NOT NULL");
 211130
 211131                    b.ToTable("Preferences");
 211132
 211133                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211134                });
 1135
 211136            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211137                {
 211138                    b.Property<int>("Id")
 211139                        .ValueGeneratedOnAdd()
 211140                        .HasColumnType("INTEGER");
 211141
 211142                    b.Property<string>("AccessToken")
 211143                        .IsRequired()
 211144                        .HasColumnType("TEXT");
 211145
 211146                    b.Property<DateTime>("DateCreated")
 211147                        .HasColumnType("TEXT");
 211148
 211149                    b.Property<DateTime>("DateLastActivity")
 211150                        .HasColumnType("TEXT");
 211151
 211152                    b.Property<string>("Name")
 211153                        .IsRequired()
 211154                        .HasMaxLength(64)
 211155                        .HasColumnType("TEXT");
 211156
 211157                    b.HasKey("Id");
 211158
 211159                    b.HasIndex("AccessToken")
 211160                        .IsUnique();
 211161
 211162                    b.ToTable("ApiKeys");
 211163
 211164                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211165                });
 1166
 211167            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211168                {
 211169                    b.Property<int>("Id")
 211170                        .ValueGeneratedOnAdd()
 211171                        .HasColumnType("INTEGER");
 211172
 211173                    b.Property<string>("AccessToken")
 211174                        .IsRequired()
 211175                        .HasColumnType("TEXT");
 211176
 211177                    b.Property<string>("AppName")
 211178                        .IsRequired()
 211179                        .HasMaxLength(64)
 211180                        .HasColumnType("TEXT");
 211181
 211182                    b.Property<string>("AppVersion")
 211183                        .IsRequired()
 211184                        .HasMaxLength(32)
 211185                        .HasColumnType("TEXT");
 211186
 211187                    b.Property<DateTime>("DateCreated")
 211188                        .HasColumnType("TEXT");
 211189
 211190                    b.Property<DateTime>("DateLastActivity")
 211191                        .HasColumnType("TEXT");
 211192
 211193                    b.Property<DateTime>("DateModified")
 211194                        .HasColumnType("TEXT");
 211195
 211196                    b.Property<string>("DeviceId")
 211197                        .IsRequired()
 211198                        .HasMaxLength(256)
 211199                        .HasColumnType("TEXT");
 211200
 211201                    b.Property<string>("DeviceName")
 211202                        .IsRequired()
 211203                        .HasMaxLength(64)
 211204                        .HasColumnType("TEXT");
 211205
 211206                    b.Property<bool>("IsActive")
 211207                        .HasColumnType("INTEGER");
 211208
 211209                    b.Property<Guid>("UserId")
 211210                        .HasColumnType("TEXT");
 211211
 211212                    b.HasKey("Id");
 211213
 211214                    b.HasIndex("AccessToken", "DateLastActivity");
 211215
 211216                    b.HasIndex("DeviceId", "DateLastActivity");
 211217
 211218                    b.HasIndex("UserId", "DeviceId");
 211219
 211220                    b.ToTable("Devices");
 211221
 211222                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211223                });
 1224
 211225            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211226                {
 211227                    b.Property<int>("Id")
 211228                        .ValueGeneratedOnAdd()
 211229                        .HasColumnType("INTEGER");
 211230
 211231                    b.Property<string>("CustomName")
 211232                        .HasColumnType("TEXT");
 211233
 211234                    b.Property<string>("DeviceId")
 211235                        .IsRequired()
 211236                        .HasColumnType("TEXT");
 211237
 211238                    b.HasKey("Id");
 211239
 211240                    b.HasIndex("DeviceId")
 211241                        .IsUnique();
 211242
 211243                    b.ToTable("DeviceOptions");
 211244
 211245                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211246                });
 1247
 211248            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211249                {
 211250                    b.Property<Guid>("ItemId")
 211251                        .HasColumnType("TEXT");
 211252
 211253                    b.Property<int>("Width")
 211254                        .HasColumnType("INTEGER");
 211255
 211256                    b.Property<int>("Bandwidth")
 211257                        .HasColumnType("INTEGER");
 211258
 211259                    b.Property<int>("Height")
 211260                        .HasColumnType("INTEGER");
 211261
 211262                    b.Property<int>("Interval")
 211263                        .HasColumnType("INTEGER");
 211264
 211265                    b.Property<int>("ThumbnailCount")
 211266                        .HasColumnType("INTEGER");
 211267
 211268                    b.Property<int>("TileHeight")
 211269                        .HasColumnType("INTEGER");
 211270
 211271                    b.Property<int>("TileWidth")
 211272                        .HasColumnType("INTEGER");
 211273
 211274                    b.HasKey("ItemId", "Width");
 211275
 211276                    b.ToTable("TrickplayInfos");
 211277
 211278                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211279                });
 1280
 211281            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211282                {
 211283                    b.Property<Guid>("Id")
 211284                        .ValueGeneratedOnAdd()
 211285                        .HasColumnType("TEXT");
 211286
 211287                    b.Property<string>("AudioLanguagePreference")
 211288                        .HasMaxLength(255)
 211289                        .HasColumnType("TEXT");
 211290
 211291                    b.Property<string>("AuthenticationProviderId")
 211292                        .IsRequired()
 211293                        .HasMaxLength(255)
 211294                        .HasColumnType("TEXT");
 211295
 211296                    b.Property<string>("CastReceiverId")
 211297                        .HasMaxLength(32)
 211298                        .HasColumnType("TEXT");
 211299
 211300                    b.Property<bool>("DisplayCollectionsView")
 211301                        .HasColumnType("INTEGER");
 211302
 211303                    b.Property<bool>("DisplayMissingEpisodes")
 211304                        .HasColumnType("INTEGER");
 211305
 211306                    b.Property<bool>("EnableAutoLogin")
 211307                        .HasColumnType("INTEGER");
 211308
 211309                    b.Property<bool>("EnableLocalPassword")
 211310                        .HasColumnType("INTEGER");
 211311
 211312                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211313                        .HasColumnType("INTEGER");
 211314
 211315                    b.Property<bool>("EnableUserPreferenceAccess")
 211316                        .HasColumnType("INTEGER");
 211317
 211318                    b.Property<bool>("HidePlayedInLatest")
 211319                        .HasColumnType("INTEGER");
 211320
 211321                    b.Property<long>("InternalId")
 211322                        .HasColumnType("INTEGER");
 211323
 211324                    b.Property<int>("InvalidLoginAttemptCount")
 211325                        .HasColumnType("INTEGER");
 211326
 211327                    b.Property<DateTime?>("LastActivityDate")
 211328                        .HasColumnType("TEXT");
 211329
 211330                    b.Property<DateTime?>("LastLoginDate")
 211331                        .HasColumnType("TEXT");
 211332
 211333                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211334                        .HasColumnType("INTEGER");
 211335
 211336                    b.Property<int>("MaxActiveSessions")
 211337                        .HasColumnType("INTEGER");
 211338
 211339                    b.Property<int?>("MaxParentalRatingScore")
 211340                        .HasColumnType("INTEGER");
 211341
 211342                    b.Property<int?>("MaxParentalRatingSubScore")
 211343                        .HasColumnType("INTEGER");
 211344
 211345                    b.Property<bool>("MustUpdatePassword")
 211346                        .HasColumnType("INTEGER");
 211347
 211348                    b.Property<string>("Password")
 211349                        .HasMaxLength(65535)
 211350                        .HasColumnType("TEXT");
 211351
 211352                    b.Property<string>("PasswordResetProviderId")
 211353                        .IsRequired()
 211354                        .HasMaxLength(255)
 211355                        .HasColumnType("TEXT");
 211356
 211357                    b.Property<bool>("PlayDefaultAudioTrack")
 211358                        .HasColumnType("INTEGER");
 211359
 211360                    b.Property<bool>("RememberAudioSelections")
 211361                        .HasColumnType("INTEGER");
 211362
 211363                    b.Property<bool>("RememberSubtitleSelections")
 211364                        .HasColumnType("INTEGER");
 211365
 211366                    b.Property<int?>("RemoteClientBitrateLimit")
 211367                        .HasColumnType("INTEGER");
 211368
 211369                    b.Property<uint>("RowVersion")
 211370                        .IsConcurrencyToken()
 211371                        .HasColumnType("INTEGER");
 211372
 211373                    b.Property<string>("SubtitleLanguagePreference")
 211374                        .HasMaxLength(255)
 211375                        .HasColumnType("TEXT");
 211376
 211377                    b.Property<int>("SubtitleMode")
 211378                        .HasColumnType("INTEGER");
 211379
 211380                    b.Property<int>("SyncPlayAccess")
 211381                        .HasColumnType("INTEGER");
 211382
 211383                    b.Property<string>("Username")
 211384                        .IsRequired()
 211385                        .HasMaxLength(255)
 211386                        .HasColumnType("TEXT");
 211387
 211388                    b.HasKey("Id");
 211389
 211390                    b.HasIndex("Username")
 211391                        .IsUnique();
 211392
 211393                    b.ToTable("Users");
 211394
 211395                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211396                });
 1397
 211398            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211399                {
 211400                    b.Property<Guid>("ItemId")
 211401                        .HasColumnType("TEXT");
 211402
 211403                    b.Property<Guid>("UserId")
 211404                        .HasColumnType("TEXT");
 211405
 211406                    b.Property<string>("CustomDataKey")
 211407                        .HasColumnType("TEXT");
 211408
 211409                    b.Property<int?>("AudioStreamIndex")
 211410                        .HasColumnType("INTEGER");
 211411
 211412                    b.Property<bool>("IsFavorite")
 211413                        .HasColumnType("INTEGER");
 211414
 211415                    b.Property<DateTime?>("LastPlayedDate")
 211416                        .HasColumnType("TEXT");
 211417
 211418                    b.Property<bool?>("Likes")
 211419                        .HasColumnType("INTEGER");
 211420
 211421                    b.Property<int>("PlayCount")
 211422                        .HasColumnType("INTEGER");
 211423
 211424                    b.Property<long>("PlaybackPositionTicks")
 211425                        .HasColumnType("INTEGER");
 211426
 211427                    b.Property<bool>("Played")
 211428                        .HasColumnType("INTEGER");
 211429
 211430                    b.Property<double?>("Rating")
 211431                        .HasColumnType("REAL");
 211432
 211433                    b.Property<DateTime?>("RetentionDate")
 211434                        .HasColumnType("TEXT");
 211435
 211436                    b.Property<int?>("SubtitleStreamIndex")
 211437                        .HasColumnType("INTEGER");
 211438
 211439                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211440
 211441                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211442
 211443                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211444
 211445                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211446
 211447                    b.HasIndex("ItemId", "UserId", "Played");
 211448
 211449                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 211450
 211451                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 211452
 211453                    b.HasIndex("UserId", "Played", "ItemId");
 211454
 211455                    b.ToTable("UserData");
 211456
 211457                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211458                });
 1459
 211460            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211461                {
 211462                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211463                        .WithMany("AccessSchedules")
 211464                        .HasForeignKey("UserId")
 211465                        .OnDelete(DeleteBehavior.Cascade)
 211466                        .IsRequired();
 211467                });
 1468
 211469            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211470                {
 211471                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211472                        .WithMany("Parents")
 211473                        .HasForeignKey("ItemId")
 211474                        .OnDelete(DeleteBehavior.Cascade)
 211475                        .IsRequired();
 211476
 211477                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211478                        .WithMany("Children")
 211479                        .HasForeignKey("ParentItemId")
 211480                        .OnDelete(DeleteBehavior.Cascade)
 211481                        .IsRequired();
 211482
 211483                    b.Navigation("Item");
 211484
 211485                    b.Navigation("ParentItem");
 211486                });
 1487
 211488            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211489                {
 211490                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211491                        .WithMany()
 211492                        .HasForeignKey("ItemId")
 211493                        .OnDelete(DeleteBehavior.Cascade)
 211494                        .IsRequired();
 211495
 211496                    b.Navigation("Item");
 211497                });
 1498
 211499            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211500                {
 211501                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 211502                        .WithMany("Extras")
 211503                        .HasForeignKey("OwnerId")
 211504                        .OnDelete(DeleteBehavior.NoAction);
 211505
 211506                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 211507                        .WithMany("DirectChildren")
 211508                        .HasForeignKey("ParentId")
 211509                        .OnDelete(DeleteBehavior.Cascade);
 211510
 211511                    b.Navigation("DirectParent");
 211512
 211513                    b.Navigation("Owner");
 211514                });
 1515
 211516            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211517                {
 211518                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211519                        .WithMany("Images")
 211520                        .HasForeignKey("ItemId")
 211521                        .OnDelete(DeleteBehavior.Cascade)
 211522                        .IsRequired();
 211523
 211524                    b.Navigation("Item");
 211525                });
 1526
 211527            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211528                {
 211529                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211530                        .WithMany("LockedFields")
 211531                        .HasForeignKey("ItemId")
 211532                        .OnDelete(DeleteBehavior.Cascade)
 211533                        .IsRequired();
 211534
 211535                    b.Navigation("Item");
 211536                });
 1537
 211538            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211539                {
 211540                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211541                        .WithMany("Provider")
 211542                        .HasForeignKey("ItemId")
 211543                        .OnDelete(DeleteBehavior.Cascade)
 211544                        .IsRequired();
 211545
 211546                    b.Navigation("Item");
 211547                });
 1548
 211549            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211550                {
 211551                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211552                        .WithMany("TrailerTypes")
 211553                        .HasForeignKey("ItemId")
 211554                        .OnDelete(DeleteBehavior.Cascade)
 211555                        .IsRequired();
 211556
 211557                    b.Navigation("Item");
 211558                });
 1559
 211560            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211561                {
 211562                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211563                        .WithMany("Chapters")
 211564                        .HasForeignKey("ItemId")
 211565                        .OnDelete(DeleteBehavior.Cascade)
 211566                        .IsRequired();
 211567
 211568                    b.Navigation("Item");
 211569                });
 1570
 211571            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211572                {
 211573                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211574                        .WithMany("DisplayPreferences")
 211575                        .HasForeignKey("UserId")
 211576                        .OnDelete(DeleteBehavior.Cascade)
 211577                        .IsRequired();
 211578                });
 1579
 211580            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211581                {
 211582                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211583                        .WithMany("HomeSections")
 211584                        .HasForeignKey("DisplayPreferencesId")
 211585                        .OnDelete(DeleteBehavior.Cascade)
 211586                        .IsRequired();
 211587                });
 1588
 211589            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211590                {
 211591                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211592                        .WithOne("ProfileImage")
 211593                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211594                        .OnDelete(DeleteBehavior.Cascade);
 211595                });
 1596
 211597            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211598                {
 211599                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211600                        .WithMany("ItemDisplayPreferences")
 211601                        .HasForeignKey("UserId")
 211602                        .OnDelete(DeleteBehavior.Cascade)
 211603                        .IsRequired();
 211604                });
 1605
 211606            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211607                {
 211608                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211609                        .WithMany("ItemValues")
 211610                        .HasForeignKey("ItemId")
 211611                        .OnDelete(DeleteBehavior.Cascade)
 211612                        .IsRequired();
 211613
 211614                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211615                        .WithMany("BaseItemsMap")
 211616                        .HasForeignKey("ItemValueId")
 211617                        .OnDelete(DeleteBehavior.Cascade)
 211618                        .IsRequired();
 211619
 211620                    b.Navigation("Item");
 211621
 211622                    b.Navigation("ItemValue");
 211623                });
 1624
 211625            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211626                {
 211627                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211628                        .WithMany()
 211629                        .HasForeignKey("ItemId")
 211630                        .OnDelete(DeleteBehavior.Cascade)
 211631                        .IsRequired();
 211632
 211633                    b.Navigation("Item");
 211634                });
 1635
 211636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 211637                {
 211638                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 211639                        .WithMany("LinkedChildOfEntities")
 211640                        .HasForeignKey("ChildId")
 211641                        .OnDelete(DeleteBehavior.NoAction)
 211642                        .IsRequired();
 211643
 211644                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 211645                        .WithMany("LinkedChildEntities")
 211646                        .HasForeignKey("ParentId")
 211647                        .OnDelete(DeleteBehavior.NoAction)
 211648                        .IsRequired();
 211649
 211650                    b.Navigation("Child");
 211651
 211652                    b.Navigation("Parent");
 211653                });
 1654
 211655            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211656                {
 211657                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211658                        .WithMany("MediaStreams")
 211659                        .HasForeignKey("ItemId")
 211660                        .OnDelete(DeleteBehavior.Cascade)
 211661                        .IsRequired();
 211662
 211663                    b.Navigation("Item");
 211664                });
 1665
 211666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211667                {
 211668                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211669                        .WithMany("Peoples")
 211670                        .HasForeignKey("ItemId")
 211671                        .OnDelete(DeleteBehavior.Cascade)
 211672                        .IsRequired();
 211673
 211674                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211675                        .WithMany("BaseItems")
 211676                        .HasForeignKey("PeopleId")
 211677                        .OnDelete(DeleteBehavior.Cascade)
 211678                        .IsRequired();
 211679
 211680                    b.Navigation("Item");
 211681
 211682                    b.Navigation("People");
 211683                });
 1684
 211685            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211686                {
 211687                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211688                        .WithMany("Permissions")
 211689                        .HasForeignKey("UserId")
 211690                        .OnDelete(DeleteBehavior.Cascade);
 211691                });
 1692
 211693            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211694                {
 211695                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211696                        .WithMany("Preferences")
 211697                        .HasForeignKey("UserId")
 211698                        .OnDelete(DeleteBehavior.Cascade);
 211699                });
 1700
 211701            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211702                {
 211703                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211704                        .WithMany()
 211705                        .HasForeignKey("UserId")
 211706                        .OnDelete(DeleteBehavior.Cascade)
 211707                        .IsRequired();
 211708
 211709                    b.Navigation("User");
 211710                });
 1711
 211712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211713                {
 211714                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211715                        .WithMany("UserData")
 211716                        .HasForeignKey("ItemId")
 211717                        .OnDelete(DeleteBehavior.Cascade)
 211718                        .IsRequired();
 211719
 211720                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211721                        .WithMany()
 211722                        .HasForeignKey("UserId")
 211723                        .OnDelete(DeleteBehavior.Cascade)
 211724                        .IsRequired();
 211725
 211726                    b.Navigation("Item");
 211727
 211728                    b.Navigation("User");
 211729                });
 1730
 211731            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211732                {
 211733                    b.Navigation("Chapters");
 211734
 211735                    b.Navigation("Children");
 211736
 211737                    b.Navigation("DirectChildren");
 211738
 211739                    b.Navigation("Extras");
 211740
 211741                    b.Navigation("Images");
 211742
 211743                    b.Navigation("ItemValues");
 211744
 211745                    b.Navigation("LinkedChildEntities");
 211746
 211747                    b.Navigation("LinkedChildOfEntities");
 211748
 211749                    b.Navigation("LockedFields");
 211750
 211751                    b.Navigation("MediaStreams");
 211752
 211753                    b.Navigation("Parents");
 211754
 211755                    b.Navigation("Peoples");
 211756
 211757                    b.Navigation("Provider");
 211758
 211759                    b.Navigation("TrailerTypes");
 211760
 211761                    b.Navigation("UserData");
 211762                });
 1763
 211764            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211765                {
 211766                    b.Navigation("HomeSections");
 211767                });
 1768
 211769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211770                {
 211771                    b.Navigation("BaseItemsMap");
 211772                });
 1773
 211774            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211775                {
 211776                    b.Navigation("BaseItems");
 211777                });
 1778
 211779            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211780                {
 211781                    b.Navigation("AccessSchedules");
 211782
 211783                    b.Navigation("DisplayPreferences");
 211784
 211785                    b.Navigation("ItemDisplayPreferences");
 211786
 211787                    b.Navigation("Permissions");
 211788
 211789                    b.Navigation("Preferences");
 211790
 211791                    b.Navigation("ProfileImage");
 211792                });
 1793#pragma warning restore 612, 618
 211794        }
 1795    }
 1796}