< Summary - Jellyfin

Line coverage
99%
Covered lines: 1733
Uncovered lines: 10
Coverable lines: 1743
Total lines: 1846
Line coverage: 99.4%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/4/2026 - 12:15:16 AM Line coverage: 99.4% (1733/1743) Total lines: 1846

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.cs

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

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20260130232147_AddBaseItemNameIndex.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Database.Providers.Sqlite.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20260130232147_AddBaseItemNameIndex")]
 15    partial class AddBaseItemNameIndex
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2121            modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
 22
 2123            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2124                {
 2125                    b.Property<int>("Id")
 2126                        .ValueGeneratedOnAdd()
 2127                        .HasColumnType("INTEGER");
 2128
 2129                    b.Property<int>("DayOfWeek")
 2130                        .HasColumnType("INTEGER");
 2131
 2132                    b.Property<double>("EndHour")
 2133                        .HasColumnType("REAL");
 2134
 2135                    b.Property<double>("StartHour")
 2136                        .HasColumnType("REAL");
 2137
 2138                    b.Property<Guid>("UserId")
 2139                        .HasColumnType("TEXT");
 2140
 2141                    b.HasKey("Id");
 2142
 2143                    b.HasIndex("UserId");
 2144
 2145                    b.ToTable("AccessSchedules");
 2146
 2147                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2148                });
 49
 2150            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2151                {
 2152                    b.Property<int>("Id")
 2153                        .ValueGeneratedOnAdd()
 2154                        .HasColumnType("INTEGER");
 2155
 2156                    b.Property<DateTime>("DateCreated")
 2157                        .HasColumnType("TEXT");
 2158
 2159                    b.Property<string>("ItemId")
 2160                        .HasMaxLength(256)
 2161                        .HasColumnType("TEXT");
 2162
 2163                    b.Property<int>("LogSeverity")
 2164                        .HasColumnType("INTEGER");
 2165
 2166                    b.Property<string>("Name")
 2167                        .IsRequired()
 2168                        .HasMaxLength(512)
 2169                        .HasColumnType("TEXT");
 2170
 2171                    b.Property<string>("Overview")
 2172                        .HasMaxLength(512)
 2173                        .HasColumnType("TEXT");
 2174
 2175                    b.Property<uint>("RowVersion")
 2176                        .IsConcurrencyToken()
 2177                        .HasColumnType("INTEGER");
 2178
 2179                    b.Property<string>("ShortOverview")
 2180                        .HasMaxLength(512)
 2181                        .HasColumnType("TEXT");
 2182
 2183                    b.Property<string>("Type")
 2184                        .IsRequired()
 2185                        .HasMaxLength(256)
 2186                        .HasColumnType("TEXT");
 2187
 2188                    b.Property<Guid>("UserId")
 2189                        .HasColumnType("TEXT");
 2190
 2191                    b.HasKey("Id");
 2192
 2193                    b.HasIndex("DateCreated");
 2194
 2195                    b.ToTable("ActivityLogs");
 2196
 2197                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2198                });
 99
 21100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 21101                {
 21102                    b.Property<Guid>("ItemId")
 21103                        .HasColumnType("TEXT");
 21104
 21105                    b.Property<Guid>("ParentItemId")
 21106                        .HasColumnType("TEXT");
 21107
 21108                    b.HasKey("ItemId", "ParentItemId");
 21109
 21110                    b.HasIndex("ParentItemId");
 21111
 21112                    b.ToTable("AncestorIds");
 21113
 21114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21115                });
 116
 21117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 21118                {
 21119                    b.Property<Guid>("ItemId")
 21120                        .HasColumnType("TEXT");
 21121
 21122                    b.Property<int>("Index")
 21123                        .HasColumnType("INTEGER");
 21124
 21125                    b.Property<string>("Codec")
 21126                        .HasColumnType("TEXT");
 21127
 21128                    b.Property<string>("CodecTag")
 21129                        .HasColumnType("TEXT");
 21130
 21131                    b.Property<string>("Comment")
 21132                        .HasColumnType("TEXT");
 21133
 21134                    b.Property<string>("Filename")
 21135                        .HasColumnType("TEXT");
 21136
 21137                    b.Property<string>("MimeType")
 21138                        .HasColumnType("TEXT");
 21139
 21140                    b.HasKey("ItemId", "Index");
 21141
 21142                    b.ToTable("AttachmentStreamInfos");
 21143
 21144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21145                });
 146
 21147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 21148                {
 21149                    b.Property<Guid>("Id")
 21150                        .ValueGeneratedOnAdd()
 21151                        .HasColumnType("TEXT");
 21152
 21153                    b.Property<string>("Album")
 21154                        .HasColumnType("TEXT");
 21155
 21156                    b.Property<string>("AlbumArtists")
 21157                        .HasColumnType("TEXT");
 21158
 21159                    b.Property<string>("Artists")
 21160                        .HasColumnType("TEXT");
 21161
 21162                    b.Property<int?>("Audio")
 21163                        .HasColumnType("INTEGER");
 21164
 21165                    b.Property<Guid?>("ChannelId")
 21166                        .HasColumnType("TEXT");
 21167
 21168                    b.Property<string>("CleanName")
 21169                        .HasColumnType("TEXT");
 21170
 21171                    b.Property<float?>("CommunityRating")
 21172                        .HasColumnType("REAL");
 21173
 21174                    b.Property<float?>("CriticRating")
 21175                        .HasColumnType("REAL");
 21176
 21177                    b.Property<string>("CustomRating")
 21178                        .HasColumnType("TEXT");
 21179
 21180                    b.Property<string>("Data")
 21181                        .HasColumnType("TEXT");
 21182
 21183                    b.Property<DateTime?>("DateCreated")
 21184                        .HasColumnType("TEXT");
 21185
 21186                    b.Property<DateTime?>("DateLastMediaAdded")
 21187                        .HasColumnType("TEXT");
 21188
 21189                    b.Property<DateTime?>("DateLastRefreshed")
 21190                        .HasColumnType("TEXT");
 21191
 21192                    b.Property<DateTime?>("DateLastSaved")
 21193                        .HasColumnType("TEXT");
 21194
 21195                    b.Property<DateTime?>("DateModified")
 21196                        .HasColumnType("TEXT");
 21197
 21198                    b.Property<DateTime?>("EndDate")
 21199                        .HasColumnType("TEXT");
 21200
 21201                    b.Property<string>("EpisodeTitle")
 21202                        .HasColumnType("TEXT");
 21203
 21204                    b.Property<string>("ExternalId")
 21205                        .HasColumnType("TEXT");
 21206
 21207                    b.Property<string>("ExternalSeriesId")
 21208                        .HasColumnType("TEXT");
 21209
 21210                    b.Property<string>("ExternalServiceId")
 21211                        .HasColumnType("TEXT");
 21212
 21213                    b.Property<int?>("ExtraType")
 21214                        .HasColumnType("INTEGER");
 21215
 21216                    b.Property<string>("ForcedSortName")
 21217                        .HasColumnType("TEXT");
 21218
 21219                    b.Property<string>("Genres")
 21220                        .HasColumnType("TEXT");
 21221
 21222                    b.Property<int?>("Height")
 21223                        .HasColumnType("INTEGER");
 21224
 21225                    b.Property<int?>("IndexNumber")
 21226                        .HasColumnType("INTEGER");
 21227
 21228                    b.Property<int?>("InheritedParentalRatingSubValue")
 21229                        .HasColumnType("INTEGER");
 21230
 21231                    b.Property<int?>("InheritedParentalRatingValue")
 21232                        .HasColumnType("INTEGER");
 21233
 21234                    b.Property<bool>("IsFolder")
 21235                        .HasColumnType("INTEGER");
 21236
 21237                    b.Property<bool>("IsInMixedFolder")
 21238                        .HasColumnType("INTEGER");
 21239
 21240                    b.Property<bool>("IsLocked")
 21241                        .HasColumnType("INTEGER");
 21242
 21243                    b.Property<bool>("IsMovie")
 21244                        .HasColumnType("INTEGER");
 21245
 21246                    b.Property<bool>("IsRepeat")
 21247                        .HasColumnType("INTEGER");
 21248
 21249                    b.Property<bool>("IsSeries")
 21250                        .HasColumnType("INTEGER");
 21251
 21252                    b.Property<bool>("IsVirtualItem")
 21253                        .HasColumnType("INTEGER");
 21254
 21255                    b.Property<float?>("LUFS")
 21256                        .HasColumnType("REAL");
 21257
 21258                    b.Property<string>("MediaType")
 21259                        .HasColumnType("TEXT");
 21260
 21261                    b.Property<string>("Name")
 21262                        .HasColumnType("TEXT");
 21263
 21264                    b.Property<float?>("NormalizationGain")
 21265                        .HasColumnType("REAL");
 21266
 21267                    b.Property<string>("OfficialRating")
 21268                        .HasColumnType("TEXT");
 21269
 21270                    b.Property<string>("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<string>("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("ExtraType");
 21367
 21368                    b.HasIndex("Name");
 21369
 21370                    b.HasIndex("OwnerId");
 21371
 21372                    b.HasIndex("ParentId");
 21373
 21374                    b.HasIndex("Path");
 21375
 21376                    b.HasIndex("PresentationUniqueKey");
 21377
 21378                    b.HasIndex("ExtraType", "OwnerId");
 21379
 21380                    b.HasIndex("TopParentId", "Id");
 21381
 21382                    b.HasIndex("Type", "TopParentId", "Id");
 21383
 21384                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21385
 21386                    b.HasIndex("Type", "TopParentId", "StartDate");
 21387
 21388                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 21389
 21390                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21391
 21392                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 21393
 21394                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 21395
 21396                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 21397
 21398                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21399
 21400                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21401
 21402                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21403
 21404                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21405
 21406                    b.ToTable("BaseItems");
 21407
 21408                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21409
 21410                    b.HasData(
 21411                        new
 21412                        {
 21413                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 21414                            IsFolder = false,
 21415                            IsInMixedFolder = false,
 21416                            IsLocked = false,
 21417                            IsMovie = false,
 21418                            IsRepeat = false,
 21419                            IsSeries = false,
 21420                            IsVirtualItem = false,
 21421                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 21422                            Type = "PLACEHOLDER"
 21423                        });
 21424                });
 425
 21426            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21427                {
 21428                    b.Property<Guid>("Id")
 21429                        .ValueGeneratedOnAdd()
 21430                        .HasColumnType("TEXT");
 21431
 21432                    b.Property<byte[]>("Blurhash")
 21433                        .HasColumnType("BLOB");
 21434
 21435                    b.Property<DateTime?>("DateModified")
 21436                        .HasColumnType("TEXT");
 21437
 21438                    b.Property<int>("Height")
 21439                        .HasColumnType("INTEGER");
 21440
 21441                    b.Property<int>("ImageType")
 21442                        .HasColumnType("INTEGER");
 21443
 21444                    b.Property<Guid>("ItemId")
 21445                        .HasColumnType("TEXT");
 21446
 21447                    b.Property<string>("Path")
 21448                        .IsRequired()
 21449                        .HasColumnType("TEXT");
 21450
 21451                    b.Property<int>("Width")
 21452                        .HasColumnType("INTEGER");
 21453
 21454                    b.HasKey("Id");
 21455
 21456                    b.HasIndex("ItemId");
 21457
 21458                    b.HasIndex("ItemId", "ImageType");
 21459
 21460                    b.ToTable("BaseItemImageInfos");
 21461
 21462                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21463                });
 464
 21465            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21466                {
 21467                    b.Property<int>("Id")
 21468                        .HasColumnType("INTEGER");
 21469
 21470                    b.Property<Guid>("ItemId")
 21471                        .HasColumnType("TEXT");
 21472
 21473                    b.HasKey("Id", "ItemId");
 21474
 21475                    b.HasIndex("ItemId");
 21476
 21477                    b.ToTable("BaseItemMetadataFields");
 21478
 21479                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21480                });
 481
 21482            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21483                {
 21484                    b.Property<Guid>("ItemId")
 21485                        .HasColumnType("TEXT");
 21486
 21487                    b.Property<string>("ProviderId")
 21488                        .HasColumnType("TEXT");
 21489
 21490                    b.Property<string>("ProviderValue")
 21491                        .IsRequired()
 21492                        .HasColumnType("TEXT");
 21493
 21494                    b.HasKey("ItemId", "ProviderId");
 21495
 21496                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21497
 21498                    b.ToTable("BaseItemProviders");
 21499
 21500                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21501                });
 502
 21503            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21504                {
 21505                    b.Property<int>("Id")
 21506                        .HasColumnType("INTEGER");
 21507
 21508                    b.Property<Guid>("ItemId")
 21509                        .HasColumnType("TEXT");
 21510
 21511                    b.HasKey("Id", "ItemId");
 21512
 21513                    b.HasIndex("ItemId");
 21514
 21515                    b.ToTable("BaseItemTrailerTypes");
 21516
 21517                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21518                });
 519
 21520            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21521                {
 21522                    b.Property<Guid>("ItemId")
 21523                        .HasColumnType("TEXT");
 21524
 21525                    b.Property<int>("ChapterIndex")
 21526                        .HasColumnType("INTEGER");
 21527
 21528                    b.Property<DateTime?>("ImageDateModified")
 21529                        .HasColumnType("TEXT");
 21530
 21531                    b.Property<string>("ImagePath")
 21532                        .HasColumnType("TEXT");
 21533
 21534                    b.Property<string>("Name")
 21535                        .HasColumnType("TEXT");
 21536
 21537                    b.Property<long>("StartPositionTicks")
 21538                        .HasColumnType("INTEGER");
 21539
 21540                    b.HasKey("ItemId", "ChapterIndex");
 21541
 21542                    b.ToTable("Chapters");
 21543
 21544                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21545                });
 546
 21547            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21548                {
 21549                    b.Property<int>("Id")
 21550                        .ValueGeneratedOnAdd()
 21551                        .HasColumnType("INTEGER");
 21552
 21553                    b.Property<string>("Client")
 21554                        .IsRequired()
 21555                        .HasMaxLength(32)
 21556                        .HasColumnType("TEXT");
 21557
 21558                    b.Property<Guid>("ItemId")
 21559                        .HasColumnType("TEXT");
 21560
 21561                    b.Property<string>("Key")
 21562                        .IsRequired()
 21563                        .HasColumnType("TEXT");
 21564
 21565                    b.Property<Guid>("UserId")
 21566                        .HasColumnType("TEXT");
 21567
 21568                    b.Property<string>("Value")
 21569                        .HasColumnType("TEXT");
 21570
 21571                    b.HasKey("Id");
 21572
 21573                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21574                        .IsUnique();
 21575
 21576                    b.ToTable("CustomItemDisplayPreferences");
 21577
 21578                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21579                });
 580
 21581            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21582                {
 21583                    b.Property<int>("Id")
 21584                        .ValueGeneratedOnAdd()
 21585                        .HasColumnType("INTEGER");
 21586
 21587                    b.Property<int>("ChromecastVersion")
 21588                        .HasColumnType("INTEGER");
 21589
 21590                    b.Property<string>("Client")
 21591                        .IsRequired()
 21592                        .HasMaxLength(32)
 21593                        .HasColumnType("TEXT");
 21594
 21595                    b.Property<string>("DashboardTheme")
 21596                        .HasMaxLength(32)
 21597                        .HasColumnType("TEXT");
 21598
 21599                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21600                        .HasColumnType("INTEGER");
 21601
 21602                    b.Property<int?>("IndexBy")
 21603                        .HasColumnType("INTEGER");
 21604
 21605                    b.Property<Guid>("ItemId")
 21606                        .HasColumnType("TEXT");
 21607
 21608                    b.Property<int>("ScrollDirection")
 21609                        .HasColumnType("INTEGER");
 21610
 21611                    b.Property<bool>("ShowBackdrop")
 21612                        .HasColumnType("INTEGER");
 21613
 21614                    b.Property<bool>("ShowSidebar")
 21615                        .HasColumnType("INTEGER");
 21616
 21617                    b.Property<int>("SkipBackwardLength")
 21618                        .HasColumnType("INTEGER");
 21619
 21620                    b.Property<int>("SkipForwardLength")
 21621                        .HasColumnType("INTEGER");
 21622
 21623                    b.Property<string>("TvHome")
 21624                        .HasMaxLength(32)
 21625                        .HasColumnType("TEXT");
 21626
 21627                    b.Property<Guid>("UserId")
 21628                        .HasColumnType("TEXT");
 21629
 21630                    b.HasKey("Id");
 21631
 21632                    b.HasIndex("UserId", "ItemId", "Client")
 21633                        .IsUnique();
 21634
 21635                    b.ToTable("DisplayPreferences");
 21636
 21637                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21638                });
 639
 21640            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21641                {
 21642                    b.Property<int>("Id")
 21643                        .ValueGeneratedOnAdd()
 21644                        .HasColumnType("INTEGER");
 21645
 21646                    b.Property<int>("DisplayPreferencesId")
 21647                        .HasColumnType("INTEGER");
 21648
 21649                    b.Property<int>("Order")
 21650                        .HasColumnType("INTEGER");
 21651
 21652                    b.Property<int>("Type")
 21653                        .HasColumnType("INTEGER");
 21654
 21655                    b.HasKey("Id");
 21656
 21657                    b.HasIndex("DisplayPreferencesId");
 21658
 21659                    b.ToTable("HomeSection");
 21660
 21661                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21662                });
 663
 21664            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21665                {
 21666                    b.Property<int>("Id")
 21667                        .ValueGeneratedOnAdd()
 21668                        .HasColumnType("INTEGER");
 21669
 21670                    b.Property<DateTime>("LastModified")
 21671                        .HasColumnType("TEXT");
 21672
 21673                    b.Property<string>("Path")
 21674                        .IsRequired()
 21675                        .HasMaxLength(512)
 21676                        .HasColumnType("TEXT");
 21677
 21678                    b.Property<Guid?>("UserId")
 21679                        .HasColumnType("TEXT");
 21680
 21681                    b.HasKey("Id");
 21682
 21683                    b.HasIndex("UserId")
 21684                        .IsUnique();
 21685
 21686                    b.ToTable("ImageInfos");
 21687
 21688                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21689                });
 690
 21691            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21692                {
 21693                    b.Property<int>("Id")
 21694                        .ValueGeneratedOnAdd()
 21695                        .HasColumnType("INTEGER");
 21696
 21697                    b.Property<string>("Client")
 21698                        .IsRequired()
 21699                        .HasMaxLength(32)
 21700                        .HasColumnType("TEXT");
 21701
 21702                    b.Property<int?>("IndexBy")
 21703                        .HasColumnType("INTEGER");
 21704
 21705                    b.Property<Guid>("ItemId")
 21706                        .HasColumnType("TEXT");
 21707
 21708                    b.Property<bool>("RememberIndexing")
 21709                        .HasColumnType("INTEGER");
 21710
 21711                    b.Property<bool>("RememberSorting")
 21712                        .HasColumnType("INTEGER");
 21713
 21714                    b.Property<string>("SortBy")
 21715                        .IsRequired()
 21716                        .HasMaxLength(64)
 21717                        .HasColumnType("TEXT");
 21718
 21719                    b.Property<int>("SortOrder")
 21720                        .HasColumnType("INTEGER");
 21721
 21722                    b.Property<Guid>("UserId")
 21723                        .HasColumnType("TEXT");
 21724
 21725                    b.Property<int>("ViewType")
 21726                        .HasColumnType("INTEGER");
 21727
 21728                    b.HasKey("Id");
 21729
 21730                    b.HasIndex("UserId");
 21731
 21732                    b.ToTable("ItemDisplayPreferences");
 21733
 21734                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21735                });
 736
 21737            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21738                {
 21739                    b.Property<Guid>("ItemValueId")
 21740                        .ValueGeneratedOnAdd()
 21741                        .HasColumnType("TEXT");
 21742
 21743                    b.Property<string>("CleanValue")
 21744                        .IsRequired()
 21745                        .HasColumnType("TEXT");
 21746
 21747                    b.Property<int>("Type")
 21748                        .HasColumnType("INTEGER");
 21749
 21750                    b.Property<string>("Value")
 21751                        .IsRequired()
 21752                        .HasColumnType("TEXT");
 21753
 21754                    b.HasKey("ItemValueId");
 21755
 21756                    b.HasIndex("Type", "CleanValue");
 21757
 21758                    b.HasIndex("Type", "Value")
 21759                        .IsUnique();
 21760
 21761                    b.ToTable("ItemValues");
 21762
 21763                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21764                });
 765
 21766            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21767                {
 21768                    b.Property<Guid>("ItemValueId")
 21769                        .HasColumnType("TEXT");
 21770
 21771                    b.Property<Guid>("ItemId")
 21772                        .HasColumnType("TEXT");
 21773
 21774                    b.HasKey("ItemValueId", "ItemId");
 21775
 21776                    b.HasIndex("ItemId");
 21777
 21778                    b.ToTable("ItemValuesMap");
 21779
 21780                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21781                });
 782
 21783            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21784                {
 21785                    b.Property<Guid>("ItemId")
 21786                        .HasColumnType("TEXT");
 21787
 21788                    b.PrimitiveCollection<string>("KeyframeTicks")
 21789                        .HasColumnType("TEXT");
 21790
 21791                    b.Property<long>("TotalDuration")
 21792                        .HasColumnType("INTEGER");
 21793
 21794                    b.HasKey("ItemId");
 21795
 21796                    b.ToTable("KeyframeData");
 21797
 21798                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21799                });
 800
 21801            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 21802                {
 21803                    b.Property<Guid>("ParentId")
 21804                        .HasColumnType("TEXT");
 21805
 21806                    b.Property<Guid>("ChildId")
 21807                        .HasColumnType("TEXT");
 21808
 21809                    b.Property<int>("ChildType")
 21810                        .HasColumnType("INTEGER");
 21811
 21812                    b.Property<int?>("SortOrder")
 21813                        .HasColumnType("INTEGER");
 21814
 21815                    b.HasKey("ParentId", "ChildId");
 21816
 21817                    b.HasIndex("ChildId");
 21818
 21819                    b.HasIndex("ParentId");
 21820
 21821                    b.HasIndex("ChildId", "ChildType");
 21822
 21823                    b.HasIndex("ParentId", "ChildType");
 21824
 21825                    b.HasIndex("ParentId", "SortOrder");
 21826
 21827                    b.ToTable("LinkedChildren", (string)null);
 21828
 21829                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21830                });
 831
 21832            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21833                {
 21834                    b.Property<Guid>("Id")
 21835                        .ValueGeneratedOnAdd()
 21836                        .HasColumnType("TEXT");
 21837
 21838                    b.Property<long>("EndTicks")
 21839                        .HasColumnType("INTEGER");
 21840
 21841                    b.Property<Guid>("ItemId")
 21842                        .HasColumnType("TEXT");
 21843
 21844                    b.Property<string>("SegmentProviderId")
 21845                        .IsRequired()
 21846                        .HasColumnType("TEXT");
 21847
 21848                    b.Property<long>("StartTicks")
 21849                        .HasColumnType("INTEGER");
 21850
 21851                    b.Property<int>("Type")
 21852                        .HasColumnType("INTEGER");
 21853
 21854                    b.HasKey("Id");
 21855
 21856                    b.ToTable("MediaSegments");
 21857
 21858                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21859                });
 860
 21861            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21862                {
 21863                    b.Property<Guid>("ItemId")
 21864                        .HasColumnType("TEXT");
 21865
 21866                    b.Property<int>("StreamIndex")
 21867                        .HasColumnType("INTEGER");
 21868
 21869                    b.Property<string>("AspectRatio")
 21870                        .HasColumnType("TEXT");
 21871
 21872                    b.Property<float?>("AverageFrameRate")
 21873                        .HasColumnType("REAL");
 21874
 21875                    b.Property<int?>("BitDepth")
 21876                        .HasColumnType("INTEGER");
 21877
 21878                    b.Property<int?>("BitRate")
 21879                        .HasColumnType("INTEGER");
 21880
 21881                    b.Property<int?>("BlPresentFlag")
 21882                        .HasColumnType("INTEGER");
 21883
 21884                    b.Property<string>("ChannelLayout")
 21885                        .HasColumnType("TEXT");
 21886
 21887                    b.Property<int?>("Channels")
 21888                        .HasColumnType("INTEGER");
 21889
 21890                    b.Property<string>("Codec")
 21891                        .HasColumnType("TEXT");
 21892
 21893                    b.Property<string>("CodecTag")
 21894                        .HasColumnType("TEXT");
 21895
 21896                    b.Property<string>("CodecTimeBase")
 21897                        .HasColumnType("TEXT");
 21898
 21899                    b.Property<string>("ColorPrimaries")
 21900                        .HasColumnType("TEXT");
 21901
 21902                    b.Property<string>("ColorSpace")
 21903                        .HasColumnType("TEXT");
 21904
 21905                    b.Property<string>("ColorTransfer")
 21906                        .HasColumnType("TEXT");
 21907
 21908                    b.Property<string>("Comment")
 21909                        .HasColumnType("TEXT");
 21910
 21911                    b.Property<int?>("DvBlSignalCompatibilityId")
 21912                        .HasColumnType("INTEGER");
 21913
 21914                    b.Property<int?>("DvLevel")
 21915                        .HasColumnType("INTEGER");
 21916
 21917                    b.Property<int?>("DvProfile")
 21918                        .HasColumnType("INTEGER");
 21919
 21920                    b.Property<int?>("DvVersionMajor")
 21921                        .HasColumnType("INTEGER");
 21922
 21923                    b.Property<int?>("DvVersionMinor")
 21924                        .HasColumnType("INTEGER");
 21925
 21926                    b.Property<int?>("ElPresentFlag")
 21927                        .HasColumnType("INTEGER");
 21928
 21929                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21930                        .HasColumnType("INTEGER");
 21931
 21932                    b.Property<int?>("Height")
 21933                        .HasColumnType("INTEGER");
 21934
 21935                    b.Property<bool?>("IsAnamorphic")
 21936                        .HasColumnType("INTEGER");
 21937
 21938                    b.Property<bool?>("IsAvc")
 21939                        .HasColumnType("INTEGER");
 21940
 21941                    b.Property<bool>("IsDefault")
 21942                        .HasColumnType("INTEGER");
 21943
 21944                    b.Property<bool>("IsExternal")
 21945                        .HasColumnType("INTEGER");
 21946
 21947                    b.Property<bool>("IsForced")
 21948                        .HasColumnType("INTEGER");
 21949
 21950                    b.Property<bool?>("IsHearingImpaired")
 21951                        .HasColumnType("INTEGER");
 21952
 21953                    b.Property<bool?>("IsInterlaced")
 21954                        .HasColumnType("INTEGER");
 21955
 21956                    b.Property<string>("KeyFrames")
 21957                        .HasColumnType("TEXT");
 21958
 21959                    b.Property<string>("Language")
 21960                        .HasColumnType("TEXT");
 21961
 21962                    b.Property<float?>("Level")
 21963                        .HasColumnType("REAL");
 21964
 21965                    b.Property<string>("NalLengthSize")
 21966                        .HasColumnType("TEXT");
 21967
 21968                    b.Property<string>("Path")
 21969                        .HasColumnType("TEXT");
 21970
 21971                    b.Property<string>("PixelFormat")
 21972                        .HasColumnType("TEXT");
 21973
 21974                    b.Property<string>("Profile")
 21975                        .HasColumnType("TEXT");
 21976
 21977                    b.Property<float?>("RealFrameRate")
 21978                        .HasColumnType("REAL");
 21979
 21980                    b.Property<int?>("RefFrames")
 21981                        .HasColumnType("INTEGER");
 21982
 21983                    b.Property<int?>("Rotation")
 21984                        .HasColumnType("INTEGER");
 21985
 21986                    b.Property<int?>("RpuPresentFlag")
 21987                        .HasColumnType("INTEGER");
 21988
 21989                    b.Property<int?>("SampleRate")
 21990                        .HasColumnType("INTEGER");
 21991
 21992                    b.Property<int>("StreamType")
 21993                        .HasColumnType("INTEGER");
 21994
 21995                    b.Property<string>("TimeBase")
 21996                        .HasColumnType("TEXT");
 21997
 21998                    b.Property<string>("Title")
 21999                        .HasColumnType("TEXT");
 211000
 211001                    b.Property<int?>("Width")
 211002                        .HasColumnType("INTEGER");
 211003
 211004                    b.HasKey("ItemId", "StreamIndex");
 211005
 211006                    b.HasIndex("StreamIndex");
 211007
 211008                    b.HasIndex("StreamType");
 211009
 211010                    b.HasIndex("StreamIndex", "StreamType");
 211011
 211012                    b.HasIndex("StreamIndex", "StreamType", "Language");
 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("DeviceId");
 211218
 211219                    b.HasIndex("AccessToken", "DateLastActivity");
 211220
 211221                    b.HasIndex("DeviceId", "DateLastActivity");
 211222
 211223                    b.HasIndex("UserId", "DeviceId");
 211224
 211225                    b.ToTable("Devices");
 211226
 211227                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211228                });
 1229
 211230            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211231                {
 211232                    b.Property<int>("Id")
 211233                        .ValueGeneratedOnAdd()
 211234                        .HasColumnType("INTEGER");
 211235
 211236                    b.Property<string>("CustomName")
 211237                        .HasColumnType("TEXT");
 211238
 211239                    b.Property<string>("DeviceId")
 211240                        .IsRequired()
 211241                        .HasColumnType("TEXT");
 211242
 211243                    b.HasKey("Id");
 211244
 211245                    b.HasIndex("DeviceId")
 211246                        .IsUnique();
 211247
 211248                    b.ToTable("DeviceOptions");
 211249
 211250                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211251                });
 1252
 211253            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211254                {
 211255                    b.Property<Guid>("ItemId")
 211256                        .HasColumnType("TEXT");
 211257
 211258                    b.Property<int>("Width")
 211259                        .HasColumnType("INTEGER");
 211260
 211261                    b.Property<int>("Bandwidth")
 211262                        .HasColumnType("INTEGER");
 211263
 211264                    b.Property<int>("Height")
 211265                        .HasColumnType("INTEGER");
 211266
 211267                    b.Property<int>("Interval")
 211268                        .HasColumnType("INTEGER");
 211269
 211270                    b.Property<int>("ThumbnailCount")
 211271                        .HasColumnType("INTEGER");
 211272
 211273                    b.Property<int>("TileHeight")
 211274                        .HasColumnType("INTEGER");
 211275
 211276                    b.Property<int>("TileWidth")
 211277                        .HasColumnType("INTEGER");
 211278
 211279                    b.HasKey("ItemId", "Width");
 211280
 211281                    b.ToTable("TrickplayInfos");
 211282
 211283                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211284                });
 1285
 211286            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211287                {
 211288                    b.Property<Guid>("Id")
 211289                        .ValueGeneratedOnAdd()
 211290                        .HasColumnType("TEXT");
 211291
 211292                    b.Property<string>("AudioLanguagePreference")
 211293                        .HasMaxLength(255)
 211294                        .HasColumnType("TEXT");
 211295
 211296                    b.Property<string>("AuthenticationProviderId")
 211297                        .IsRequired()
 211298                        .HasMaxLength(255)
 211299                        .HasColumnType("TEXT");
 211300
 211301                    b.Property<string>("CastReceiverId")
 211302                        .HasMaxLength(32)
 211303                        .HasColumnType("TEXT");
 211304
 211305                    b.Property<bool>("DisplayCollectionsView")
 211306                        .HasColumnType("INTEGER");
 211307
 211308                    b.Property<bool>("DisplayMissingEpisodes")
 211309                        .HasColumnType("INTEGER");
 211310
 211311                    b.Property<bool>("EnableAutoLogin")
 211312                        .HasColumnType("INTEGER");
 211313
 211314                    b.Property<bool>("EnableLocalPassword")
 211315                        .HasColumnType("INTEGER");
 211316
 211317                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211318                        .HasColumnType("INTEGER");
 211319
 211320                    b.Property<bool>("EnableUserPreferenceAccess")
 211321                        .HasColumnType("INTEGER");
 211322
 211323                    b.Property<bool>("HidePlayedInLatest")
 211324                        .HasColumnType("INTEGER");
 211325
 211326                    b.Property<long>("InternalId")
 211327                        .HasColumnType("INTEGER");
 211328
 211329                    b.Property<int>("InvalidLoginAttemptCount")
 211330                        .HasColumnType("INTEGER");
 211331
 211332                    b.Property<DateTime?>("LastActivityDate")
 211333                        .HasColumnType("TEXT");
 211334
 211335                    b.Property<DateTime?>("LastLoginDate")
 211336                        .HasColumnType("TEXT");
 211337
 211338                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211339                        .HasColumnType("INTEGER");
 211340
 211341                    b.Property<int>("MaxActiveSessions")
 211342                        .HasColumnType("INTEGER");
 211343
 211344                    b.Property<int?>("MaxParentalRatingScore")
 211345                        .HasColumnType("INTEGER");
 211346
 211347                    b.Property<int?>("MaxParentalRatingSubScore")
 211348                        .HasColumnType("INTEGER");
 211349
 211350                    b.Property<bool>("MustUpdatePassword")
 211351                        .HasColumnType("INTEGER");
 211352
 211353                    b.Property<string>("Password")
 211354                        .HasMaxLength(65535)
 211355                        .HasColumnType("TEXT");
 211356
 211357                    b.Property<string>("PasswordResetProviderId")
 211358                        .IsRequired()
 211359                        .HasMaxLength(255)
 211360                        .HasColumnType("TEXT");
 211361
 211362                    b.Property<bool>("PlayDefaultAudioTrack")
 211363                        .HasColumnType("INTEGER");
 211364
 211365                    b.Property<bool>("RememberAudioSelections")
 211366                        .HasColumnType("INTEGER");
 211367
 211368                    b.Property<bool>("RememberSubtitleSelections")
 211369                        .HasColumnType("INTEGER");
 211370
 211371                    b.Property<int?>("RemoteClientBitrateLimit")
 211372                        .HasColumnType("INTEGER");
 211373
 211374                    b.Property<uint>("RowVersion")
 211375                        .IsConcurrencyToken()
 211376                        .HasColumnType("INTEGER");
 211377
 211378                    b.Property<string>("SubtitleLanguagePreference")
 211379                        .HasMaxLength(255)
 211380                        .HasColumnType("TEXT");
 211381
 211382                    b.Property<int>("SubtitleMode")
 211383                        .HasColumnType("INTEGER");
 211384
 211385                    b.Property<int>("SyncPlayAccess")
 211386                        .HasColumnType("INTEGER");
 211387
 211388                    b.Property<string>("Username")
 211389                        .IsRequired()
 211390                        .HasMaxLength(255)
 211391                        .HasColumnType("TEXT");
 211392
 211393                    b.HasKey("Id");
 211394
 211395                    b.HasIndex("Username")
 211396                        .IsUnique();
 211397
 211398                    b.ToTable("Users");
 211399
 211400                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211401                });
 1402
 211403            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211404                {
 211405                    b.Property<Guid>("ItemId")
 211406                        .HasColumnType("TEXT");
 211407
 211408                    b.Property<Guid>("UserId")
 211409                        .HasColumnType("TEXT");
 211410
 211411                    b.Property<string>("CustomDataKey")
 211412                        .HasColumnType("TEXT");
 211413
 211414                    b.Property<int?>("AudioStreamIndex")
 211415                        .HasColumnType("INTEGER");
 211416
 211417                    b.Property<bool>("IsFavorite")
 211418                        .HasColumnType("INTEGER");
 211419
 211420                    b.Property<DateTime?>("LastPlayedDate")
 211421                        .HasColumnType("TEXT");
 211422
 211423                    b.Property<bool?>("Likes")
 211424                        .HasColumnType("INTEGER");
 211425
 211426                    b.Property<int>("PlayCount")
 211427                        .HasColumnType("INTEGER");
 211428
 211429                    b.Property<long>("PlaybackPositionTicks")
 211430                        .HasColumnType("INTEGER");
 211431
 211432                    b.Property<bool>("Played")
 211433                        .HasColumnType("INTEGER");
 211434
 211435                    b.Property<double?>("Rating")
 211436                        .HasColumnType("REAL");
 211437
 211438                    b.Property<DateTime?>("RetentionDate")
 211439                        .HasColumnType("TEXT");
 211440
 211441                    b.Property<int?>("SubtitleStreamIndex")
 211442                        .HasColumnType("INTEGER");
 211443
 211444                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211445
 211446                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211447
 211448                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211449
 211450                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211451
 211452                    b.HasIndex("ItemId", "UserId", "Played");
 211453
 211454                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 211455
 211456                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 211457
 211458                    b.HasIndex("UserId", "Played", "ItemId");
 211459
 211460                    b.ToTable("UserData");
 211461
 211462                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211463                });
 1464
 211465            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211466                {
 211467                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211468                        .WithMany("AccessSchedules")
 211469                        .HasForeignKey("UserId")
 211470                        .OnDelete(DeleteBehavior.Cascade)
 211471                        .IsRequired();
 211472                });
 1473
 211474            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211475                {
 211476                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211477                        .WithMany("Parents")
 211478                        .HasForeignKey("ItemId")
 211479                        .OnDelete(DeleteBehavior.Cascade)
 211480                        .IsRequired();
 211481
 211482                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211483                        .WithMany("Children")
 211484                        .HasForeignKey("ParentItemId")
 211485                        .OnDelete(DeleteBehavior.Cascade)
 211486                        .IsRequired();
 211487
 211488                    b.Navigation("Item");
 211489
 211490                    b.Navigation("ParentItem");
 211491                });
 1492
 211493            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211494                {
 211495                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211496                        .WithMany()
 211497                        .HasForeignKey("ItemId")
 211498                        .OnDelete(DeleteBehavior.Cascade)
 211499                        .IsRequired();
 211500
 211501                    b.Navigation("Item");
 211502                });
 1503
 211504            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211505                {
 211506                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 211507                        .WithMany("Extras")
 211508                        .HasForeignKey("OwnerId")
 211509                        .OnDelete(DeleteBehavior.NoAction);
 211510
 211511                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 211512                        .WithMany("DirectChildren")
 211513                        .HasForeignKey("ParentId")
 211514                        .OnDelete(DeleteBehavior.Cascade);
 211515
 211516                    b.Navigation("DirectParent");
 211517
 211518                    b.Navigation("Owner");
 211519                });
 1520
 211521            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211522                {
 211523                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211524                        .WithMany("Images")
 211525                        .HasForeignKey("ItemId")
 211526                        .OnDelete(DeleteBehavior.Cascade)
 211527                        .IsRequired();
 211528
 211529                    b.Navigation("Item");
 211530                });
 1531
 211532            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211533                {
 211534                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211535                        .WithMany("LockedFields")
 211536                        .HasForeignKey("ItemId")
 211537                        .OnDelete(DeleteBehavior.Cascade)
 211538                        .IsRequired();
 211539
 211540                    b.Navigation("Item");
 211541                });
 1542
 211543            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211544                {
 211545                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211546                        .WithMany("Provider")
 211547                        .HasForeignKey("ItemId")
 211548                        .OnDelete(DeleteBehavior.Cascade)
 211549                        .IsRequired();
 211550
 211551                    b.Navigation("Item");
 211552                });
 1553
 211554            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211555                {
 211556                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211557                        .WithMany("TrailerTypes")
 211558                        .HasForeignKey("ItemId")
 211559                        .OnDelete(DeleteBehavior.Cascade)
 211560                        .IsRequired();
 211561
 211562                    b.Navigation("Item");
 211563                });
 1564
 211565            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211566                {
 211567                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211568                        .WithMany("Chapters")
 211569                        .HasForeignKey("ItemId")
 211570                        .OnDelete(DeleteBehavior.Cascade)
 211571                        .IsRequired();
 211572
 211573                    b.Navigation("Item");
 211574                });
 1575
 211576            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211577                {
 211578                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211579                        .WithMany("DisplayPreferences")
 211580                        .HasForeignKey("UserId")
 211581                        .OnDelete(DeleteBehavior.Cascade)
 211582                        .IsRequired();
 211583                });
 1584
 211585            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211586                {
 211587                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211588                        .WithMany("HomeSections")
 211589                        .HasForeignKey("DisplayPreferencesId")
 211590                        .OnDelete(DeleteBehavior.Cascade)
 211591                        .IsRequired();
 211592                });
 1593
 211594            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211595                {
 211596                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211597                        .WithOne("ProfileImage")
 211598                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211599                        .OnDelete(DeleteBehavior.Cascade);
 211600                });
 1601
 211602            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211603                {
 211604                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211605                        .WithMany("ItemDisplayPreferences")
 211606                        .HasForeignKey("UserId")
 211607                        .OnDelete(DeleteBehavior.Cascade)
 211608                        .IsRequired();
 211609                });
 1610
 211611            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211612                {
 211613                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211614                        .WithMany("ItemValues")
 211615                        .HasForeignKey("ItemId")
 211616                        .OnDelete(DeleteBehavior.Cascade)
 211617                        .IsRequired();
 211618
 211619                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211620                        .WithMany("BaseItemsMap")
 211621                        .HasForeignKey("ItemValueId")
 211622                        .OnDelete(DeleteBehavior.Cascade)
 211623                        .IsRequired();
 211624
 211625                    b.Navigation("Item");
 211626
 211627                    b.Navigation("ItemValue");
 211628                });
 1629
 211630            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211631                {
 211632                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211633                        .WithMany()
 211634                        .HasForeignKey("ItemId")
 211635                        .OnDelete(DeleteBehavior.Cascade)
 211636                        .IsRequired();
 211637
 211638                    b.Navigation("Item");
 211639                });
 1640
 211641            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 211642                {
 211643                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 211644                        .WithMany("LinkedChildOfEntities")
 211645                        .HasForeignKey("ChildId")
 211646                        .OnDelete(DeleteBehavior.NoAction)
 211647                        .IsRequired();
 211648
 211649                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 211650                        .WithMany("LinkedChildEntities")
 211651                        .HasForeignKey("ParentId")
 211652                        .OnDelete(DeleteBehavior.NoAction)
 211653                        .IsRequired();
 211654
 211655                    b.Navigation("Child");
 211656
 211657                    b.Navigation("Parent");
 211658                });
 1659
 211660            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211661                {
 211662                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211663                        .WithMany("MediaStreams")
 211664                        .HasForeignKey("ItemId")
 211665                        .OnDelete(DeleteBehavior.Cascade)
 211666                        .IsRequired();
 211667
 211668                    b.Navigation("Item");
 211669                });
 1670
 211671            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211672                {
 211673                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211674                        .WithMany("Peoples")
 211675                        .HasForeignKey("ItemId")
 211676                        .OnDelete(DeleteBehavior.Cascade)
 211677                        .IsRequired();
 211678
 211679                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211680                        .WithMany("BaseItems")
 211681                        .HasForeignKey("PeopleId")
 211682                        .OnDelete(DeleteBehavior.Cascade)
 211683                        .IsRequired();
 211684
 211685                    b.Navigation("Item");
 211686
 211687                    b.Navigation("People");
 211688                });
 1689
 211690            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211691                {
 211692                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211693                        .WithMany("Permissions")
 211694                        .HasForeignKey("UserId")
 211695                        .OnDelete(DeleteBehavior.Cascade);
 211696                });
 1697
 211698            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211699                {
 211700                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211701                        .WithMany("Preferences")
 211702                        .HasForeignKey("UserId")
 211703                        .OnDelete(DeleteBehavior.Cascade);
 211704                });
 1705
 211706            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211707                {
 211708                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211709                        .WithMany()
 211710                        .HasForeignKey("UserId")
 211711                        .OnDelete(DeleteBehavior.Cascade)
 211712                        .IsRequired();
 211713
 211714                    b.Navigation("User");
 211715                });
 1716
 211717            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211718                {
 211719                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211720                        .WithMany("UserData")
 211721                        .HasForeignKey("ItemId")
 211722                        .OnDelete(DeleteBehavior.Cascade)
 211723                        .IsRequired();
 211724
 211725                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211726                        .WithMany()
 211727                        .HasForeignKey("UserId")
 211728                        .OnDelete(DeleteBehavior.Cascade)
 211729                        .IsRequired();
 211730
 211731                    b.Navigation("Item");
 211732
 211733                    b.Navigation("User");
 211734                });
 1735
 211736            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211737                {
 211738                    b.Navigation("Chapters");
 211739
 211740                    b.Navigation("Children");
 211741
 211742                    b.Navigation("DirectChildren");
 211743
 211744                    b.Navigation("Extras");
 211745
 211746                    b.Navigation("Images");
 211747
 211748                    b.Navigation("ItemValues");
 211749
 211750                    b.Navigation("LinkedChildEntities");
 211751
 211752                    b.Navigation("LinkedChildOfEntities");
 211753
 211754                    b.Navigation("LockedFields");
 211755
 211756                    b.Navigation("MediaStreams");
 211757
 211758                    b.Navigation("Parents");
 211759
 211760                    b.Navigation("Peoples");
 211761
 211762                    b.Navigation("Provider");
 211763
 211764                    b.Navigation("TrailerTypes");
 211765
 211766                    b.Navigation("UserData");
 211767                });
 1768
 211769            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211770                {
 211771                    b.Navigation("HomeSections");
 211772                });
 1773
 211774            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211775                {
 211776                    b.Navigation("BaseItemsMap");
 211777                });
 1778
 211779            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211780                {
 211781                    b.Navigation("BaseItems");
 211782                });
 1783
 211784            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211785                {
 211786                    b.Navigation("AccessSchedules");
 211787
 211788                    b.Navigation("DisplayPreferences");
 211789
 211790                    b.Navigation("ItemDisplayPreferences");
 211791
 211792                    b.Navigation("Permissions");
 211793
 211794                    b.Navigation("Preferences");
 211795
 211796                    b.Navigation("ProfileImage");
 211797                });
 1798#pragma warning restore 612, 618
 211799        }
 1800    }
 1801}