< Summary - Jellyfin

Line coverage
99%
Covered lines: 1724
Uncovered lines: 4
Coverable lines: 1728
Total lines: 1827
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: 18245/22/2026 - 12:15:17 AM Line coverage: 99.7% (1724/1728) Total lines: 1827

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