< Summary - Jellyfin

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

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/20260308123920_AddTypeCleanNameIndex.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 AddTypeCleanNameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.CreateIndex(
 2114                name: "IX_BaseItems_Type_CleanName",
 2115                table: "BaseItems",
 2116                columns: new[] { "Type", "CleanName" });
 2117        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_BaseItems_Type_CleanName",
 024                table: "BaseItems");
 025        }
 26    }
 27}

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