< Summary - Jellyfin

Line coverage
99%
Covered lines: 1732
Uncovered lines: 4
Coverable lines: 1736
Total lines: 1835
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/27/2026 - 12:15:38 AM Line coverage: 99.7% (1732/1736) Total lines: 1835

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/20260524120336_AddUniqueNormalizedUsernameIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddUniqueNormalizedUsernameIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.CreateIndex(
 2114                name: "IX_Users_NormalizedUsername",
 2115                table: "Users",
 2116                column: "NormalizedUsername",
 2117                unique: true);
 2118        }
 19
 20        /// <inheritdoc />
 21        protected override void Down(MigrationBuilder migrationBuilder)
 22        {
 023            migrationBuilder.DropIndex(
 024                name: "IX_Users_NormalizedUsername",
 025                table: "Users");
 026        }
 27    }
 28}

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