< Summary - Jellyfin

Line coverage
99%
Covered lines: 1629
Uncovered lines: 12
Coverable lines: 1641
Total lines: 1741
Line coverage: 99.2%
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

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/20250405075612_FixItemValuesIndices.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixItemValuesIndices : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.DropIndex(
 2114                name: "IX_ItemValues_Type_CleanValue",
 2115                table: "ItemValues");
 16
 2117            migrationBuilder.CreateIndex(
 2118                name: "IX_ItemValues_Type_CleanValue",
 2119                table: "ItemValues",
 2120                columns: new[] { "Type", "CleanValue" });
 21
 2122            migrationBuilder.CreateIndex(
 2123                name: "IX_ItemValues_Type_Value",
 2124                table: "ItemValues",
 2125                columns: new[] { "Type", "Value" },
 2126                unique: true);
 2127        }
 28
 29        /// <inheritdoc />
 30        protected override void Down(MigrationBuilder migrationBuilder)
 31        {
 032            migrationBuilder.DropIndex(
 033                name: "IX_ItemValues_Type_CleanValue",
 034                table: "ItemValues");
 35
 036            migrationBuilder.DropIndex(
 037                name: "IX_ItemValues_Type_Value",
 038                table: "ItemValues");
 39
 040            migrationBuilder.CreateIndex(
 041                name: "IX_ItemValues_Type_CleanValue",
 042                table: "ItemValues",
 043                columns: new[] { "Type", "CleanValue" },
 044                unique: true);
 045        }
 46    }
 47}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250405075612_FixItemValuesIndices.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("20250405075612_FixItemValuesIndices")]
 15    partial class FixItemValuesIndices
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2121            modelBuilder.HasAnnotation("ProductVersion", "9.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?>("DateCreatedFilesystem")
 21187                        .HasColumnType("TEXT");
 21188
 21189                    b.Property<DateTime?>("DateLastMediaAdded")
 21190                        .HasColumnType("TEXT");
 21191
 21192                    b.Property<DateTime?>("DateLastRefreshed")
 21193                        .HasColumnType("TEXT");
 21194
 21195                    b.Property<DateTime?>("DateLastSaved")
 21196                        .HasColumnType("TEXT");
 21197
 21198                    b.Property<DateTime?>("DateModified")
 21199                        .HasColumnType("TEXT");
 21200
 21201                    b.Property<DateTime?>("EndDate")
 21202                        .HasColumnType("TEXT");
 21203
 21204                    b.Property<string>("EpisodeTitle")
 21205                        .HasColumnType("TEXT");
 21206
 21207                    b.Property<string>("ExternalId")
 21208                        .HasColumnType("TEXT");
 21209
 21210                    b.Property<string>("ExternalSeriesId")
 21211                        .HasColumnType("TEXT");
 21212
 21213                    b.Property<string>("ExternalServiceId")
 21214                        .HasColumnType("TEXT");
 21215
 21216                    b.Property<string>("ExtraIds")
 21217                        .HasColumnType("TEXT");
 21218
 21219                    b.Property<int?>("ExtraType")
 21220                        .HasColumnType("INTEGER");
 21221
 21222                    b.Property<string>("ForcedSortName")
 21223                        .HasColumnType("TEXT");
 21224
 21225                    b.Property<string>("Genres")
 21226                        .HasColumnType("TEXT");
 21227
 21228                    b.Property<int?>("Height")
 21229                        .HasColumnType("INTEGER");
 21230
 21231                    b.Property<int?>("IndexNumber")
 21232                        .HasColumnType("INTEGER");
 21233
 21234                    b.Property<int?>("InheritedParentalRatingSubValue")
 21235                        .HasColumnType("INTEGER");
 21236
 21237                    b.Property<int?>("InheritedParentalRatingValue")
 21238                        .HasColumnType("INTEGER");
 21239
 21240                    b.Property<bool>("IsFolder")
 21241                        .HasColumnType("INTEGER");
 21242
 21243                    b.Property<bool>("IsInMixedFolder")
 21244                        .HasColumnType("INTEGER");
 21245
 21246                    b.Property<bool>("IsLocked")
 21247                        .HasColumnType("INTEGER");
 21248
 21249                    b.Property<bool>("IsMovie")
 21250                        .HasColumnType("INTEGER");
 21251
 21252                    b.Property<bool>("IsRepeat")
 21253                        .HasColumnType("INTEGER");
 21254
 21255                    b.Property<bool>("IsSeries")
 21256                        .HasColumnType("INTEGER");
 21257
 21258                    b.Property<bool>("IsVirtualItem")
 21259                        .HasColumnType("INTEGER");
 21260
 21261                    b.Property<float?>("LUFS")
 21262                        .HasColumnType("REAL");
 21263
 21264                    b.Property<string>("MediaType")
 21265                        .HasColumnType("TEXT");
 21266
 21267                    b.Property<string>("Name")
 21268                        .HasColumnType("TEXT");
 21269
 21270                    b.Property<float?>("NormalizationGain")
 21271                        .HasColumnType("REAL");
 21272
 21273                    b.Property<string>("OfficialRating")
 21274                        .HasColumnType("TEXT");
 21275
 21276                    b.Property<string>("OriginalTitle")
 21277                        .HasColumnType("TEXT");
 21278
 21279                    b.Property<string>("Overview")
 21280                        .HasColumnType("TEXT");
 21281
 21282                    b.Property<string>("OwnerId")
 21283                        .HasColumnType("TEXT");
 21284
 21285                    b.Property<Guid?>("ParentId")
 21286                        .HasColumnType("TEXT");
 21287
 21288                    b.Property<int?>("ParentIndexNumber")
 21289                        .HasColumnType("INTEGER");
 21290
 21291                    b.Property<string>("Path")
 21292                        .HasColumnType("TEXT");
 21293
 21294                    b.Property<string>("PreferredMetadataCountryCode")
 21295                        .HasColumnType("TEXT");
 21296
 21297                    b.Property<string>("PreferredMetadataLanguage")
 21298                        .HasColumnType("TEXT");
 21299
 21300                    b.Property<DateTime?>("PremiereDate")
 21301                        .HasColumnType("TEXT");
 21302
 21303                    b.Property<string>("PresentationUniqueKey")
 21304                        .HasColumnType("TEXT");
 21305
 21306                    b.Property<string>("PrimaryVersionId")
 21307                        .HasColumnType("TEXT");
 21308
 21309                    b.Property<string>("ProductionLocations")
 21310                        .HasColumnType("TEXT");
 21311
 21312                    b.Property<int?>("ProductionYear")
 21313                        .HasColumnType("INTEGER");
 21314
 21315                    b.Property<long?>("RunTimeTicks")
 21316                        .HasColumnType("INTEGER");
 21317
 21318                    b.Property<Guid?>("SeasonId")
 21319                        .HasColumnType("TEXT");
 21320
 21321                    b.Property<string>("SeasonName")
 21322                        .HasColumnType("TEXT");
 21323
 21324                    b.Property<Guid?>("SeriesId")
 21325                        .HasColumnType("TEXT");
 21326
 21327                    b.Property<string>("SeriesName")
 21328                        .HasColumnType("TEXT");
 21329
 21330                    b.Property<string>("SeriesPresentationUniqueKey")
 21331                        .HasColumnType("TEXT");
 21332
 21333                    b.Property<string>("ShowId")
 21334                        .HasColumnType("TEXT");
 21335
 21336                    b.Property<long?>("Size")
 21337                        .HasColumnType("INTEGER");
 21338
 21339                    b.Property<string>("SortName")
 21340                        .HasColumnType("TEXT");
 21341
 21342                    b.Property<DateTime?>("StartDate")
 21343                        .HasColumnType("TEXT");
 21344
 21345                    b.Property<string>("Studios")
 21346                        .HasColumnType("TEXT");
 21347
 21348                    b.Property<string>("Tagline")
 21349                        .HasColumnType("TEXT");
 21350
 21351                    b.Property<string>("Tags")
 21352                        .HasColumnType("TEXT");
 21353
 21354                    b.Property<Guid?>("TopParentId")
 21355                        .HasColumnType("TEXT");
 21356
 21357                    b.Property<int?>("TotalBitrate")
 21358                        .HasColumnType("INTEGER");
 21359
 21360                    b.Property<string>("Type")
 21361                        .IsRequired()
 21362                        .HasColumnType("TEXT");
 21363
 21364                    b.Property<string>("UnratedType")
 21365                        .HasColumnType("TEXT");
 21366
 21367                    b.Property<int?>("Width")
 21368                        .HasColumnType("INTEGER");
 21369
 21370                    b.HasKey("Id");
 21371
 21372                    b.HasIndex("ParentId");
 21373
 21374                    b.HasIndex("Path");
 21375
 21376                    b.HasIndex("PresentationUniqueKey");
 21377
 21378                    b.HasIndex("TopParentId", "Id");
 21379
 21380                    b.HasIndex("Type", "TopParentId", "Id");
 21381
 21382                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21383
 21384                    b.HasIndex("Type", "TopParentId", "StartDate");
 21385
 21386                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 21387
 21388                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21389
 21390                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21391
 21392                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21393
 21394                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21395
 21396                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21397
 21398                    b.ToTable("BaseItems");
 21399
 21400                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21401                });
 402
 21403            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21404                {
 21405                    b.Property<Guid>("Id")
 21406                        .ValueGeneratedOnAdd()
 21407                        .HasColumnType("TEXT");
 21408
 21409                    b.Property<byte[]>("Blurhash")
 21410                        .HasColumnType("BLOB");
 21411
 21412                    b.Property<DateTime>("DateModified")
 21413                        .HasColumnType("TEXT");
 21414
 21415                    b.Property<int>("Height")
 21416                        .HasColumnType("INTEGER");
 21417
 21418                    b.Property<int>("ImageType")
 21419                        .HasColumnType("INTEGER");
 21420
 21421                    b.Property<Guid>("ItemId")
 21422                        .HasColumnType("TEXT");
 21423
 21424                    b.Property<string>("Path")
 21425                        .IsRequired()
 21426                        .HasColumnType("TEXT");
 21427
 21428                    b.Property<int>("Width")
 21429                        .HasColumnType("INTEGER");
 21430
 21431                    b.HasKey("Id");
 21432
 21433                    b.HasIndex("ItemId");
 21434
 21435                    b.ToTable("BaseItemImageInfos");
 21436
 21437                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21438                });
 439
 21440            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21441                {
 21442                    b.Property<int>("Id")
 21443                        .HasColumnType("INTEGER");
 21444
 21445                    b.Property<Guid>("ItemId")
 21446                        .HasColumnType("TEXT");
 21447
 21448                    b.HasKey("Id", "ItemId");
 21449
 21450                    b.HasIndex("ItemId");
 21451
 21452                    b.ToTable("BaseItemMetadataFields");
 21453
 21454                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21455                });
 456
 21457            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21458                {
 21459                    b.Property<Guid>("ItemId")
 21460                        .HasColumnType("TEXT");
 21461
 21462                    b.Property<string>("ProviderId")
 21463                        .HasColumnType("TEXT");
 21464
 21465                    b.Property<string>("ProviderValue")
 21466                        .IsRequired()
 21467                        .HasColumnType("TEXT");
 21468
 21469                    b.HasKey("ItemId", "ProviderId");
 21470
 21471                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21472
 21473                    b.ToTable("BaseItemProviders");
 21474
 21475                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21476                });
 477
 21478            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21479                {
 21480                    b.Property<int>("Id")
 21481                        .HasColumnType("INTEGER");
 21482
 21483                    b.Property<Guid>("ItemId")
 21484                        .HasColumnType("TEXT");
 21485
 21486                    b.HasKey("Id", "ItemId");
 21487
 21488                    b.HasIndex("ItemId");
 21489
 21490                    b.ToTable("BaseItemTrailerTypes");
 21491
 21492                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21493                });
 494
 21495            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21496                {
 21497                    b.Property<Guid>("ItemId")
 21498                        .HasColumnType("TEXT");
 21499
 21500                    b.Property<int>("ChapterIndex")
 21501                        .HasColumnType("INTEGER");
 21502
 21503                    b.Property<DateTime?>("ImageDateModified")
 21504                        .HasColumnType("TEXT");
 21505
 21506                    b.Property<string>("ImagePath")
 21507                        .HasColumnType("TEXT");
 21508
 21509                    b.Property<string>("Name")
 21510                        .HasColumnType("TEXT");
 21511
 21512                    b.Property<long>("StartPositionTicks")
 21513                        .HasColumnType("INTEGER");
 21514
 21515                    b.HasKey("ItemId", "ChapterIndex");
 21516
 21517                    b.ToTable("Chapters");
 21518
 21519                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21520                });
 521
 21522            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21523                {
 21524                    b.Property<int>("Id")
 21525                        .ValueGeneratedOnAdd()
 21526                        .HasColumnType("INTEGER");
 21527
 21528                    b.Property<string>("Client")
 21529                        .IsRequired()
 21530                        .HasMaxLength(32)
 21531                        .HasColumnType("TEXT");
 21532
 21533                    b.Property<Guid>("ItemId")
 21534                        .HasColumnType("TEXT");
 21535
 21536                    b.Property<string>("Key")
 21537                        .IsRequired()
 21538                        .HasColumnType("TEXT");
 21539
 21540                    b.Property<Guid>("UserId")
 21541                        .HasColumnType("TEXT");
 21542
 21543                    b.Property<string>("Value")
 21544                        .HasColumnType("TEXT");
 21545
 21546                    b.HasKey("Id");
 21547
 21548                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21549                        .IsUnique();
 21550
 21551                    b.ToTable("CustomItemDisplayPreferences");
 21552
 21553                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21554                });
 555
 21556            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21557                {
 21558                    b.Property<int>("Id")
 21559                        .ValueGeneratedOnAdd()
 21560                        .HasColumnType("INTEGER");
 21561
 21562                    b.Property<int>("ChromecastVersion")
 21563                        .HasColumnType("INTEGER");
 21564
 21565                    b.Property<string>("Client")
 21566                        .IsRequired()
 21567                        .HasMaxLength(32)
 21568                        .HasColumnType("TEXT");
 21569
 21570                    b.Property<string>("DashboardTheme")
 21571                        .HasMaxLength(32)
 21572                        .HasColumnType("TEXT");
 21573
 21574                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21575                        .HasColumnType("INTEGER");
 21576
 21577                    b.Property<int?>("IndexBy")
 21578                        .HasColumnType("INTEGER");
 21579
 21580                    b.Property<Guid>("ItemId")
 21581                        .HasColumnType("TEXT");
 21582
 21583                    b.Property<int>("ScrollDirection")
 21584                        .HasColumnType("INTEGER");
 21585
 21586                    b.Property<bool>("ShowBackdrop")
 21587                        .HasColumnType("INTEGER");
 21588
 21589                    b.Property<bool>("ShowSidebar")
 21590                        .HasColumnType("INTEGER");
 21591
 21592                    b.Property<int>("SkipBackwardLength")
 21593                        .HasColumnType("INTEGER");
 21594
 21595                    b.Property<int>("SkipForwardLength")
 21596                        .HasColumnType("INTEGER");
 21597
 21598                    b.Property<string>("TvHome")
 21599                        .HasMaxLength(32)
 21600                        .HasColumnType("TEXT");
 21601
 21602                    b.Property<Guid>("UserId")
 21603                        .HasColumnType("TEXT");
 21604
 21605                    b.HasKey("Id");
 21606
 21607                    b.HasIndex("UserId", "ItemId", "Client")
 21608                        .IsUnique();
 21609
 21610                    b.ToTable("DisplayPreferences");
 21611
 21612                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21613                });
 614
 21615            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21616                {
 21617                    b.Property<int>("Id")
 21618                        .ValueGeneratedOnAdd()
 21619                        .HasColumnType("INTEGER");
 21620
 21621                    b.Property<int>("DisplayPreferencesId")
 21622                        .HasColumnType("INTEGER");
 21623
 21624                    b.Property<int>("Order")
 21625                        .HasColumnType("INTEGER");
 21626
 21627                    b.Property<int>("Type")
 21628                        .HasColumnType("INTEGER");
 21629
 21630                    b.HasKey("Id");
 21631
 21632                    b.HasIndex("DisplayPreferencesId");
 21633
 21634                    b.ToTable("HomeSection");
 21635
 21636                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21637                });
 638
 21639            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21640                {
 21641                    b.Property<int>("Id")
 21642                        .ValueGeneratedOnAdd()
 21643                        .HasColumnType("INTEGER");
 21644
 21645                    b.Property<DateTime>("LastModified")
 21646                        .HasColumnType("TEXT");
 21647
 21648                    b.Property<string>("Path")
 21649                        .IsRequired()
 21650                        .HasMaxLength(512)
 21651                        .HasColumnType("TEXT");
 21652
 21653                    b.Property<Guid?>("UserId")
 21654                        .HasColumnType("TEXT");
 21655
 21656                    b.HasKey("Id");
 21657
 21658                    b.HasIndex("UserId")
 21659                        .IsUnique();
 21660
 21661                    b.ToTable("ImageInfos");
 21662
 21663                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21664                });
 665
 21666            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21667                {
 21668                    b.Property<int>("Id")
 21669                        .ValueGeneratedOnAdd()
 21670                        .HasColumnType("INTEGER");
 21671
 21672                    b.Property<string>("Client")
 21673                        .IsRequired()
 21674                        .HasMaxLength(32)
 21675                        .HasColumnType("TEXT");
 21676
 21677                    b.Property<int?>("IndexBy")
 21678                        .HasColumnType("INTEGER");
 21679
 21680                    b.Property<Guid>("ItemId")
 21681                        .HasColumnType("TEXT");
 21682
 21683                    b.Property<bool>("RememberIndexing")
 21684                        .HasColumnType("INTEGER");
 21685
 21686                    b.Property<bool>("RememberSorting")
 21687                        .HasColumnType("INTEGER");
 21688
 21689                    b.Property<string>("SortBy")
 21690                        .IsRequired()
 21691                        .HasMaxLength(64)
 21692                        .HasColumnType("TEXT");
 21693
 21694                    b.Property<int>("SortOrder")
 21695                        .HasColumnType("INTEGER");
 21696
 21697                    b.Property<Guid>("UserId")
 21698                        .HasColumnType("TEXT");
 21699
 21700                    b.Property<int>("ViewType")
 21701                        .HasColumnType("INTEGER");
 21702
 21703                    b.HasKey("Id");
 21704
 21705                    b.HasIndex("UserId");
 21706
 21707                    b.ToTable("ItemDisplayPreferences");
 21708
 21709                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21710                });
 711
 21712            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21713                {
 21714                    b.Property<Guid>("ItemValueId")
 21715                        .ValueGeneratedOnAdd()
 21716                        .HasColumnType("TEXT");
 21717
 21718                    b.Property<string>("CleanValue")
 21719                        .IsRequired()
 21720                        .HasColumnType("TEXT");
 21721
 21722                    b.Property<int>("Type")
 21723                        .HasColumnType("INTEGER");
 21724
 21725                    b.Property<string>("Value")
 21726                        .IsRequired()
 21727                        .HasColumnType("TEXT");
 21728
 21729                    b.HasKey("ItemValueId");
 21730
 21731                    b.HasIndex("Type", "CleanValue");
 21732
 21733                    b.HasIndex("Type", "Value")
 21734                        .IsUnique();
 21735
 21736                    b.ToTable("ItemValues");
 21737
 21738                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21739                });
 740
 21741            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21742                {
 21743                    b.Property<Guid>("ItemValueId")
 21744                        .HasColumnType("TEXT");
 21745
 21746                    b.Property<Guid>("ItemId")
 21747                        .HasColumnType("TEXT");
 21748
 21749                    b.HasKey("ItemValueId", "ItemId");
 21750
 21751                    b.HasIndex("ItemId");
 21752
 21753                    b.ToTable("ItemValuesMap");
 21754
 21755                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21756                });
 757
 21758            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 21759                {
 21760                    b.Property<Guid>("ItemId")
 21761                        .HasColumnType("TEXT");
 21762
 21763                    b.PrimitiveCollection<string>("KeyframeTicks")
 21764                        .HasColumnType("TEXT");
 21765
 21766                    b.Property<long>("TotalDuration")
 21767                        .HasColumnType("INTEGER");
 21768
 21769                    b.HasKey("ItemId");
 21770
 21771                    b.ToTable("KeyframeData");
 21772
 21773                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21774                });
 775
 21776            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21777                {
 21778                    b.Property<Guid>("Id")
 21779                        .ValueGeneratedOnAdd()
 21780                        .HasColumnType("TEXT");
 21781
 21782                    b.Property<long>("EndTicks")
 21783                        .HasColumnType("INTEGER");
 21784
 21785                    b.Property<Guid>("ItemId")
 21786                        .HasColumnType("TEXT");
 21787
 21788                    b.Property<string>("SegmentProviderId")
 21789                        .IsRequired()
 21790                        .HasColumnType("TEXT");
 21791
 21792                    b.Property<long>("StartTicks")
 21793                        .HasColumnType("INTEGER");
 21794
 21795                    b.Property<int>("Type")
 21796                        .HasColumnType("INTEGER");
 21797
 21798                    b.HasKey("Id");
 21799
 21800                    b.ToTable("MediaSegments");
 21801
 21802                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21803                });
 804
 21805            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21806                {
 21807                    b.Property<Guid>("ItemId")
 21808                        .HasColumnType("TEXT");
 21809
 21810                    b.Property<int>("StreamIndex")
 21811                        .HasColumnType("INTEGER");
 21812
 21813                    b.Property<string>("AspectRatio")
 21814                        .HasColumnType("TEXT");
 21815
 21816                    b.Property<float?>("AverageFrameRate")
 21817                        .HasColumnType("REAL");
 21818
 21819                    b.Property<int?>("BitDepth")
 21820                        .HasColumnType("INTEGER");
 21821
 21822                    b.Property<int?>("BitRate")
 21823                        .HasColumnType("INTEGER");
 21824
 21825                    b.Property<int?>("BlPresentFlag")
 21826                        .HasColumnType("INTEGER");
 21827
 21828                    b.Property<string>("ChannelLayout")
 21829                        .HasColumnType("TEXT");
 21830
 21831                    b.Property<int?>("Channels")
 21832                        .HasColumnType("INTEGER");
 21833
 21834                    b.Property<string>("Codec")
 21835                        .HasColumnType("TEXT");
 21836
 21837                    b.Property<string>("CodecTag")
 21838                        .HasColumnType("TEXT");
 21839
 21840                    b.Property<string>("CodecTimeBase")
 21841                        .HasColumnType("TEXT");
 21842
 21843                    b.Property<string>("ColorPrimaries")
 21844                        .HasColumnType("TEXT");
 21845
 21846                    b.Property<string>("ColorSpace")
 21847                        .HasColumnType("TEXT");
 21848
 21849                    b.Property<string>("ColorTransfer")
 21850                        .HasColumnType("TEXT");
 21851
 21852                    b.Property<string>("Comment")
 21853                        .HasColumnType("TEXT");
 21854
 21855                    b.Property<int?>("DvBlSignalCompatibilityId")
 21856                        .HasColumnType("INTEGER");
 21857
 21858                    b.Property<int?>("DvLevel")
 21859                        .HasColumnType("INTEGER");
 21860
 21861                    b.Property<int?>("DvProfile")
 21862                        .HasColumnType("INTEGER");
 21863
 21864                    b.Property<int?>("DvVersionMajor")
 21865                        .HasColumnType("INTEGER");
 21866
 21867                    b.Property<int?>("DvVersionMinor")
 21868                        .HasColumnType("INTEGER");
 21869
 21870                    b.Property<int?>("ElPresentFlag")
 21871                        .HasColumnType("INTEGER");
 21872
 21873                    b.Property<bool?>("Hdr10PlusPresentFlag")
 21874                        .HasColumnType("INTEGER");
 21875
 21876                    b.Property<int?>("Height")
 21877                        .HasColumnType("INTEGER");
 21878
 21879                    b.Property<bool?>("IsAnamorphic")
 21880                        .HasColumnType("INTEGER");
 21881
 21882                    b.Property<bool?>("IsAvc")
 21883                        .HasColumnType("INTEGER");
 21884
 21885                    b.Property<bool>("IsDefault")
 21886                        .HasColumnType("INTEGER");
 21887
 21888                    b.Property<bool>("IsExternal")
 21889                        .HasColumnType("INTEGER");
 21890
 21891                    b.Property<bool>("IsForced")
 21892                        .HasColumnType("INTEGER");
 21893
 21894                    b.Property<bool?>("IsHearingImpaired")
 21895                        .HasColumnType("INTEGER");
 21896
 21897                    b.Property<bool?>("IsInterlaced")
 21898                        .HasColumnType("INTEGER");
 21899
 21900                    b.Property<string>("KeyFrames")
 21901                        .HasColumnType("TEXT");
 21902
 21903                    b.Property<string>("Language")
 21904                        .HasColumnType("TEXT");
 21905
 21906                    b.Property<float?>("Level")
 21907                        .HasColumnType("REAL");
 21908
 21909                    b.Property<string>("NalLengthSize")
 21910                        .HasColumnType("TEXT");
 21911
 21912                    b.Property<string>("Path")
 21913                        .HasColumnType("TEXT");
 21914
 21915                    b.Property<string>("PixelFormat")
 21916                        .HasColumnType("TEXT");
 21917
 21918                    b.Property<string>("Profile")
 21919                        .HasColumnType("TEXT");
 21920
 21921                    b.Property<float?>("RealFrameRate")
 21922                        .HasColumnType("REAL");
 21923
 21924                    b.Property<int?>("RefFrames")
 21925                        .HasColumnType("INTEGER");
 21926
 21927                    b.Property<int?>("Rotation")
 21928                        .HasColumnType("INTEGER");
 21929
 21930                    b.Property<int?>("RpuPresentFlag")
 21931                        .HasColumnType("INTEGER");
 21932
 21933                    b.Property<int?>("SampleRate")
 21934                        .HasColumnType("INTEGER");
 21935
 21936                    b.Property<int>("StreamType")
 21937                        .HasColumnType("INTEGER");
 21938
 21939                    b.Property<string>("TimeBase")
 21940                        .HasColumnType("TEXT");
 21941
 21942                    b.Property<string>("Title")
 21943                        .HasColumnType("TEXT");
 21944
 21945                    b.Property<int?>("Width")
 21946                        .HasColumnType("INTEGER");
 21947
 21948                    b.HasKey("ItemId", "StreamIndex");
 21949
 21950                    b.HasIndex("StreamIndex");
 21951
 21952                    b.HasIndex("StreamType");
 21953
 21954                    b.HasIndex("StreamIndex", "StreamType");
 21955
 21956                    b.HasIndex("StreamIndex", "StreamType", "Language");
 21957
 21958                    b.ToTable("MediaStreamInfos");
 21959
 21960                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21961                });
 962
 21963            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 21964                {
 21965                    b.Property<Guid>("Id")
 21966                        .ValueGeneratedOnAdd()
 21967                        .HasColumnType("TEXT");
 21968
 21969                    b.Property<string>("Name")
 21970                        .IsRequired()
 21971                        .HasColumnType("TEXT");
 21972
 21973                    b.Property<string>("PersonType")
 21974                        .HasColumnType("TEXT");
 21975
 21976                    b.HasKey("Id");
 21977
 21978                    b.HasIndex("Name");
 21979
 21980                    b.ToTable("Peoples");
 21981
 21982                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21983                });
 984
 21985            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 21986                {
 21987                    b.Property<Guid>("ItemId")
 21988                        .HasColumnType("TEXT");
 21989
 21990                    b.Property<Guid>("PeopleId")
 21991                        .HasColumnType("TEXT");
 21992
 21993                    b.Property<int?>("ListOrder")
 21994                        .HasColumnType("INTEGER");
 21995
 21996                    b.Property<string>("Role")
 21997                        .HasColumnType("TEXT");
 21998
 21999                    b.Property<int?>("SortOrder")
 211000                        .HasColumnType("INTEGER");
 211001
 211002                    b.HasKey("ItemId", "PeopleId");
 211003
 211004                    b.HasIndex("PeopleId");
 211005
 211006                    b.HasIndex("ItemId", "ListOrder");
 211007
 211008                    b.HasIndex("ItemId", "SortOrder");
 211009
 211010                    b.ToTable("PeopleBaseItemMap");
 211011
 211012                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211013                });
 1014
 211015            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211016                {
 211017                    b.Property<int>("Id")
 211018                        .ValueGeneratedOnAdd()
 211019                        .HasColumnType("INTEGER");
 211020
 211021                    b.Property<int>("Kind")
 211022                        .HasColumnType("INTEGER");
 211023
 211024                    b.Property<Guid?>("Permission_Permissions_Guid")
 211025                        .HasColumnType("TEXT");
 211026
 211027                    b.Property<uint>("RowVersion")
 211028                        .IsConcurrencyToken()
 211029                        .HasColumnType("INTEGER");
 211030
 211031                    b.Property<Guid?>("UserId")
 211032                        .HasColumnType("TEXT");
 211033
 211034                    b.Property<bool>("Value")
 211035                        .HasColumnType("INTEGER");
 211036
 211037                    b.HasKey("Id");
 211038
 211039                    b.HasIndex("UserId", "Kind")
 211040                        .IsUnique()
 211041                        .HasFilter("[UserId] IS NOT NULL");
 211042
 211043                    b.ToTable("Permissions");
 211044
 211045                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211046                });
 1047
 211048            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211049                {
 211050                    b.Property<int>("Id")
 211051                        .ValueGeneratedOnAdd()
 211052                        .HasColumnType("INTEGER");
 211053
 211054                    b.Property<int>("Kind")
 211055                        .HasColumnType("INTEGER");
 211056
 211057                    b.Property<Guid?>("Preference_Preferences_Guid")
 211058                        .HasColumnType("TEXT");
 211059
 211060                    b.Property<uint>("RowVersion")
 211061                        .IsConcurrencyToken()
 211062                        .HasColumnType("INTEGER");
 211063
 211064                    b.Property<Guid?>("UserId")
 211065                        .HasColumnType("TEXT");
 211066
 211067                    b.Property<string>("Value")
 211068                        .IsRequired()
 211069                        .HasMaxLength(65535)
 211070                        .HasColumnType("TEXT");
 211071
 211072                    b.HasKey("Id");
 211073
 211074                    b.HasIndex("UserId", "Kind")
 211075                        .IsUnique()
 211076                        .HasFilter("[UserId] IS NOT NULL");
 211077
 211078                    b.ToTable("Preferences");
 211079
 211080                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211081                });
 1082
 211083            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211084                {
 211085                    b.Property<int>("Id")
 211086                        .ValueGeneratedOnAdd()
 211087                        .HasColumnType("INTEGER");
 211088
 211089                    b.Property<string>("AccessToken")
 211090                        .IsRequired()
 211091                        .HasColumnType("TEXT");
 211092
 211093                    b.Property<DateTime>("DateCreated")
 211094                        .HasColumnType("TEXT");
 211095
 211096                    b.Property<DateTime>("DateLastActivity")
 211097                        .HasColumnType("TEXT");
 211098
 211099                    b.Property<string>("Name")
 211100                        .IsRequired()
 211101                        .HasMaxLength(64)
 211102                        .HasColumnType("TEXT");
 211103
 211104                    b.HasKey("Id");
 211105
 211106                    b.HasIndex("AccessToken")
 211107                        .IsUnique();
 211108
 211109                    b.ToTable("ApiKeys");
 211110
 211111                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211112                });
 1113
 211114            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211115                {
 211116                    b.Property<int>("Id")
 211117                        .ValueGeneratedOnAdd()
 211118                        .HasColumnType("INTEGER");
 211119
 211120                    b.Property<string>("AccessToken")
 211121                        .IsRequired()
 211122                        .HasColumnType("TEXT");
 211123
 211124                    b.Property<string>("AppName")
 211125                        .IsRequired()
 211126                        .HasMaxLength(64)
 211127                        .HasColumnType("TEXT");
 211128
 211129                    b.Property<string>("AppVersion")
 211130                        .IsRequired()
 211131                        .HasMaxLength(32)
 211132                        .HasColumnType("TEXT");
 211133
 211134                    b.Property<DateTime>("DateCreated")
 211135                        .HasColumnType("TEXT");
 211136
 211137                    b.Property<DateTime>("DateLastActivity")
 211138                        .HasColumnType("TEXT");
 211139
 211140                    b.Property<DateTime>("DateModified")
 211141                        .HasColumnType("TEXT");
 211142
 211143                    b.Property<string>("DeviceId")
 211144                        .IsRequired()
 211145                        .HasMaxLength(256)
 211146                        .HasColumnType("TEXT");
 211147
 211148                    b.Property<string>("DeviceName")
 211149                        .IsRequired()
 211150                        .HasMaxLength(64)
 211151                        .HasColumnType("TEXT");
 211152
 211153                    b.Property<bool>("IsActive")
 211154                        .HasColumnType("INTEGER");
 211155
 211156                    b.Property<Guid>("UserId")
 211157                        .HasColumnType("TEXT");
 211158
 211159                    b.HasKey("Id");
 211160
 211161                    b.HasIndex("DeviceId");
 211162
 211163                    b.HasIndex("AccessToken", "DateLastActivity");
 211164
 211165                    b.HasIndex("DeviceId", "DateLastActivity");
 211166
 211167                    b.HasIndex("UserId", "DeviceId");
 211168
 211169                    b.ToTable("Devices");
 211170
 211171                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211172                });
 1173
 211174            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211175                {
 211176                    b.Property<int>("Id")
 211177                        .ValueGeneratedOnAdd()
 211178                        .HasColumnType("INTEGER");
 211179
 211180                    b.Property<string>("CustomName")
 211181                        .HasColumnType("TEXT");
 211182
 211183                    b.Property<string>("DeviceId")
 211184                        .IsRequired()
 211185                        .HasColumnType("TEXT");
 211186
 211187                    b.HasKey("Id");
 211188
 211189                    b.HasIndex("DeviceId")
 211190                        .IsUnique();
 211191
 211192                    b.ToTable("DeviceOptions");
 211193
 211194                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211195                });
 1196
 211197            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211198                {
 211199                    b.Property<Guid>("ItemId")
 211200                        .HasColumnType("TEXT");
 211201
 211202                    b.Property<int>("Width")
 211203                        .HasColumnType("INTEGER");
 211204
 211205                    b.Property<int>("Bandwidth")
 211206                        .HasColumnType("INTEGER");
 211207
 211208                    b.Property<int>("Height")
 211209                        .HasColumnType("INTEGER");
 211210
 211211                    b.Property<int>("Interval")
 211212                        .HasColumnType("INTEGER");
 211213
 211214                    b.Property<int>("ThumbnailCount")
 211215                        .HasColumnType("INTEGER");
 211216
 211217                    b.Property<int>("TileHeight")
 211218                        .HasColumnType("INTEGER");
 211219
 211220                    b.Property<int>("TileWidth")
 211221                        .HasColumnType("INTEGER");
 211222
 211223                    b.HasKey("ItemId", "Width");
 211224
 211225                    b.ToTable("TrickplayInfos");
 211226
 211227                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211228                });
 1229
 211230            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211231                {
 211232                    b.Property<Guid>("Id")
 211233                        .ValueGeneratedOnAdd()
 211234                        .HasColumnType("TEXT");
 211235
 211236                    b.Property<string>("AudioLanguagePreference")
 211237                        .HasMaxLength(255)
 211238                        .HasColumnType("TEXT");
 211239
 211240                    b.Property<string>("AuthenticationProviderId")
 211241                        .IsRequired()
 211242                        .HasMaxLength(255)
 211243                        .HasColumnType("TEXT");
 211244
 211245                    b.Property<string>("CastReceiverId")
 211246                        .HasMaxLength(32)
 211247                        .HasColumnType("TEXT");
 211248
 211249                    b.Property<bool>("DisplayCollectionsView")
 211250                        .HasColumnType("INTEGER");
 211251
 211252                    b.Property<bool>("DisplayMissingEpisodes")
 211253                        .HasColumnType("INTEGER");
 211254
 211255                    b.Property<bool>("EnableAutoLogin")
 211256                        .HasColumnType("INTEGER");
 211257
 211258                    b.Property<bool>("EnableLocalPassword")
 211259                        .HasColumnType("INTEGER");
 211260
 211261                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211262                        .HasColumnType("INTEGER");
 211263
 211264                    b.Property<bool>("EnableUserPreferenceAccess")
 211265                        .HasColumnType("INTEGER");
 211266
 211267                    b.Property<bool>("HidePlayedInLatest")
 211268                        .HasColumnType("INTEGER");
 211269
 211270                    b.Property<long>("InternalId")
 211271                        .HasColumnType("INTEGER");
 211272
 211273                    b.Property<int>("InvalidLoginAttemptCount")
 211274                        .HasColumnType("INTEGER");
 211275
 211276                    b.Property<DateTime?>("LastActivityDate")
 211277                        .HasColumnType("TEXT");
 211278
 211279                    b.Property<DateTime?>("LastLoginDate")
 211280                        .HasColumnType("TEXT");
 211281
 211282                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211283                        .HasColumnType("INTEGER");
 211284
 211285                    b.Property<int>("MaxActiveSessions")
 211286                        .HasColumnType("INTEGER");
 211287
 211288                    b.Property<int?>("MaxParentalRatingScore")
 211289                        .HasColumnType("INTEGER");
 211290
 211291                    b.Property<int?>("MaxParentalRatingSubScore")
 211292                        .HasColumnType("INTEGER");
 211293
 211294                    b.Property<bool>("MustUpdatePassword")
 211295                        .HasColumnType("INTEGER");
 211296
 211297                    b.Property<string>("Password")
 211298                        .HasMaxLength(65535)
 211299                        .HasColumnType("TEXT");
 211300
 211301                    b.Property<string>("PasswordResetProviderId")
 211302                        .IsRequired()
 211303                        .HasMaxLength(255)
 211304                        .HasColumnType("TEXT");
 211305
 211306                    b.Property<bool>("PlayDefaultAudioTrack")
 211307                        .HasColumnType("INTEGER");
 211308
 211309                    b.Property<bool>("RememberAudioSelections")
 211310                        .HasColumnType("INTEGER");
 211311
 211312                    b.Property<bool>("RememberSubtitleSelections")
 211313                        .HasColumnType("INTEGER");
 211314
 211315                    b.Property<int?>("RemoteClientBitrateLimit")
 211316                        .HasColumnType("INTEGER");
 211317
 211318                    b.Property<uint>("RowVersion")
 211319                        .IsConcurrencyToken()
 211320                        .HasColumnType("INTEGER");
 211321
 211322                    b.Property<string>("SubtitleLanguagePreference")
 211323                        .HasMaxLength(255)
 211324                        .HasColumnType("TEXT");
 211325
 211326                    b.Property<int>("SubtitleMode")
 211327                        .HasColumnType("INTEGER");
 211328
 211329                    b.Property<int>("SyncPlayAccess")
 211330                        .HasColumnType("INTEGER");
 211331
 211332                    b.Property<string>("Username")
 211333                        .IsRequired()
 211334                        .HasMaxLength(255)
 211335                        .HasColumnType("TEXT");
 211336
 211337                    b.HasKey("Id");
 211338
 211339                    b.HasIndex("Username")
 211340                        .IsUnique();
 211341
 211342                    b.ToTable("Users");
 211343
 211344                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211345                });
 1346
 211347            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211348                {
 211349                    b.Property<Guid>("ItemId")
 211350                        .HasColumnType("TEXT");
 211351
 211352                    b.Property<Guid>("UserId")
 211353                        .HasColumnType("TEXT");
 211354
 211355                    b.Property<string>("CustomDataKey")
 211356                        .HasColumnType("TEXT");
 211357
 211358                    b.Property<int?>("AudioStreamIndex")
 211359                        .HasColumnType("INTEGER");
 211360
 211361                    b.Property<bool>("IsFavorite")
 211362                        .HasColumnType("INTEGER");
 211363
 211364                    b.Property<DateTime?>("LastPlayedDate")
 211365                        .HasColumnType("TEXT");
 211366
 211367                    b.Property<bool?>("Likes")
 211368                        .HasColumnType("INTEGER");
 211369
 211370                    b.Property<int>("PlayCount")
 211371                        .HasColumnType("INTEGER");
 211372
 211373                    b.Property<long>("PlaybackPositionTicks")
 211374                        .HasColumnType("INTEGER");
 211375
 211376                    b.Property<bool>("Played")
 211377                        .HasColumnType("INTEGER");
 211378
 211379                    b.Property<double?>("Rating")
 211380                        .HasColumnType("REAL");
 211381
 211382                    b.Property<int?>("SubtitleStreamIndex")
 211383                        .HasColumnType("INTEGER");
 211384
 211385                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211386
 211387                    b.HasIndex("UserId");
 211388
 211389                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211390
 211391                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211392
 211393                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211394
 211395                    b.HasIndex("ItemId", "UserId", "Played");
 211396
 211397                    b.ToTable("UserData");
 211398
 211399                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211400                });
 1401
 211402            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211403                {
 211404                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211405                        .WithMany("AccessSchedules")
 211406                        .HasForeignKey("UserId")
 211407                        .OnDelete(DeleteBehavior.Cascade)
 211408                        .IsRequired();
 211409                });
 1410
 211411            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211412                {
 211413                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211414                        .WithMany("Parents")
 211415                        .HasForeignKey("ItemId")
 211416                        .OnDelete(DeleteBehavior.Cascade)
 211417                        .IsRequired();
 211418
 211419                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211420                        .WithMany("Children")
 211421                        .HasForeignKey("ParentItemId")
 211422                        .OnDelete(DeleteBehavior.Cascade)
 211423                        .IsRequired();
 211424
 211425                    b.Navigation("Item");
 211426
 211427                    b.Navigation("ParentItem");
 211428                });
 1429
 211430            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211431                {
 211432                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211433                        .WithMany()
 211434                        .HasForeignKey("ItemId")
 211435                        .OnDelete(DeleteBehavior.Cascade)
 211436                        .IsRequired();
 211437
 211438                    b.Navigation("Item");
 211439                });
 1440
 211441            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211442                {
 211443                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211444                        .WithMany("Images")
 211445                        .HasForeignKey("ItemId")
 211446                        .OnDelete(DeleteBehavior.Cascade)
 211447                        .IsRequired();
 211448
 211449                    b.Navigation("Item");
 211450                });
 1451
 211452            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211453                {
 211454                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211455                        .WithMany("LockedFields")
 211456                        .HasForeignKey("ItemId")
 211457                        .OnDelete(DeleteBehavior.Cascade)
 211458                        .IsRequired();
 211459
 211460                    b.Navigation("Item");
 211461                });
 1462
 211463            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211464                {
 211465                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211466                        .WithMany("Provider")
 211467                        .HasForeignKey("ItemId")
 211468                        .OnDelete(DeleteBehavior.Cascade)
 211469                        .IsRequired();
 211470
 211471                    b.Navigation("Item");
 211472                });
 1473
 211474            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211475                {
 211476                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211477                        .WithMany("TrailerTypes")
 211478                        .HasForeignKey("ItemId")
 211479                        .OnDelete(DeleteBehavior.Cascade)
 211480                        .IsRequired();
 211481
 211482                    b.Navigation("Item");
 211483                });
 1484
 211485            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211486                {
 211487                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211488                        .WithMany("Chapters")
 211489                        .HasForeignKey("ItemId")
 211490                        .OnDelete(DeleteBehavior.Cascade)
 211491                        .IsRequired();
 211492
 211493                    b.Navigation("Item");
 211494                });
 1495
 211496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211497                {
 211498                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211499                        .WithMany("DisplayPreferences")
 211500                        .HasForeignKey("UserId")
 211501                        .OnDelete(DeleteBehavior.Cascade)
 211502                        .IsRequired();
 211503                });
 1504
 211505            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211506                {
 211507                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211508                        .WithMany("HomeSections")
 211509                        .HasForeignKey("DisplayPreferencesId")
 211510                        .OnDelete(DeleteBehavior.Cascade)
 211511                        .IsRequired();
 211512                });
 1513
 211514            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211515                {
 211516                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211517                        .WithOne("ProfileImage")
 211518                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211519                        .OnDelete(DeleteBehavior.Cascade);
 211520                });
 1521
 211522            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211523                {
 211524                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211525                        .WithMany("ItemDisplayPreferences")
 211526                        .HasForeignKey("UserId")
 211527                        .OnDelete(DeleteBehavior.Cascade)
 211528                        .IsRequired();
 211529                });
 1530
 211531            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211532                {
 211533                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211534                        .WithMany("ItemValues")
 211535                        .HasForeignKey("ItemId")
 211536                        .OnDelete(DeleteBehavior.Cascade)
 211537                        .IsRequired();
 211538
 211539                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211540                        .WithMany("BaseItemsMap")
 211541                        .HasForeignKey("ItemValueId")
 211542                        .OnDelete(DeleteBehavior.Cascade)
 211543                        .IsRequired();
 211544
 211545                    b.Navigation("Item");
 211546
 211547                    b.Navigation("ItemValue");
 211548                });
 1549
 211550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 211551                {
 211552                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211553                        .WithMany()
 211554                        .HasForeignKey("ItemId")
 211555                        .OnDelete(DeleteBehavior.Cascade)
 211556                        .IsRequired();
 211557
 211558                    b.Navigation("Item");
 211559                });
 1560
 211561            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211562                {
 211563                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211564                        .WithMany("MediaStreams")
 211565                        .HasForeignKey("ItemId")
 211566                        .OnDelete(DeleteBehavior.Cascade)
 211567                        .IsRequired();
 211568
 211569                    b.Navigation("Item");
 211570                });
 1571
 211572            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211573                {
 211574                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211575                        .WithMany("Peoples")
 211576                        .HasForeignKey("ItemId")
 211577                        .OnDelete(DeleteBehavior.Cascade)
 211578                        .IsRequired();
 211579
 211580                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211581                        .WithMany("BaseItems")
 211582                        .HasForeignKey("PeopleId")
 211583                        .OnDelete(DeleteBehavior.Cascade)
 211584                        .IsRequired();
 211585
 211586                    b.Navigation("Item");
 211587
 211588                    b.Navigation("People");
 211589                });
 1590
 211591            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211592                {
 211593                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211594                        .WithMany("Permissions")
 211595                        .HasForeignKey("UserId")
 211596                        .OnDelete(DeleteBehavior.Cascade);
 211597                });
 1598
 211599            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211600                {
 211601                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211602                        .WithMany("Preferences")
 211603                        .HasForeignKey("UserId")
 211604                        .OnDelete(DeleteBehavior.Cascade);
 211605                });
 1606
 211607            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211608                {
 211609                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211610                        .WithMany()
 211611                        .HasForeignKey("UserId")
 211612                        .OnDelete(DeleteBehavior.Cascade)
 211613                        .IsRequired();
 211614
 211615                    b.Navigation("User");
 211616                });
 1617
 211618            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211619                {
 211620                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211621                        .WithMany("UserData")
 211622                        .HasForeignKey("ItemId")
 211623                        .OnDelete(DeleteBehavior.Cascade)
 211624                        .IsRequired();
 211625
 211626                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211627                        .WithMany()
 211628                        .HasForeignKey("UserId")
 211629                        .OnDelete(DeleteBehavior.Cascade)
 211630                        .IsRequired();
 211631
 211632                    b.Navigation("Item");
 211633
 211634                    b.Navigation("User");
 211635                });
 1636
 211637            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211638                {
 211639                    b.Navigation("Chapters");
 211640
 211641                    b.Navigation("Children");
 211642
 211643                    b.Navigation("Images");
 211644
 211645                    b.Navigation("ItemValues");
 211646
 211647                    b.Navigation("LockedFields");
 211648
 211649                    b.Navigation("MediaStreams");
 211650
 211651                    b.Navigation("Parents");
 211652
 211653                    b.Navigation("Peoples");
 211654
 211655                    b.Navigation("Provider");
 211656
 211657                    b.Navigation("TrailerTypes");
 211658
 211659                    b.Navigation("UserData");
 211660                });
 1661
 211662            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211663                {
 211664                    b.Navigation("HomeSections");
 211665                });
 1666
 211667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211668                {
 211669                    b.Navigation("BaseItemsMap");
 211670                });
 1671
 211672            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211673                {
 211674                    b.Navigation("BaseItems");
 211675                });
 1676
 211677            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211678                {
 211679                    b.Navigation("AccessSchedules");
 211680
 211681                    b.Navigation("DisplayPreferences");
 211682
 211683                    b.Navigation("ItemDisplayPreferences");
 211684
 211685                    b.Navigation("Permissions");
 211686
 211687                    b.Navigation("Preferences");
 211688
 211689                    b.Navigation("ProfileImage");
 211690                });
 1691#pragma warning restore 612, 618
 211692        }
 1693    }
 1694}