< Summary - Jellyfin

Line coverage
99%
Covered lines: 1589
Uncovered lines: 10
Coverable lines: 1599
Total lines: 1693
Line coverage: 99.3%
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/20250331182844_FixAttachmentMigration.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class FixAttachmentMigration : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2113            migrationBuilder.AlterColumn<string>(
 2114                name: "Codec",
 2115                table: "AttachmentStreamInfos",
 2116                type: "TEXT",
 2117                nullable: true,
 2118                oldClrType: typeof(string),
 2119                oldType: "TEXT");
 2120        }
 21
 22        /// <inheritdoc />
 23        protected override void Down(MigrationBuilder migrationBuilder)
 24        {
 025            migrationBuilder.AlterColumn<string>(
 026                name: "Codec",
 027                table: "AttachmentStreamInfos",
 028                type: "TEXT",
 029                nullable: false,
 030                defaultValue: string.Empty,
 031                oldClrType: typeof(string),
 032                oldType: "TEXT",
 033                oldNullable: true);
 034        }
 35    }
 36}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250331182844_FixAttachmentMigration.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("20250331182844_FixAttachmentMigration")]
 15    partial class FixAttachmentMigration
 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?>("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<string>("ExtraIds")
 21214                        .HasColumnType("TEXT");
 21215
 21216                    b.Property<int?>("ExtraType")
 21217                        .HasColumnType("INTEGER");
 21218
 21219                    b.Property<string>("ForcedSortName")
 21220                        .HasColumnType("TEXT");
 21221
 21222                    b.Property<string>("Genres")
 21223                        .HasColumnType("TEXT");
 21224
 21225                    b.Property<int?>("Height")
 21226                        .HasColumnType("INTEGER");
 21227
 21228                    b.Property<int?>("IndexNumber")
 21229                        .HasColumnType("INTEGER");
 21230
 21231                    b.Property<int?>("InheritedParentalRatingSubValue")
 21232                        .HasColumnType("INTEGER");
 21233
 21234                    b.Property<int?>("InheritedParentalRatingValue")
 21235                        .HasColumnType("INTEGER");
 21236
 21237                    b.Property<bool>("IsFolder")
 21238                        .HasColumnType("INTEGER");
 21239
 21240                    b.Property<bool>("IsInMixedFolder")
 21241                        .HasColumnType("INTEGER");
 21242
 21243                    b.Property<bool>("IsLocked")
 21244                        .HasColumnType("INTEGER");
 21245
 21246                    b.Property<bool>("IsMovie")
 21247                        .HasColumnType("INTEGER");
 21248
 21249                    b.Property<bool>("IsRepeat")
 21250                        .HasColumnType("INTEGER");
 21251
 21252                    b.Property<bool>("IsSeries")
 21253                        .HasColumnType("INTEGER");
 21254
 21255                    b.Property<bool>("IsVirtualItem")
 21256                        .HasColumnType("INTEGER");
 21257
 21258                    b.Property<float?>("LUFS")
 21259                        .HasColumnType("REAL");
 21260
 21261                    b.Property<string>("MediaType")
 21262                        .HasColumnType("TEXT");
 21263
 21264                    b.Property<string>("Name")
 21265                        .HasColumnType("TEXT");
 21266
 21267                    b.Property<float?>("NormalizationGain")
 21268                        .HasColumnType("REAL");
 21269
 21270                    b.Property<string>("OfficialRating")
 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<string>("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<string>("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("ParentId");
 21370
 21371                    b.HasIndex("Path");
 21372
 21373                    b.HasIndex("PresentationUniqueKey");
 21374
 21375                    b.HasIndex("TopParentId", "Id");
 21376
 21377                    b.HasIndex("Type", "TopParentId", "Id");
 21378
 21379                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 21380
 21381                    b.HasIndex("Type", "TopParentId", "StartDate");
 21382
 21383                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 21384
 21385                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 21386
 21387                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 21388
 21389                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 21390
 21391                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21392
 21393                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 21394
 21395                    b.ToTable("BaseItems");
 21396
 21397                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21398                });
 399
 21400            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 21401                {
 21402                    b.Property<Guid>("Id")
 21403                        .ValueGeneratedOnAdd()
 21404                        .HasColumnType("TEXT");
 21405
 21406                    b.Property<byte[]>("Blurhash")
 21407                        .HasColumnType("BLOB");
 21408
 21409                    b.Property<DateTime>("DateModified")
 21410                        .HasColumnType("TEXT");
 21411
 21412                    b.Property<int>("Height")
 21413                        .HasColumnType("INTEGER");
 21414
 21415                    b.Property<int>("ImageType")
 21416                        .HasColumnType("INTEGER");
 21417
 21418                    b.Property<Guid>("ItemId")
 21419                        .HasColumnType("TEXT");
 21420
 21421                    b.Property<string>("Path")
 21422                        .IsRequired()
 21423                        .HasColumnType("TEXT");
 21424
 21425                    b.Property<int>("Width")
 21426                        .HasColumnType("INTEGER");
 21427
 21428                    b.HasKey("Id");
 21429
 21430                    b.HasIndex("ItemId");
 21431
 21432                    b.ToTable("BaseItemImageInfos");
 21433
 21434                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21435                });
 436
 21437            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 21438                {
 21439                    b.Property<int>("Id")
 21440                        .HasColumnType("INTEGER");
 21441
 21442                    b.Property<Guid>("ItemId")
 21443                        .HasColumnType("TEXT");
 21444
 21445                    b.HasKey("Id", "ItemId");
 21446
 21447                    b.HasIndex("ItemId");
 21448
 21449                    b.ToTable("BaseItemMetadataFields");
 21450
 21451                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21452                });
 453
 21454            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 21455                {
 21456                    b.Property<Guid>("ItemId")
 21457                        .HasColumnType("TEXT");
 21458
 21459                    b.Property<string>("ProviderId")
 21460                        .HasColumnType("TEXT");
 21461
 21462                    b.Property<string>("ProviderValue")
 21463                        .IsRequired()
 21464                        .HasColumnType("TEXT");
 21465
 21466                    b.HasKey("ItemId", "ProviderId");
 21467
 21468                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 21469
 21470                    b.ToTable("BaseItemProviders");
 21471
 21472                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21473                });
 474
 21475            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 21476                {
 21477                    b.Property<int>("Id")
 21478                        .HasColumnType("INTEGER");
 21479
 21480                    b.Property<Guid>("ItemId")
 21481                        .HasColumnType("TEXT");
 21482
 21483                    b.HasKey("Id", "ItemId");
 21484
 21485                    b.HasIndex("ItemId");
 21486
 21487                    b.ToTable("BaseItemTrailerTypes");
 21488
 21489                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21490                });
 491
 21492            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 21493                {
 21494                    b.Property<Guid>("ItemId")
 21495                        .HasColumnType("TEXT");
 21496
 21497                    b.Property<int>("ChapterIndex")
 21498                        .HasColumnType("INTEGER");
 21499
 21500                    b.Property<DateTime?>("ImageDateModified")
 21501                        .HasColumnType("TEXT");
 21502
 21503                    b.Property<string>("ImagePath")
 21504                        .HasColumnType("TEXT");
 21505
 21506                    b.Property<string>("Name")
 21507                        .HasColumnType("TEXT");
 21508
 21509                    b.Property<long>("StartPositionTicks")
 21510                        .HasColumnType("INTEGER");
 21511
 21512                    b.HasKey("ItemId", "ChapterIndex");
 21513
 21514                    b.ToTable("Chapters");
 21515
 21516                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21517                });
 518
 21519            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 21520                {
 21521                    b.Property<int>("Id")
 21522                        .ValueGeneratedOnAdd()
 21523                        .HasColumnType("INTEGER");
 21524
 21525                    b.Property<string>("Client")
 21526                        .IsRequired()
 21527                        .HasMaxLength(32)
 21528                        .HasColumnType("TEXT");
 21529
 21530                    b.Property<Guid>("ItemId")
 21531                        .HasColumnType("TEXT");
 21532
 21533                    b.Property<string>("Key")
 21534                        .IsRequired()
 21535                        .HasColumnType("TEXT");
 21536
 21537                    b.Property<Guid>("UserId")
 21538                        .HasColumnType("TEXT");
 21539
 21540                    b.Property<string>("Value")
 21541                        .HasColumnType("TEXT");
 21542
 21543                    b.HasKey("Id");
 21544
 21545                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 21546                        .IsUnique();
 21547
 21548                    b.ToTable("CustomItemDisplayPreferences");
 21549
 21550                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21551                });
 552
 21553            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 21554                {
 21555                    b.Property<int>("Id")
 21556                        .ValueGeneratedOnAdd()
 21557                        .HasColumnType("INTEGER");
 21558
 21559                    b.Property<int>("ChromecastVersion")
 21560                        .HasColumnType("INTEGER");
 21561
 21562                    b.Property<string>("Client")
 21563                        .IsRequired()
 21564                        .HasMaxLength(32)
 21565                        .HasColumnType("TEXT");
 21566
 21567                    b.Property<string>("DashboardTheme")
 21568                        .HasMaxLength(32)
 21569                        .HasColumnType("TEXT");
 21570
 21571                    b.Property<bool>("EnableNextVideoInfoOverlay")
 21572                        .HasColumnType("INTEGER");
 21573
 21574                    b.Property<int?>("IndexBy")
 21575                        .HasColumnType("INTEGER");
 21576
 21577                    b.Property<Guid>("ItemId")
 21578                        .HasColumnType("TEXT");
 21579
 21580                    b.Property<int>("ScrollDirection")
 21581                        .HasColumnType("INTEGER");
 21582
 21583                    b.Property<bool>("ShowBackdrop")
 21584                        .HasColumnType("INTEGER");
 21585
 21586                    b.Property<bool>("ShowSidebar")
 21587                        .HasColumnType("INTEGER");
 21588
 21589                    b.Property<int>("SkipBackwardLength")
 21590                        .HasColumnType("INTEGER");
 21591
 21592                    b.Property<int>("SkipForwardLength")
 21593                        .HasColumnType("INTEGER");
 21594
 21595                    b.Property<string>("TvHome")
 21596                        .HasMaxLength(32)
 21597                        .HasColumnType("TEXT");
 21598
 21599                    b.Property<Guid>("UserId")
 21600                        .HasColumnType("TEXT");
 21601
 21602                    b.HasKey("Id");
 21603
 21604                    b.HasIndex("UserId", "ItemId", "Client")
 21605                        .IsUnique();
 21606
 21607                    b.ToTable("DisplayPreferences");
 21608
 21609                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21610                });
 611
 21612            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 21613                {
 21614                    b.Property<int>("Id")
 21615                        .ValueGeneratedOnAdd()
 21616                        .HasColumnType("INTEGER");
 21617
 21618                    b.Property<int>("DisplayPreferencesId")
 21619                        .HasColumnType("INTEGER");
 21620
 21621                    b.Property<int>("Order")
 21622                        .HasColumnType("INTEGER");
 21623
 21624                    b.Property<int>("Type")
 21625                        .HasColumnType("INTEGER");
 21626
 21627                    b.HasKey("Id");
 21628
 21629                    b.HasIndex("DisplayPreferencesId");
 21630
 21631                    b.ToTable("HomeSection");
 21632
 21633                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21634                });
 635
 21636            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 21637                {
 21638                    b.Property<int>("Id")
 21639                        .ValueGeneratedOnAdd()
 21640                        .HasColumnType("INTEGER");
 21641
 21642                    b.Property<DateTime>("LastModified")
 21643                        .HasColumnType("TEXT");
 21644
 21645                    b.Property<string>("Path")
 21646                        .IsRequired()
 21647                        .HasMaxLength(512)
 21648                        .HasColumnType("TEXT");
 21649
 21650                    b.Property<Guid?>("UserId")
 21651                        .HasColumnType("TEXT");
 21652
 21653                    b.HasKey("Id");
 21654
 21655                    b.HasIndex("UserId")
 21656                        .IsUnique();
 21657
 21658                    b.ToTable("ImageInfos");
 21659
 21660                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21661                });
 662
 21663            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 21664                {
 21665                    b.Property<int>("Id")
 21666                        .ValueGeneratedOnAdd()
 21667                        .HasColumnType("INTEGER");
 21668
 21669                    b.Property<string>("Client")
 21670                        .IsRequired()
 21671                        .HasMaxLength(32)
 21672                        .HasColumnType("TEXT");
 21673
 21674                    b.Property<int?>("IndexBy")
 21675                        .HasColumnType("INTEGER");
 21676
 21677                    b.Property<Guid>("ItemId")
 21678                        .HasColumnType("TEXT");
 21679
 21680                    b.Property<bool>("RememberIndexing")
 21681                        .HasColumnType("INTEGER");
 21682
 21683                    b.Property<bool>("RememberSorting")
 21684                        .HasColumnType("INTEGER");
 21685
 21686                    b.Property<string>("SortBy")
 21687                        .IsRequired()
 21688                        .HasMaxLength(64)
 21689                        .HasColumnType("TEXT");
 21690
 21691                    b.Property<int>("SortOrder")
 21692                        .HasColumnType("INTEGER");
 21693
 21694                    b.Property<Guid>("UserId")
 21695                        .HasColumnType("TEXT");
 21696
 21697                    b.Property<int>("ViewType")
 21698                        .HasColumnType("INTEGER");
 21699
 21700                    b.HasKey("Id");
 21701
 21702                    b.HasIndex("UserId");
 21703
 21704                    b.ToTable("ItemDisplayPreferences");
 21705
 21706                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21707                });
 708
 21709            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 21710                {
 21711                    b.Property<Guid>("ItemValueId")
 21712                        .ValueGeneratedOnAdd()
 21713                        .HasColumnType("TEXT");
 21714
 21715                    b.Property<string>("CleanValue")
 21716                        .IsRequired()
 21717                        .HasColumnType("TEXT");
 21718
 21719                    b.Property<int>("Type")
 21720                        .HasColumnType("INTEGER");
 21721
 21722                    b.Property<string>("Value")
 21723                        .IsRequired()
 21724                        .HasColumnType("TEXT");
 21725
 21726                    b.HasKey("ItemValueId");
 21727
 21728                    b.HasIndex("Type", "CleanValue")
 21729                        .IsUnique();
 21730
 21731                    b.ToTable("ItemValues");
 21732
 21733                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21734                });
 735
 21736            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 21737                {
 21738                    b.Property<Guid>("ItemValueId")
 21739                        .HasColumnType("TEXT");
 21740
 21741                    b.Property<Guid>("ItemId")
 21742                        .HasColumnType("TEXT");
 21743
 21744                    b.HasKey("ItemValueId", "ItemId");
 21745
 21746                    b.HasIndex("ItemId");
 21747
 21748                    b.ToTable("ItemValuesMap");
 21749
 21750                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21751                });
 752
 21753            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 21754                {
 21755                    b.Property<Guid>("Id")
 21756                        .ValueGeneratedOnAdd()
 21757                        .HasColumnType("TEXT");
 21758
 21759                    b.Property<long>("EndTicks")
 21760                        .HasColumnType("INTEGER");
 21761
 21762                    b.Property<Guid>("ItemId")
 21763                        .HasColumnType("TEXT");
 21764
 21765                    b.Property<string>("SegmentProviderId")
 21766                        .IsRequired()
 21767                        .HasColumnType("TEXT");
 21768
 21769                    b.Property<long>("StartTicks")
 21770                        .HasColumnType("INTEGER");
 21771
 21772                    b.Property<int>("Type")
 21773                        .HasColumnType("INTEGER");
 21774
 21775                    b.HasKey("Id");
 21776
 21777                    b.ToTable("MediaSegments");
 21778
 21779                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21780                });
 781
 21782            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 21783                {
 21784                    b.Property<Guid>("ItemId")
 21785                        .HasColumnType("TEXT");
 21786
 21787                    b.Property<int>("StreamIndex")
 21788                        .HasColumnType("INTEGER");
 21789
 21790                    b.Property<string>("AspectRatio")
 21791                        .HasColumnType("TEXT");
 21792
 21793                    b.Property<float?>("AverageFrameRate")
 21794                        .HasColumnType("REAL");
 21795
 21796                    b.Property<int?>("BitDepth")
 21797                        .HasColumnType("INTEGER");
 21798
 21799                    b.Property<int?>("BitRate")
 21800                        .HasColumnType("INTEGER");
 21801
 21802                    b.Property<int?>("BlPresentFlag")
 21803                        .HasColumnType("INTEGER");
 21804
 21805                    b.Property<string>("ChannelLayout")
 21806                        .HasColumnType("TEXT");
 21807
 21808                    b.Property<int?>("Channels")
 21809                        .HasColumnType("INTEGER");
 21810
 21811                    b.Property<string>("Codec")
 21812                        .HasColumnType("TEXT");
 21813
 21814                    b.Property<string>("CodecTag")
 21815                        .HasColumnType("TEXT");
 21816
 21817                    b.Property<string>("CodecTimeBase")
 21818                        .HasColumnType("TEXT");
 21819
 21820                    b.Property<string>("ColorPrimaries")
 21821                        .HasColumnType("TEXT");
 21822
 21823                    b.Property<string>("ColorSpace")
 21824                        .HasColumnType("TEXT");
 21825
 21826                    b.Property<string>("ColorTransfer")
 21827                        .HasColumnType("TEXT");
 21828
 21829                    b.Property<string>("Comment")
 21830                        .HasColumnType("TEXT");
 21831
 21832                    b.Property<int?>("DvBlSignalCompatibilityId")
 21833                        .HasColumnType("INTEGER");
 21834
 21835                    b.Property<int?>("DvLevel")
 21836                        .HasColumnType("INTEGER");
 21837
 21838                    b.Property<int?>("DvProfile")
 21839                        .HasColumnType("INTEGER");
 21840
 21841                    b.Property<int?>("DvVersionMajor")
 21842                        .HasColumnType("INTEGER");
 21843
 21844                    b.Property<int?>("DvVersionMinor")
 21845                        .HasColumnType("INTEGER");
 21846
 21847                    b.Property<int?>("ElPresentFlag")
 21848                        .HasColumnType("INTEGER");
 21849
 21850                    b.Property<int?>("Height")
 21851                        .HasColumnType("INTEGER");
 21852
 21853                    b.Property<bool?>("IsAnamorphic")
 21854                        .HasColumnType("INTEGER");
 21855
 21856                    b.Property<bool?>("IsAvc")
 21857                        .HasColumnType("INTEGER");
 21858
 21859                    b.Property<bool>("IsDefault")
 21860                        .HasColumnType("INTEGER");
 21861
 21862                    b.Property<bool>("IsExternal")
 21863                        .HasColumnType("INTEGER");
 21864
 21865                    b.Property<bool>("IsForced")
 21866                        .HasColumnType("INTEGER");
 21867
 21868                    b.Property<bool?>("IsHearingImpaired")
 21869                        .HasColumnType("INTEGER");
 21870
 21871                    b.Property<bool?>("IsInterlaced")
 21872                        .HasColumnType("INTEGER");
 21873
 21874                    b.Property<string>("KeyFrames")
 21875                        .HasColumnType("TEXT");
 21876
 21877                    b.Property<string>("Language")
 21878                        .HasColumnType("TEXT");
 21879
 21880                    b.Property<float?>("Level")
 21881                        .HasColumnType("REAL");
 21882
 21883                    b.Property<string>("NalLengthSize")
 21884                        .HasColumnType("TEXT");
 21885
 21886                    b.Property<string>("Path")
 21887                        .HasColumnType("TEXT");
 21888
 21889                    b.Property<string>("PixelFormat")
 21890                        .HasColumnType("TEXT");
 21891
 21892                    b.Property<string>("Profile")
 21893                        .HasColumnType("TEXT");
 21894
 21895                    b.Property<float?>("RealFrameRate")
 21896                        .HasColumnType("REAL");
 21897
 21898                    b.Property<int?>("RefFrames")
 21899                        .HasColumnType("INTEGER");
 21900
 21901                    b.Property<int?>("Rotation")
 21902                        .HasColumnType("INTEGER");
 21903
 21904                    b.Property<int?>("RpuPresentFlag")
 21905                        .HasColumnType("INTEGER");
 21906
 21907                    b.Property<int?>("SampleRate")
 21908                        .HasColumnType("INTEGER");
 21909
 21910                    b.Property<int>("StreamType")
 21911                        .HasColumnType("INTEGER");
 21912
 21913                    b.Property<string>("TimeBase")
 21914                        .HasColumnType("TEXT");
 21915
 21916                    b.Property<string>("Title")
 21917                        .HasColumnType("TEXT");
 21918
 21919                    b.Property<int?>("Width")
 21920                        .HasColumnType("INTEGER");
 21921
 21922                    b.HasKey("ItemId", "StreamIndex");
 21923
 21924                    b.HasIndex("StreamIndex");
 21925
 21926                    b.HasIndex("StreamType");
 21927
 21928                    b.HasIndex("StreamIndex", "StreamType");
 21929
 21930                    b.HasIndex("StreamIndex", "StreamType", "Language");
 21931
 21932                    b.ToTable("MediaStreamInfos");
 21933
 21934                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21935                });
 936
 21937            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 21938                {
 21939                    b.Property<Guid>("Id")
 21940                        .ValueGeneratedOnAdd()
 21941                        .HasColumnType("TEXT");
 21942
 21943                    b.Property<string>("Name")
 21944                        .IsRequired()
 21945                        .HasColumnType("TEXT");
 21946
 21947                    b.Property<string>("PersonType")
 21948                        .HasColumnType("TEXT");
 21949
 21950                    b.HasKey("Id");
 21951
 21952                    b.HasIndex("Name");
 21953
 21954                    b.ToTable("Peoples");
 21955
 21956                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21957                });
 958
 21959            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 21960                {
 21961                    b.Property<Guid>("ItemId")
 21962                        .HasColumnType("TEXT");
 21963
 21964                    b.Property<Guid>("PeopleId")
 21965                        .HasColumnType("TEXT");
 21966
 21967                    b.Property<int?>("ListOrder")
 21968                        .HasColumnType("INTEGER");
 21969
 21970                    b.Property<string>("Role")
 21971                        .HasColumnType("TEXT");
 21972
 21973                    b.Property<int?>("SortOrder")
 21974                        .HasColumnType("INTEGER");
 21975
 21976                    b.HasKey("ItemId", "PeopleId");
 21977
 21978                    b.HasIndex("PeopleId");
 21979
 21980                    b.HasIndex("ItemId", "ListOrder");
 21981
 21982                    b.HasIndex("ItemId", "SortOrder");
 21983
 21984                    b.ToTable("PeopleBaseItemMap");
 21985
 21986                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 21987                });
 988
 21989            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 21990                {
 21991                    b.Property<int>("Id")
 21992                        .ValueGeneratedOnAdd()
 21993                        .HasColumnType("INTEGER");
 21994
 21995                    b.Property<int>("Kind")
 21996                        .HasColumnType("INTEGER");
 21997
 21998                    b.Property<Guid?>("Permission_Permissions_Guid")
 21999                        .HasColumnType("TEXT");
 211000
 211001                    b.Property<uint>("RowVersion")
 211002                        .IsConcurrencyToken()
 211003                        .HasColumnType("INTEGER");
 211004
 211005                    b.Property<Guid?>("UserId")
 211006                        .HasColumnType("TEXT");
 211007
 211008                    b.Property<bool>("Value")
 211009                        .HasColumnType("INTEGER");
 211010
 211011                    b.HasKey("Id");
 211012
 211013                    b.HasIndex("UserId", "Kind")
 211014                        .IsUnique()
 211015                        .HasFilter("[UserId] IS NOT NULL");
 211016
 211017                    b.ToTable("Permissions");
 211018
 211019                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211020                });
 1021
 211022            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211023                {
 211024                    b.Property<int>("Id")
 211025                        .ValueGeneratedOnAdd()
 211026                        .HasColumnType("INTEGER");
 211027
 211028                    b.Property<int>("Kind")
 211029                        .HasColumnType("INTEGER");
 211030
 211031                    b.Property<Guid?>("Preference_Preferences_Guid")
 211032                        .HasColumnType("TEXT");
 211033
 211034                    b.Property<uint>("RowVersion")
 211035                        .IsConcurrencyToken()
 211036                        .HasColumnType("INTEGER");
 211037
 211038                    b.Property<Guid?>("UserId")
 211039                        .HasColumnType("TEXT");
 211040
 211041                    b.Property<string>("Value")
 211042                        .IsRequired()
 211043                        .HasMaxLength(65535)
 211044                        .HasColumnType("TEXT");
 211045
 211046                    b.HasKey("Id");
 211047
 211048                    b.HasIndex("UserId", "Kind")
 211049                        .IsUnique()
 211050                        .HasFilter("[UserId] IS NOT NULL");
 211051
 211052                    b.ToTable("Preferences");
 211053
 211054                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211055                });
 1056
 211057            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 211058                {
 211059                    b.Property<int>("Id")
 211060                        .ValueGeneratedOnAdd()
 211061                        .HasColumnType("INTEGER");
 211062
 211063                    b.Property<string>("AccessToken")
 211064                        .IsRequired()
 211065                        .HasColumnType("TEXT");
 211066
 211067                    b.Property<DateTime>("DateCreated")
 211068                        .HasColumnType("TEXT");
 211069
 211070                    b.Property<DateTime>("DateLastActivity")
 211071                        .HasColumnType("TEXT");
 211072
 211073                    b.Property<string>("Name")
 211074                        .IsRequired()
 211075                        .HasMaxLength(64)
 211076                        .HasColumnType("TEXT");
 211077
 211078                    b.HasKey("Id");
 211079
 211080                    b.HasIndex("AccessToken")
 211081                        .IsUnique();
 211082
 211083                    b.ToTable("ApiKeys");
 211084
 211085                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211086                });
 1087
 211088            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211089                {
 211090                    b.Property<int>("Id")
 211091                        .ValueGeneratedOnAdd()
 211092                        .HasColumnType("INTEGER");
 211093
 211094                    b.Property<string>("AccessToken")
 211095                        .IsRequired()
 211096                        .HasColumnType("TEXT");
 211097
 211098                    b.Property<string>("AppName")
 211099                        .IsRequired()
 211100                        .HasMaxLength(64)
 211101                        .HasColumnType("TEXT");
 211102
 211103                    b.Property<string>("AppVersion")
 211104                        .IsRequired()
 211105                        .HasMaxLength(32)
 211106                        .HasColumnType("TEXT");
 211107
 211108                    b.Property<DateTime>("DateCreated")
 211109                        .HasColumnType("TEXT");
 211110
 211111                    b.Property<DateTime>("DateLastActivity")
 211112                        .HasColumnType("TEXT");
 211113
 211114                    b.Property<DateTime>("DateModified")
 211115                        .HasColumnType("TEXT");
 211116
 211117                    b.Property<string>("DeviceId")
 211118                        .IsRequired()
 211119                        .HasMaxLength(256)
 211120                        .HasColumnType("TEXT");
 211121
 211122                    b.Property<string>("DeviceName")
 211123                        .IsRequired()
 211124                        .HasMaxLength(64)
 211125                        .HasColumnType("TEXT");
 211126
 211127                    b.Property<bool>("IsActive")
 211128                        .HasColumnType("INTEGER");
 211129
 211130                    b.Property<Guid>("UserId")
 211131                        .HasColumnType("TEXT");
 211132
 211133                    b.HasKey("Id");
 211134
 211135                    b.HasIndex("DeviceId");
 211136
 211137                    b.HasIndex("AccessToken", "DateLastActivity");
 211138
 211139                    b.HasIndex("DeviceId", "DateLastActivity");
 211140
 211141                    b.HasIndex("UserId", "DeviceId");
 211142
 211143                    b.ToTable("Devices");
 211144
 211145                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211146                });
 1147
 211148            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 211149                {
 211150                    b.Property<int>("Id")
 211151                        .ValueGeneratedOnAdd()
 211152                        .HasColumnType("INTEGER");
 211153
 211154                    b.Property<string>("CustomName")
 211155                        .HasColumnType("TEXT");
 211156
 211157                    b.Property<string>("DeviceId")
 211158                        .IsRequired()
 211159                        .HasColumnType("TEXT");
 211160
 211161                    b.HasKey("Id");
 211162
 211163                    b.HasIndex("DeviceId")
 211164                        .IsUnique();
 211165
 211166                    b.ToTable("DeviceOptions");
 211167
 211168                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211169                });
 1170
 211171            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 211172                {
 211173                    b.Property<Guid>("ItemId")
 211174                        .HasColumnType("TEXT");
 211175
 211176                    b.Property<int>("Width")
 211177                        .HasColumnType("INTEGER");
 211178
 211179                    b.Property<int>("Bandwidth")
 211180                        .HasColumnType("INTEGER");
 211181
 211182                    b.Property<int>("Height")
 211183                        .HasColumnType("INTEGER");
 211184
 211185                    b.Property<int>("Interval")
 211186                        .HasColumnType("INTEGER");
 211187
 211188                    b.Property<int>("ThumbnailCount")
 211189                        .HasColumnType("INTEGER");
 211190
 211191                    b.Property<int>("TileHeight")
 211192                        .HasColumnType("INTEGER");
 211193
 211194                    b.Property<int>("TileWidth")
 211195                        .HasColumnType("INTEGER");
 211196
 211197                    b.HasKey("ItemId", "Width");
 211198
 211199                    b.ToTable("TrickplayInfos");
 211200
 211201                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211202                });
 1203
 211204            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211205                {
 211206                    b.Property<Guid>("Id")
 211207                        .ValueGeneratedOnAdd()
 211208                        .HasColumnType("TEXT");
 211209
 211210                    b.Property<string>("AudioLanguagePreference")
 211211                        .HasMaxLength(255)
 211212                        .HasColumnType("TEXT");
 211213
 211214                    b.Property<string>("AuthenticationProviderId")
 211215                        .IsRequired()
 211216                        .HasMaxLength(255)
 211217                        .HasColumnType("TEXT");
 211218
 211219                    b.Property<string>("CastReceiverId")
 211220                        .HasMaxLength(32)
 211221                        .HasColumnType("TEXT");
 211222
 211223                    b.Property<bool>("DisplayCollectionsView")
 211224                        .HasColumnType("INTEGER");
 211225
 211226                    b.Property<bool>("DisplayMissingEpisodes")
 211227                        .HasColumnType("INTEGER");
 211228
 211229                    b.Property<bool>("EnableAutoLogin")
 211230                        .HasColumnType("INTEGER");
 211231
 211232                    b.Property<bool>("EnableLocalPassword")
 211233                        .HasColumnType("INTEGER");
 211234
 211235                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 211236                        .HasColumnType("INTEGER");
 211237
 211238                    b.Property<bool>("EnableUserPreferenceAccess")
 211239                        .HasColumnType("INTEGER");
 211240
 211241                    b.Property<bool>("HidePlayedInLatest")
 211242                        .HasColumnType("INTEGER");
 211243
 211244                    b.Property<long>("InternalId")
 211245                        .HasColumnType("INTEGER");
 211246
 211247                    b.Property<int>("InvalidLoginAttemptCount")
 211248                        .HasColumnType("INTEGER");
 211249
 211250                    b.Property<DateTime?>("LastActivityDate")
 211251                        .HasColumnType("TEXT");
 211252
 211253                    b.Property<DateTime?>("LastLoginDate")
 211254                        .HasColumnType("TEXT");
 211255
 211256                    b.Property<int?>("LoginAttemptsBeforeLockout")
 211257                        .HasColumnType("INTEGER");
 211258
 211259                    b.Property<int>("MaxActiveSessions")
 211260                        .HasColumnType("INTEGER");
 211261
 211262                    b.Property<int?>("MaxParentalRatingScore")
 211263                        .HasColumnType("INTEGER");
 211264
 211265                    b.Property<int?>("MaxParentalRatingSubScore")
 211266                        .HasColumnType("INTEGER");
 211267
 211268                    b.Property<bool>("MustUpdatePassword")
 211269                        .HasColumnType("INTEGER");
 211270
 211271                    b.Property<string>("Password")
 211272                        .HasMaxLength(65535)
 211273                        .HasColumnType("TEXT");
 211274
 211275                    b.Property<string>("PasswordResetProviderId")
 211276                        .IsRequired()
 211277                        .HasMaxLength(255)
 211278                        .HasColumnType("TEXT");
 211279
 211280                    b.Property<bool>("PlayDefaultAudioTrack")
 211281                        .HasColumnType("INTEGER");
 211282
 211283                    b.Property<bool>("RememberAudioSelections")
 211284                        .HasColumnType("INTEGER");
 211285
 211286                    b.Property<bool>("RememberSubtitleSelections")
 211287                        .HasColumnType("INTEGER");
 211288
 211289                    b.Property<int?>("RemoteClientBitrateLimit")
 211290                        .HasColumnType("INTEGER");
 211291
 211292                    b.Property<uint>("RowVersion")
 211293                        .IsConcurrencyToken()
 211294                        .HasColumnType("INTEGER");
 211295
 211296                    b.Property<string>("SubtitleLanguagePreference")
 211297                        .HasMaxLength(255)
 211298                        .HasColumnType("TEXT");
 211299
 211300                    b.Property<int>("SubtitleMode")
 211301                        .HasColumnType("INTEGER");
 211302
 211303                    b.Property<int>("SyncPlayAccess")
 211304                        .HasColumnType("INTEGER");
 211305
 211306                    b.Property<string>("Username")
 211307                        .IsRequired()
 211308                        .HasMaxLength(255)
 211309                        .HasColumnType("TEXT");
 211310
 211311                    b.HasKey("Id");
 211312
 211313                    b.HasIndex("Username")
 211314                        .IsUnique();
 211315
 211316                    b.ToTable("Users");
 211317
 211318                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211319                });
 1320
 211321            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211322                {
 211323                    b.Property<Guid>("ItemId")
 211324                        .HasColumnType("TEXT");
 211325
 211326                    b.Property<Guid>("UserId")
 211327                        .HasColumnType("TEXT");
 211328
 211329                    b.Property<string>("CustomDataKey")
 211330                        .HasColumnType("TEXT");
 211331
 211332                    b.Property<int?>("AudioStreamIndex")
 211333                        .HasColumnType("INTEGER");
 211334
 211335                    b.Property<bool>("IsFavorite")
 211336                        .HasColumnType("INTEGER");
 211337
 211338                    b.Property<DateTime?>("LastPlayedDate")
 211339                        .HasColumnType("TEXT");
 211340
 211341                    b.Property<bool?>("Likes")
 211342                        .HasColumnType("INTEGER");
 211343
 211344                    b.Property<int>("PlayCount")
 211345                        .HasColumnType("INTEGER");
 211346
 211347                    b.Property<long>("PlaybackPositionTicks")
 211348                        .HasColumnType("INTEGER");
 211349
 211350                    b.Property<bool>("Played")
 211351                        .HasColumnType("INTEGER");
 211352
 211353                    b.Property<double?>("Rating")
 211354                        .HasColumnType("REAL");
 211355
 211356                    b.Property<int?>("SubtitleStreamIndex")
 211357                        .HasColumnType("INTEGER");
 211358
 211359                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 211360
 211361                    b.HasIndex("UserId");
 211362
 211363                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 211364
 211365                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 211366
 211367                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 211368
 211369                    b.HasIndex("ItemId", "UserId", "Played");
 211370
 211371                    b.ToTable("UserData");
 211372
 211373                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 211374                });
 1375
 211376            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 211377                {
 211378                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211379                        .WithMany("AccessSchedules")
 211380                        .HasForeignKey("UserId")
 211381                        .OnDelete(DeleteBehavior.Cascade)
 211382                        .IsRequired();
 211383                });
 1384
 211385            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 211386                {
 211387                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211388                        .WithMany("Children")
 211389                        .HasForeignKey("ItemId")
 211390                        .OnDelete(DeleteBehavior.Cascade)
 211391                        .IsRequired();
 211392
 211393                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 211394                        .WithMany("ParentAncestors")
 211395                        .HasForeignKey("ParentItemId")
 211396                        .OnDelete(DeleteBehavior.Cascade)
 211397                        .IsRequired();
 211398
 211399                    b.Navigation("Item");
 211400
 211401                    b.Navigation("ParentItem");
 211402                });
 1403
 211404            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 211405                {
 211406                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211407                        .WithMany()
 211408                        .HasForeignKey("ItemId")
 211409                        .OnDelete(DeleteBehavior.Cascade)
 211410                        .IsRequired();
 211411
 211412                    b.Navigation("Item");
 211413                });
 1414
 211415            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 211416                {
 211417                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211418                        .WithMany("Images")
 211419                        .HasForeignKey("ItemId")
 211420                        .OnDelete(DeleteBehavior.Cascade)
 211421                        .IsRequired();
 211422
 211423                    b.Navigation("Item");
 211424                });
 1425
 211426            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 211427                {
 211428                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211429                        .WithMany("LockedFields")
 211430                        .HasForeignKey("ItemId")
 211431                        .OnDelete(DeleteBehavior.Cascade)
 211432                        .IsRequired();
 211433
 211434                    b.Navigation("Item");
 211435                });
 1436
 211437            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 211438                {
 211439                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211440                        .WithMany("Provider")
 211441                        .HasForeignKey("ItemId")
 211442                        .OnDelete(DeleteBehavior.Cascade)
 211443                        .IsRequired();
 211444
 211445                    b.Navigation("Item");
 211446                });
 1447
 211448            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 211449                {
 211450                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211451                        .WithMany("TrailerTypes")
 211452                        .HasForeignKey("ItemId")
 211453                        .OnDelete(DeleteBehavior.Cascade)
 211454                        .IsRequired();
 211455
 211456                    b.Navigation("Item");
 211457                });
 1458
 211459            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 211460                {
 211461                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211462                        .WithMany("Chapters")
 211463                        .HasForeignKey("ItemId")
 211464                        .OnDelete(DeleteBehavior.Cascade)
 211465                        .IsRequired();
 211466
 211467                    b.Navigation("Item");
 211468                });
 1469
 211470            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211471                {
 211472                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211473                        .WithMany("DisplayPreferences")
 211474                        .HasForeignKey("UserId")
 211475                        .OnDelete(DeleteBehavior.Cascade)
 211476                        .IsRequired();
 211477                });
 1478
 211479            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 211480                {
 211481                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 211482                        .WithMany("HomeSections")
 211483                        .HasForeignKey("DisplayPreferencesId")
 211484                        .OnDelete(DeleteBehavior.Cascade)
 211485                        .IsRequired();
 211486                });
 1487
 211488            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 211489                {
 211490                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211491                        .WithOne("ProfileImage")
 211492                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 211493                        .OnDelete(DeleteBehavior.Cascade);
 211494                });
 1495
 211496            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 211497                {
 211498                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211499                        .WithMany("ItemDisplayPreferences")
 211500                        .HasForeignKey("UserId")
 211501                        .OnDelete(DeleteBehavior.Cascade)
 211502                        .IsRequired();
 211503                });
 1504
 211505            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 211506                {
 211507                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211508                        .WithMany("ItemValues")
 211509                        .HasForeignKey("ItemId")
 211510                        .OnDelete(DeleteBehavior.Cascade)
 211511                        .IsRequired();
 211512
 211513                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 211514                        .WithMany("BaseItemsMap")
 211515                        .HasForeignKey("ItemValueId")
 211516                        .OnDelete(DeleteBehavior.Cascade)
 211517                        .IsRequired();
 211518
 211519                    b.Navigation("Item");
 211520
 211521                    b.Navigation("ItemValue");
 211522                });
 1523
 211524            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 211525                {
 211526                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211527                        .WithMany("MediaStreams")
 211528                        .HasForeignKey("ItemId")
 211529                        .OnDelete(DeleteBehavior.Cascade)
 211530                        .IsRequired();
 211531
 211532                    b.Navigation("Item");
 211533                });
 1534
 211535            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 211536                {
 211537                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211538                        .WithMany("Peoples")
 211539                        .HasForeignKey("ItemId")
 211540                        .OnDelete(DeleteBehavior.Cascade)
 211541                        .IsRequired();
 211542
 211543                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 211544                        .WithMany("BaseItems")
 211545                        .HasForeignKey("PeopleId")
 211546                        .OnDelete(DeleteBehavior.Cascade)
 211547                        .IsRequired();
 211548
 211549                    b.Navigation("Item");
 211550
 211551                    b.Navigation("People");
 211552                });
 1553
 211554            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 211555                {
 211556                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211557                        .WithMany("Permissions")
 211558                        .HasForeignKey("UserId")
 211559                        .OnDelete(DeleteBehavior.Cascade);
 211560                });
 1561
 211562            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 211563                {
 211564                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 211565                        .WithMany("Preferences")
 211566                        .HasForeignKey("UserId")
 211567                        .OnDelete(DeleteBehavior.Cascade);
 211568                });
 1569
 211570            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 211571                {
 211572                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211573                        .WithMany()
 211574                        .HasForeignKey("UserId")
 211575                        .OnDelete(DeleteBehavior.Cascade)
 211576                        .IsRequired();
 211577
 211578                    b.Navigation("User");
 211579                });
 1580
 211581            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 211582                {
 211583                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 211584                        .WithMany("UserData")
 211585                        .HasForeignKey("ItemId")
 211586                        .OnDelete(DeleteBehavior.Cascade)
 211587                        .IsRequired();
 211588
 211589                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 211590                        .WithMany()
 211591                        .HasForeignKey("UserId")
 211592                        .OnDelete(DeleteBehavior.Cascade)
 211593                        .IsRequired();
 211594
 211595                    b.Navigation("Item");
 211596
 211597                    b.Navigation("User");
 211598                });
 1599
 211600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 211601                {
 211602                    b.Navigation("Chapters");
 211603
 211604                    b.Navigation("Children");
 211605
 211606                    b.Navigation("Images");
 211607
 211608                    b.Navigation("ItemValues");
 211609
 211610                    b.Navigation("LockedFields");
 211611
 211612                    b.Navigation("MediaStreams");
 211613
 211614                    b.Navigation("ParentAncestors");
 211615
 211616                    b.Navigation("Peoples");
 211617
 211618                    b.Navigation("Provider");
 211619
 211620                    b.Navigation("TrailerTypes");
 211621
 211622                    b.Navigation("UserData");
 211623                });
 1624
 211625            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 211626                {
 211627                    b.Navigation("HomeSections");
 211628                });
 1629
 211630            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 211631                {
 211632                    b.Navigation("BaseItemsMap");
 211633                });
 1634
 211635            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 211636                {
 211637                    b.Navigation("BaseItems");
 211638                });
 1639
 211640            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 211641                {
 211642                    b.Navigation("AccessSchedules");
 211643
 211644                    b.Navigation("DisplayPreferences");
 211645
 211646                    b.Navigation("ItemDisplayPreferences");
 211647
 211648                    b.Navigation("Permissions");
 211649
 211650                    b.Navigation("Preferences");
 211651
 211652                    b.Navigation("ProfileImage");
 211653                });
 1654#pragma warning restore 612, 618
 211655        }
 1656    }
 1657}