< Summary - Jellyfin

Line coverage
99%
Covered lines: 1622
Uncovered lines: 3
Coverable lines: 1625
Total lines: 1722
Line coverage: 99.8%
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/20250327101120_AddKeyframeData.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class AddKeyframeData : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2114            migrationBuilder.CreateTable(
 2115                name: "KeyframeData",
 2116                columns: table => new
 2117                {
 2118                    ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
 2119                    TotalDuration = table.Column<long>(type: "INTEGER", nullable: false),
 2120                    KeyframeTicks = table.Column<string>(type: "TEXT", nullable: true)
 2121                },
 2122                constraints: table =>
 2123                {
 2124                    table.PrimaryKey("PK_KeyframeData", x => x.ItemId);
 2125                    table.ForeignKey(
 2126                        name: "FK_KeyframeData_BaseItems_ItemId",
 2127                        column: x => x.ItemId,
 2128                        principalTable: "BaseItems",
 2129                        principalColumn: "Id",
 2130                        onDelete: ReferentialAction.Cascade);
 2131                });
 2132        }
 33
 34        /// <inheritdoc />
 35        protected override void Down(MigrationBuilder migrationBuilder)
 36        {
 037            migrationBuilder.DropTable(
 038                name: "KeyframeData");
 039        }
 40    }
 41}

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