< Summary - Jellyfin

Line coverage
99%
Covered lines: 1628
Uncovered lines: 3
Coverable lines: 1631
Total lines: 1728
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 5/12/2026 - 12:15:57 AM Line coverage: 99.8% (1622/1625) Total lines: 17228/11/2026 - 12:17:00 AM Line coverage: 99.8% (1628/1631) Total lines: 1728

Coverage delta

Coverage delta 1 -1

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        {
 2714            migrationBuilder.CreateTable(
 2715                name: "KeyframeData",
 2716                columns: table => new
 2717                {
 2718                    ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
 2719                    TotalDuration = table.Column<long>(type: "INTEGER", nullable: false),
 2720                    KeyframeTicks = table.Column<string>(type: "TEXT", nullable: true)
 2721                },
 2722                constraints: table =>
 2723                {
 2724                    table.PrimaryKey("PK_KeyframeData", x => x.ItemId);
 2725                    table.ForeignKey(
 2726                        name: "FK_KeyframeData_BaseItems_ItemId",
 2727                        column: x => x.ItemId,
 2728                        principalTable: "BaseItems",
 2729                        principalColumn: "Id",
 2730                        onDelete: ReferentialAction.Cascade);
 2731                });
 2732        }
 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
 2721            modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
 22
 2723            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 2724                {
 2725                    b.Property<int>("Id")
 2726                        .ValueGeneratedOnAdd()
 2727                        .HasColumnType("INTEGER");
 2728
 2729                    b.Property<int>("DayOfWeek")
 2730                        .HasColumnType("INTEGER");
 2731
 2732                    b.Property<double>("EndHour")
 2733                        .HasColumnType("REAL");
 2734
 2735                    b.Property<double>("StartHour")
 2736                        .HasColumnType("REAL");
 2737
 2738                    b.Property<Guid>("UserId")
 2739                        .HasColumnType("TEXT");
 2740
 2741                    b.HasKey("Id");
 2742
 2743                    b.HasIndex("UserId");
 2744
 2745                    b.ToTable("AccessSchedules");
 2746
 2747                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2748                });
 49
 2750            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 2751                {
 2752                    b.Property<int>("Id")
 2753                        .ValueGeneratedOnAdd()
 2754                        .HasColumnType("INTEGER");
 2755
 2756                    b.Property<DateTime>("DateCreated")
 2757                        .HasColumnType("TEXT");
 2758
 2759                    b.Property<string>("ItemId")
 2760                        .HasMaxLength(256)
 2761                        .HasColumnType("TEXT");
 2762
 2763                    b.Property<int>("LogSeverity")
 2764                        .HasColumnType("INTEGER");
 2765
 2766                    b.Property<string>("Name")
 2767                        .IsRequired()
 2768                        .HasMaxLength(512)
 2769                        .HasColumnType("TEXT");
 2770
 2771                    b.Property<string>("Overview")
 2772                        .HasMaxLength(512)
 2773                        .HasColumnType("TEXT");
 2774
 2775                    b.Property<uint>("RowVersion")
 2776                        .IsConcurrencyToken()
 2777                        .HasColumnType("INTEGER");
 2778
 2779                    b.Property<string>("ShortOverview")
 2780                        .HasMaxLength(512)
 2781                        .HasColumnType("TEXT");
 2782
 2783                    b.Property<string>("Type")
 2784                        .IsRequired()
 2785                        .HasMaxLength(256)
 2786                        .HasColumnType("TEXT");
 2787
 2788                    b.Property<Guid>("UserId")
 2789                        .HasColumnType("TEXT");
 2790
 2791                    b.HasKey("Id");
 2792
 2793                    b.HasIndex("DateCreated");
 2794
 2795                    b.ToTable("ActivityLogs");
 2796
 2797                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 2798                });
 99
 27100            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 27101                {
 27102                    b.Property<Guid>("ItemId")
 27103                        .HasColumnType("TEXT");
 27104
 27105                    b.Property<Guid>("ParentItemId")
 27106                        .HasColumnType("TEXT");
 27107
 27108                    b.HasKey("ItemId", "ParentItemId");
 27109
 27110                    b.HasIndex("ParentItemId");
 27111
 27112                    b.ToTable("AncestorIds");
 27113
 27114                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27115                });
 116
 27117            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 27118                {
 27119                    b.Property<Guid>("ItemId")
 27120                        .HasColumnType("TEXT");
 27121
 27122                    b.Property<int>("Index")
 27123                        .HasColumnType("INTEGER");
 27124
 27125                    b.Property<string>("Codec")
 27126                        .IsRequired()
 27127                        .HasColumnType("TEXT");
 27128
 27129                    b.Property<string>("CodecTag")
 27130                        .HasColumnType("TEXT");
 27131
 27132                    b.Property<string>("Comment")
 27133                        .HasColumnType("TEXT");
 27134
 27135                    b.Property<string>("Filename")
 27136                        .HasColumnType("TEXT");
 27137
 27138                    b.Property<string>("MimeType")
 27139                        .HasColumnType("TEXT");
 27140
 27141                    b.HasKey("ItemId", "Index");
 27142
 27143                    b.ToTable("AttachmentStreamInfos");
 27144
 27145                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27146                });
 147
 27148            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 27149                {
 27150                    b.Property<Guid>("Id")
 27151                        .ValueGeneratedOnAdd()
 27152                        .HasColumnType("TEXT");
 27153
 27154                    b.Property<string>("Album")
 27155                        .HasColumnType("TEXT");
 27156
 27157                    b.Property<string>("AlbumArtists")
 27158                        .HasColumnType("TEXT");
 27159
 27160                    b.Property<string>("Artists")
 27161                        .HasColumnType("TEXT");
 27162
 27163                    b.Property<int?>("Audio")
 27164                        .HasColumnType("INTEGER");
 27165
 27166                    b.Property<Guid?>("ChannelId")
 27167                        .HasColumnType("TEXT");
 27168
 27169                    b.Property<string>("CleanName")
 27170                        .HasColumnType("TEXT");
 27171
 27172                    b.Property<float?>("CommunityRating")
 27173                        .HasColumnType("REAL");
 27174
 27175                    b.Property<float?>("CriticRating")
 27176                        .HasColumnType("REAL");
 27177
 27178                    b.Property<string>("CustomRating")
 27179                        .HasColumnType("TEXT");
 27180
 27181                    b.Property<string>("Data")
 27182                        .HasColumnType("TEXT");
 27183
 27184                    b.Property<DateTime?>("DateCreated")
 27185                        .HasColumnType("TEXT");
 27186
 27187                    b.Property<DateTime?>("DateLastMediaAdded")
 27188                        .HasColumnType("TEXT");
 27189
 27190                    b.Property<DateTime?>("DateLastRefreshed")
 27191                        .HasColumnType("TEXT");
 27192
 27193                    b.Property<DateTime?>("DateLastSaved")
 27194                        .HasColumnType("TEXT");
 27195
 27196                    b.Property<DateTime?>("DateModified")
 27197                        .HasColumnType("TEXT");
 27198
 27199                    b.Property<DateTime?>("EndDate")
 27200                        .HasColumnType("TEXT");
 27201
 27202                    b.Property<string>("EpisodeTitle")
 27203                        .HasColumnType("TEXT");
 27204
 27205                    b.Property<string>("ExternalId")
 27206                        .HasColumnType("TEXT");
 27207
 27208                    b.Property<string>("ExternalSeriesId")
 27209                        .HasColumnType("TEXT");
 27210
 27211                    b.Property<string>("ExternalServiceId")
 27212                        .HasColumnType("TEXT");
 27213
 27214                    b.Property<string>("ExtraIds")
 27215                        .HasColumnType("TEXT");
 27216
 27217                    b.Property<int?>("ExtraType")
 27218                        .HasColumnType("INTEGER");
 27219
 27220                    b.Property<string>("ForcedSortName")
 27221                        .HasColumnType("TEXT");
 27222
 27223                    b.Property<string>("Genres")
 27224                        .HasColumnType("TEXT");
 27225
 27226                    b.Property<int?>("Height")
 27227                        .HasColumnType("INTEGER");
 27228
 27229                    b.Property<int?>("IndexNumber")
 27230                        .HasColumnType("INTEGER");
 27231
 27232                    b.Property<int?>("InheritedParentalRatingSubValue")
 27233                        .HasColumnType("INTEGER");
 27234
 27235                    b.Property<int?>("InheritedParentalRatingValue")
 27236                        .HasColumnType("INTEGER");
 27237
 27238                    b.Property<bool>("IsFolder")
 27239                        .HasColumnType("INTEGER");
 27240
 27241                    b.Property<bool>("IsInMixedFolder")
 27242                        .HasColumnType("INTEGER");
 27243
 27244                    b.Property<bool>("IsLocked")
 27245                        .HasColumnType("INTEGER");
 27246
 27247                    b.Property<bool>("IsMovie")
 27248                        .HasColumnType("INTEGER");
 27249
 27250                    b.Property<bool>("IsRepeat")
 27251                        .HasColumnType("INTEGER");
 27252
 27253                    b.Property<bool>("IsSeries")
 27254                        .HasColumnType("INTEGER");
 27255
 27256                    b.Property<bool>("IsVirtualItem")
 27257                        .HasColumnType("INTEGER");
 27258
 27259                    b.Property<float?>("LUFS")
 27260                        .HasColumnType("REAL");
 27261
 27262                    b.Property<string>("MediaType")
 27263                        .HasColumnType("TEXT");
 27264
 27265                    b.Property<string>("Name")
 27266                        .HasColumnType("TEXT");
 27267
 27268                    b.Property<float?>("NormalizationGain")
 27269                        .HasColumnType("REAL");
 27270
 27271                    b.Property<string>("OfficialRating")
 27272                        .HasColumnType("TEXT");
 27273
 27274                    b.Property<string>("OriginalTitle")
 27275                        .HasColumnType("TEXT");
 27276
 27277                    b.Property<string>("Overview")
 27278                        .HasColumnType("TEXT");
 27279
 27280                    b.Property<string>("OwnerId")
 27281                        .HasColumnType("TEXT");
 27282
 27283                    b.Property<Guid?>("ParentId")
 27284                        .HasColumnType("TEXT");
 27285
 27286                    b.Property<int?>("ParentIndexNumber")
 27287                        .HasColumnType("INTEGER");
 27288
 27289                    b.Property<string>("Path")
 27290                        .HasColumnType("TEXT");
 27291
 27292                    b.Property<string>("PreferredMetadataCountryCode")
 27293                        .HasColumnType("TEXT");
 27294
 27295                    b.Property<string>("PreferredMetadataLanguage")
 27296                        .HasColumnType("TEXT");
 27297
 27298                    b.Property<DateTime?>("PremiereDate")
 27299                        .HasColumnType("TEXT");
 27300
 27301                    b.Property<string>("PresentationUniqueKey")
 27302                        .HasColumnType("TEXT");
 27303
 27304                    b.Property<string>("PrimaryVersionId")
 27305                        .HasColumnType("TEXT");
 27306
 27307                    b.Property<string>("ProductionLocations")
 27308                        .HasColumnType("TEXT");
 27309
 27310                    b.Property<int?>("ProductionYear")
 27311                        .HasColumnType("INTEGER");
 27312
 27313                    b.Property<long?>("RunTimeTicks")
 27314                        .HasColumnType("INTEGER");
 27315
 27316                    b.Property<Guid?>("SeasonId")
 27317                        .HasColumnType("TEXT");
 27318
 27319                    b.Property<string>("SeasonName")
 27320                        .HasColumnType("TEXT");
 27321
 27322                    b.Property<Guid?>("SeriesId")
 27323                        .HasColumnType("TEXT");
 27324
 27325                    b.Property<string>("SeriesName")
 27326                        .HasColumnType("TEXT");
 27327
 27328                    b.Property<string>("SeriesPresentationUniqueKey")
 27329                        .HasColumnType("TEXT");
 27330
 27331                    b.Property<string>("ShowId")
 27332                        .HasColumnType("TEXT");
 27333
 27334                    b.Property<long?>("Size")
 27335                        .HasColumnType("INTEGER");
 27336
 27337                    b.Property<string>("SortName")
 27338                        .HasColumnType("TEXT");
 27339
 27340                    b.Property<DateTime?>("StartDate")
 27341                        .HasColumnType("TEXT");
 27342
 27343                    b.Property<string>("Studios")
 27344                        .HasColumnType("TEXT");
 27345
 27346                    b.Property<string>("Tagline")
 27347                        .HasColumnType("TEXT");
 27348
 27349                    b.Property<string>("Tags")
 27350                        .HasColumnType("TEXT");
 27351
 27352                    b.Property<Guid?>("TopParentId")
 27353                        .HasColumnType("TEXT");
 27354
 27355                    b.Property<int?>("TotalBitrate")
 27356                        .HasColumnType("INTEGER");
 27357
 27358                    b.Property<string>("Type")
 27359                        .IsRequired()
 27360                        .HasColumnType("TEXT");
 27361
 27362                    b.Property<string>("UnratedType")
 27363                        .HasColumnType("TEXT");
 27364
 27365                    b.Property<int?>("Width")
 27366                        .HasColumnType("INTEGER");
 27367
 27368                    b.HasKey("Id");
 27369
 27370                    b.HasIndex("ParentId");
 27371
 27372                    b.HasIndex("Path");
 27373
 27374                    b.HasIndex("PresentationUniqueKey");
 27375
 27376                    b.HasIndex("TopParentId", "Id");
 27377
 27378                    b.HasIndex("Type", "TopParentId", "Id");
 27379
 27380                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 27381
 27382                    b.HasIndex("Type", "TopParentId", "StartDate");
 27383
 27384                    b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem");
 27385
 27386                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 27387
 27388                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 27389
 27390                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 27391
 27392                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27393
 27394                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 27395
 27396                    b.ToTable("BaseItems");
 27397
 27398                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27399                });
 400
 27401            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 27402                {
 27403                    b.Property<Guid>("Id")
 27404                        .ValueGeneratedOnAdd()
 27405                        .HasColumnType("TEXT");
 27406
 27407                    b.Property<byte[]>("Blurhash")
 27408                        .HasColumnType("BLOB");
 27409
 27410                    b.Property<DateTime>("DateModified")
 27411                        .HasColumnType("TEXT");
 27412
 27413                    b.Property<int>("Height")
 27414                        .HasColumnType("INTEGER");
 27415
 27416                    b.Property<int>("ImageType")
 27417                        .HasColumnType("INTEGER");
 27418
 27419                    b.Property<Guid>("ItemId")
 27420                        .HasColumnType("TEXT");
 27421
 27422                    b.Property<string>("Path")
 27423                        .IsRequired()
 27424                        .HasColumnType("TEXT");
 27425
 27426                    b.Property<int>("Width")
 27427                        .HasColumnType("INTEGER");
 27428
 27429                    b.HasKey("Id");
 27430
 27431                    b.HasIndex("ItemId");
 27432
 27433                    b.ToTable("BaseItemImageInfos");
 27434
 27435                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27436                });
 437
 27438            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 27439                {
 27440                    b.Property<int>("Id")
 27441                        .HasColumnType("INTEGER");
 27442
 27443                    b.Property<Guid>("ItemId")
 27444                        .HasColumnType("TEXT");
 27445
 27446                    b.HasKey("Id", "ItemId");
 27447
 27448                    b.HasIndex("ItemId");
 27449
 27450                    b.ToTable("BaseItemMetadataFields");
 27451
 27452                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27453                });
 454
 27455            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 27456                {
 27457                    b.Property<Guid>("ItemId")
 27458                        .HasColumnType("TEXT");
 27459
 27460                    b.Property<string>("ProviderId")
 27461                        .HasColumnType("TEXT");
 27462
 27463                    b.Property<string>("ProviderValue")
 27464                        .IsRequired()
 27465                        .HasColumnType("TEXT");
 27466
 27467                    b.HasKey("ItemId", "ProviderId");
 27468
 27469                    b.HasIndex("ProviderId", "ProviderValue", "ItemId");
 27470
 27471                    b.ToTable("BaseItemProviders");
 27472
 27473                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27474                });
 475
 27476            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 27477                {
 27478                    b.Property<int>("Id")
 27479                        .HasColumnType("INTEGER");
 27480
 27481                    b.Property<Guid>("ItemId")
 27482                        .HasColumnType("TEXT");
 27483
 27484                    b.HasKey("Id", "ItemId");
 27485
 27486                    b.HasIndex("ItemId");
 27487
 27488                    b.ToTable("BaseItemTrailerTypes");
 27489
 27490                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27491                });
 492
 27493            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 27494                {
 27495                    b.Property<Guid>("ItemId")
 27496                        .HasColumnType("TEXT");
 27497
 27498                    b.Property<int>("ChapterIndex")
 27499                        .HasColumnType("INTEGER");
 27500
 27501                    b.Property<DateTime?>("ImageDateModified")
 27502                        .HasColumnType("TEXT");
 27503
 27504                    b.Property<string>("ImagePath")
 27505                        .HasColumnType("TEXT");
 27506
 27507                    b.Property<string>("Name")
 27508                        .HasColumnType("TEXT");
 27509
 27510                    b.Property<long>("StartPositionTicks")
 27511                        .HasColumnType("INTEGER");
 27512
 27513                    b.HasKey("ItemId", "ChapterIndex");
 27514
 27515                    b.ToTable("Chapters");
 27516
 27517                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27518                });
 519
 27520            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 27521                {
 27522                    b.Property<int>("Id")
 27523                        .ValueGeneratedOnAdd()
 27524                        .HasColumnType("INTEGER");
 27525
 27526                    b.Property<string>("Client")
 27527                        .IsRequired()
 27528                        .HasMaxLength(32)
 27529                        .HasColumnType("TEXT");
 27530
 27531                    b.Property<Guid>("ItemId")
 27532                        .HasColumnType("TEXT");
 27533
 27534                    b.Property<string>("Key")
 27535                        .IsRequired()
 27536                        .HasColumnType("TEXT");
 27537
 27538                    b.Property<Guid>("UserId")
 27539                        .HasColumnType("TEXT");
 27540
 27541                    b.Property<string>("Value")
 27542                        .HasColumnType("TEXT");
 27543
 27544                    b.HasKey("Id");
 27545
 27546                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27547                        .IsUnique();
 27548
 27549                    b.ToTable("CustomItemDisplayPreferences");
 27550
 27551                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27552                });
 553
 27554            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 27555                {
 27556                    b.Property<int>("Id")
 27557                        .ValueGeneratedOnAdd()
 27558                        .HasColumnType("INTEGER");
 27559
 27560                    b.Property<int>("ChromecastVersion")
 27561                        .HasColumnType("INTEGER");
 27562
 27563                    b.Property<string>("Client")
 27564                        .IsRequired()
 27565                        .HasMaxLength(32)
 27566                        .HasColumnType("TEXT");
 27567
 27568                    b.Property<string>("DashboardTheme")
 27569                        .HasMaxLength(32)
 27570                        .HasColumnType("TEXT");
 27571
 27572                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27573                        .HasColumnType("INTEGER");
 27574
 27575                    b.Property<int?>("IndexBy")
 27576                        .HasColumnType("INTEGER");
 27577
 27578                    b.Property<Guid>("ItemId")
 27579                        .HasColumnType("TEXT");
 27580
 27581                    b.Property<int>("ScrollDirection")
 27582                        .HasColumnType("INTEGER");
 27583
 27584                    b.Property<bool>("ShowBackdrop")
 27585                        .HasColumnType("INTEGER");
 27586
 27587                    b.Property<bool>("ShowSidebar")
 27588                        .HasColumnType("INTEGER");
 27589
 27590                    b.Property<int>("SkipBackwardLength")
 27591                        .HasColumnType("INTEGER");
 27592
 27593                    b.Property<int>("SkipForwardLength")
 27594                        .HasColumnType("INTEGER");
 27595
 27596                    b.Property<string>("TvHome")
 27597                        .HasMaxLength(32)
 27598                        .HasColumnType("TEXT");
 27599
 27600                    b.Property<Guid>("UserId")
 27601                        .HasColumnType("TEXT");
 27602
 27603                    b.HasKey("Id");
 27604
 27605                    b.HasIndex("UserId", "ItemId", "Client")
 27606                        .IsUnique();
 27607
 27608                    b.ToTable("DisplayPreferences");
 27609
 27610                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27611                });
 612
 27613            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 27614                {
 27615                    b.Property<int>("Id")
 27616                        .ValueGeneratedOnAdd()
 27617                        .HasColumnType("INTEGER");
 27618
 27619                    b.Property<int>("DisplayPreferencesId")
 27620                        .HasColumnType("INTEGER");
 27621
 27622                    b.Property<int>("Order")
 27623                        .HasColumnType("INTEGER");
 27624
 27625                    b.Property<int>("Type")
 27626                        .HasColumnType("INTEGER");
 27627
 27628                    b.HasKey("Id");
 27629
 27630                    b.HasIndex("DisplayPreferencesId");
 27631
 27632                    b.ToTable("HomeSection");
 27633
 27634                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27635                });
 636
 27637            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 27638                {
 27639                    b.Property<int>("Id")
 27640                        .ValueGeneratedOnAdd()
 27641                        .HasColumnType("INTEGER");
 27642
 27643                    b.Property<DateTime>("LastModified")
 27644                        .HasColumnType("TEXT");
 27645
 27646                    b.Property<string>("Path")
 27647                        .IsRequired()
 27648                        .HasMaxLength(512)
 27649                        .HasColumnType("TEXT");
 27650
 27651                    b.Property<Guid?>("UserId")
 27652                        .HasColumnType("TEXT");
 27653
 27654                    b.HasKey("Id");
 27655
 27656                    b.HasIndex("UserId")
 27657                        .IsUnique();
 27658
 27659                    b.ToTable("ImageInfos");
 27660
 27661                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27662                });
 663
 27664            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 27665                {
 27666                    b.Property<int>("Id")
 27667                        .ValueGeneratedOnAdd()
 27668                        .HasColumnType("INTEGER");
 27669
 27670                    b.Property<string>("Client")
 27671                        .IsRequired()
 27672                        .HasMaxLength(32)
 27673                        .HasColumnType("TEXT");
 27674
 27675                    b.Property<int?>("IndexBy")
 27676                        .HasColumnType("INTEGER");
 27677
 27678                    b.Property<Guid>("ItemId")
 27679                        .HasColumnType("TEXT");
 27680
 27681                    b.Property<bool>("RememberIndexing")
 27682                        .HasColumnType("INTEGER");
 27683
 27684                    b.Property<bool>("RememberSorting")
 27685                        .HasColumnType("INTEGER");
 27686
 27687                    b.Property<string>("SortBy")
 27688                        .IsRequired()
 27689                        .HasMaxLength(64)
 27690                        .HasColumnType("TEXT");
 27691
 27692                    b.Property<int>("SortOrder")
 27693                        .HasColumnType("INTEGER");
 27694
 27695                    b.Property<Guid>("UserId")
 27696                        .HasColumnType("TEXT");
 27697
 27698                    b.Property<int>("ViewType")
 27699                        .HasColumnType("INTEGER");
 27700
 27701                    b.HasKey("Id");
 27702
 27703                    b.HasIndex("UserId");
 27704
 27705                    b.ToTable("ItemDisplayPreferences");
 27706
 27707                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27708                });
 709
 27710            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 27711                {
 27712                    b.Property<Guid>("ItemValueId")
 27713                        .ValueGeneratedOnAdd()
 27714                        .HasColumnType("TEXT");
 27715
 27716                    b.Property<string>("CleanValue")
 27717                        .IsRequired()
 27718                        .HasColumnType("TEXT");
 27719
 27720                    b.Property<int>("Type")
 27721                        .HasColumnType("INTEGER");
 27722
 27723                    b.Property<string>("Value")
 27724                        .IsRequired()
 27725                        .HasColumnType("TEXT");
 27726
 27727                    b.HasKey("ItemValueId");
 27728
 27729                    b.HasIndex("Type", "CleanValue")
 27730                        .IsUnique();
 27731
 27732                    b.ToTable("ItemValues");
 27733
 27734                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27735                });
 736
 27737            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 27738                {
 27739                    b.Property<Guid>("ItemValueId")
 27740                        .HasColumnType("TEXT");
 27741
 27742                    b.Property<Guid>("ItemId")
 27743                        .HasColumnType("TEXT");
 27744
 27745                    b.HasKey("ItemValueId", "ItemId");
 27746
 27747                    b.HasIndex("ItemId");
 27748
 27749                    b.ToTable("ItemValuesMap");
 27750
 27751                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27752                });
 753
 27754            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 27755                {
 27756                    b.Property<Guid>("ItemId")
 27757                        .HasColumnType("TEXT");
 27758
 27759                    b.PrimitiveCollection<string>("KeyframeTicks")
 27760                        .HasColumnType("TEXT");
 27761
 27762                    b.Property<long>("TotalDuration")
 27763                        .HasColumnType("INTEGER");
 27764
 27765                    b.HasKey("ItemId");
 27766
 27767                    b.ToTable("KeyframeData");
 27768
 27769                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27770                });
 771
 27772            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 27773                {
 27774                    b.Property<Guid>("Id")
 27775                        .ValueGeneratedOnAdd()
 27776                        .HasColumnType("TEXT");
 27777
 27778                    b.Property<long>("EndTicks")
 27779                        .HasColumnType("INTEGER");
 27780
 27781                    b.Property<Guid>("ItemId")
 27782                        .HasColumnType("TEXT");
 27783
 27784                    b.Property<string>("SegmentProviderId")
 27785                        .IsRequired()
 27786                        .HasColumnType("TEXT");
 27787
 27788                    b.Property<long>("StartTicks")
 27789                        .HasColumnType("INTEGER");
 27790
 27791                    b.Property<int>("Type")
 27792                        .HasColumnType("INTEGER");
 27793
 27794                    b.HasKey("Id");
 27795
 27796                    b.ToTable("MediaSegments");
 27797
 27798                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27799                });
 800
 27801            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 27802                {
 27803                    b.Property<Guid>("ItemId")
 27804                        .HasColumnType("TEXT");
 27805
 27806                    b.Property<int>("StreamIndex")
 27807                        .HasColumnType("INTEGER");
 27808
 27809                    b.Property<string>("AspectRatio")
 27810                        .HasColumnType("TEXT");
 27811
 27812                    b.Property<float?>("AverageFrameRate")
 27813                        .HasColumnType("REAL");
 27814
 27815                    b.Property<int?>("BitDepth")
 27816                        .HasColumnType("INTEGER");
 27817
 27818                    b.Property<int?>("BitRate")
 27819                        .HasColumnType("INTEGER");
 27820
 27821                    b.Property<int?>("BlPresentFlag")
 27822                        .HasColumnType("INTEGER");
 27823
 27824                    b.Property<string>("ChannelLayout")
 27825                        .HasColumnType("TEXT");
 27826
 27827                    b.Property<int?>("Channels")
 27828                        .HasColumnType("INTEGER");
 27829
 27830                    b.Property<string>("Codec")
 27831                        .HasColumnType("TEXT");
 27832
 27833                    b.Property<string>("CodecTag")
 27834                        .HasColumnType("TEXT");
 27835
 27836                    b.Property<string>("CodecTimeBase")
 27837                        .HasColumnType("TEXT");
 27838
 27839                    b.Property<string>("ColorPrimaries")
 27840                        .HasColumnType("TEXT");
 27841
 27842                    b.Property<string>("ColorSpace")
 27843                        .HasColumnType("TEXT");
 27844
 27845                    b.Property<string>("ColorTransfer")
 27846                        .HasColumnType("TEXT");
 27847
 27848                    b.Property<string>("Comment")
 27849                        .HasColumnType("TEXT");
 27850
 27851                    b.Property<int?>("DvBlSignalCompatibilityId")
 27852                        .HasColumnType("INTEGER");
 27853
 27854                    b.Property<int?>("DvLevel")
 27855                        .HasColumnType("INTEGER");
 27856
 27857                    b.Property<int?>("DvProfile")
 27858                        .HasColumnType("INTEGER");
 27859
 27860                    b.Property<int?>("DvVersionMajor")
 27861                        .HasColumnType("INTEGER");
 27862
 27863                    b.Property<int?>("DvVersionMinor")
 27864                        .HasColumnType("INTEGER");
 27865
 27866                    b.Property<int?>("ElPresentFlag")
 27867                        .HasColumnType("INTEGER");
 27868
 27869                    b.Property<int?>("Height")
 27870                        .HasColumnType("INTEGER");
 27871
 27872                    b.Property<bool?>("IsAnamorphic")
 27873                        .HasColumnType("INTEGER");
 27874
 27875                    b.Property<bool?>("IsAvc")
 27876                        .HasColumnType("INTEGER");
 27877
 27878                    b.Property<bool>("IsDefault")
 27879                        .HasColumnType("INTEGER");
 27880
 27881                    b.Property<bool>("IsExternal")
 27882                        .HasColumnType("INTEGER");
 27883
 27884                    b.Property<bool>("IsForced")
 27885                        .HasColumnType("INTEGER");
 27886
 27887                    b.Property<bool?>("IsHearingImpaired")
 27888                        .HasColumnType("INTEGER");
 27889
 27890                    b.Property<bool?>("IsInterlaced")
 27891                        .HasColumnType("INTEGER");
 27892
 27893                    b.Property<string>("KeyFrames")
 27894                        .HasColumnType("TEXT");
 27895
 27896                    b.Property<string>("Language")
 27897                        .HasColumnType("TEXT");
 27898
 27899                    b.Property<float?>("Level")
 27900                        .HasColumnType("REAL");
 27901
 27902                    b.Property<string>("NalLengthSize")
 27903                        .HasColumnType("TEXT");
 27904
 27905                    b.Property<string>("Path")
 27906                        .HasColumnType("TEXT");
 27907
 27908                    b.Property<string>("PixelFormat")
 27909                        .HasColumnType("TEXT");
 27910
 27911                    b.Property<string>("Profile")
 27912                        .HasColumnType("TEXT");
 27913
 27914                    b.Property<float?>("RealFrameRate")
 27915                        .HasColumnType("REAL");
 27916
 27917                    b.Property<int?>("RefFrames")
 27918                        .HasColumnType("INTEGER");
 27919
 27920                    b.Property<int?>("Rotation")
 27921                        .HasColumnType("INTEGER");
 27922
 27923                    b.Property<int?>("RpuPresentFlag")
 27924                        .HasColumnType("INTEGER");
 27925
 27926                    b.Property<int?>("SampleRate")
 27927                        .HasColumnType("INTEGER");
 27928
 27929                    b.Property<int>("StreamType")
 27930                        .HasColumnType("INTEGER");
 27931
 27932                    b.Property<string>("TimeBase")
 27933                        .HasColumnType("TEXT");
 27934
 27935                    b.Property<string>("Title")
 27936                        .HasColumnType("TEXT");
 27937
 27938                    b.Property<int?>("Width")
 27939                        .HasColumnType("INTEGER");
 27940
 27941                    b.HasKey("ItemId", "StreamIndex");
 27942
 27943                    b.HasIndex("StreamIndex");
 27944
 27945                    b.HasIndex("StreamType");
 27946
 27947                    b.HasIndex("StreamIndex", "StreamType");
 27948
 27949                    b.HasIndex("StreamIndex", "StreamType", "Language");
 27950
 27951                    b.ToTable("MediaStreamInfos");
 27952
 27953                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27954                });
 955
 27956            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 27957                {
 27958                    b.Property<Guid>("Id")
 27959                        .ValueGeneratedOnAdd()
 27960                        .HasColumnType("TEXT");
 27961
 27962                    b.Property<string>("Name")
 27963                        .IsRequired()
 27964                        .HasColumnType("TEXT");
 27965
 27966                    b.Property<string>("PersonType")
 27967                        .HasColumnType("TEXT");
 27968
 27969                    b.HasKey("Id");
 27970
 27971                    b.HasIndex("Name");
 27972
 27973                    b.ToTable("Peoples");
 27974
 27975                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 27976                });
 977
 27978            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 27979                {
 27980                    b.Property<Guid>("ItemId")
 27981                        .HasColumnType("TEXT");
 27982
 27983                    b.Property<Guid>("PeopleId")
 27984                        .HasColumnType("TEXT");
 27985
 27986                    b.Property<int?>("ListOrder")
 27987                        .HasColumnType("INTEGER");
 27988
 27989                    b.Property<string>("Role")
 27990                        .HasColumnType("TEXT");
 27991
 27992                    b.Property<int?>("SortOrder")
 27993                        .HasColumnType("INTEGER");
 27994
 27995                    b.HasKey("ItemId", "PeopleId");
 27996
 27997                    b.HasIndex("PeopleId");
 27998
 27999                    b.HasIndex("ItemId", "ListOrder");
 271000
 271001                    b.HasIndex("ItemId", "SortOrder");
 271002
 271003                    b.ToTable("PeopleBaseItemMap");
 271004
 271005                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271006                });
 1007
 271008            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271009                {
 271010                    b.Property<int>("Id")
 271011                        .ValueGeneratedOnAdd()
 271012                        .HasColumnType("INTEGER");
 271013
 271014                    b.Property<int>("Kind")
 271015                        .HasColumnType("INTEGER");
 271016
 271017                    b.Property<Guid?>("Permission_Permissions_Guid")
 271018                        .HasColumnType("TEXT");
 271019
 271020                    b.Property<uint>("RowVersion")
 271021                        .IsConcurrencyToken()
 271022                        .HasColumnType("INTEGER");
 271023
 271024                    b.Property<Guid?>("UserId")
 271025                        .HasColumnType("TEXT");
 271026
 271027                    b.Property<bool>("Value")
 271028                        .HasColumnType("INTEGER");
 271029
 271030                    b.HasKey("Id");
 271031
 271032                    b.HasIndex("UserId", "Kind")
 271033                        .IsUnique()
 271034                        .HasFilter("[UserId] IS NOT NULL");
 271035
 271036                    b.ToTable("Permissions");
 271037
 271038                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271039                });
 1040
 271041            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271042                {
 271043                    b.Property<int>("Id")
 271044                        .ValueGeneratedOnAdd()
 271045                        .HasColumnType("INTEGER");
 271046
 271047                    b.Property<int>("Kind")
 271048                        .HasColumnType("INTEGER");
 271049
 271050                    b.Property<Guid?>("Preference_Preferences_Guid")
 271051                        .HasColumnType("TEXT");
 271052
 271053                    b.Property<uint>("RowVersion")
 271054                        .IsConcurrencyToken()
 271055                        .HasColumnType("INTEGER");
 271056
 271057                    b.Property<Guid?>("UserId")
 271058                        .HasColumnType("TEXT");
 271059
 271060                    b.Property<string>("Value")
 271061                        .IsRequired()
 271062                        .HasMaxLength(65535)
 271063                        .HasColumnType("TEXT");
 271064
 271065                    b.HasKey("Id");
 271066
 271067                    b.HasIndex("UserId", "Kind")
 271068                        .IsUnique()
 271069                        .HasFilter("[UserId] IS NOT NULL");
 271070
 271071                    b.ToTable("Preferences");
 271072
 271073                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271074                });
 1075
 271076            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 271077                {
 271078                    b.Property<int>("Id")
 271079                        .ValueGeneratedOnAdd()
 271080                        .HasColumnType("INTEGER");
 271081
 271082                    b.Property<string>("AccessToken")
 271083                        .IsRequired()
 271084                        .HasColumnType("TEXT");
 271085
 271086                    b.Property<DateTime>("DateCreated")
 271087                        .HasColumnType("TEXT");
 271088
 271089                    b.Property<DateTime>("DateLastActivity")
 271090                        .HasColumnType("TEXT");
 271091
 271092                    b.Property<string>("Name")
 271093                        .IsRequired()
 271094                        .HasMaxLength(64)
 271095                        .HasColumnType("TEXT");
 271096
 271097                    b.HasKey("Id");
 271098
 271099                    b.HasIndex("AccessToken")
 271100                        .IsUnique();
 271101
 271102                    b.ToTable("ApiKeys");
 271103
 271104                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271105                });
 1106
 271107            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271108                {
 271109                    b.Property<int>("Id")
 271110                        .ValueGeneratedOnAdd()
 271111                        .HasColumnType("INTEGER");
 271112
 271113                    b.Property<string>("AccessToken")
 271114                        .IsRequired()
 271115                        .HasColumnType("TEXT");
 271116
 271117                    b.Property<string>("AppName")
 271118                        .IsRequired()
 271119                        .HasMaxLength(64)
 271120                        .HasColumnType("TEXT");
 271121
 271122                    b.Property<string>("AppVersion")
 271123                        .IsRequired()
 271124                        .HasMaxLength(32)
 271125                        .HasColumnType("TEXT");
 271126
 271127                    b.Property<DateTime>("DateCreated")
 271128                        .HasColumnType("TEXT");
 271129
 271130                    b.Property<DateTime>("DateLastActivity")
 271131                        .HasColumnType("TEXT");
 271132
 271133                    b.Property<DateTime>("DateModified")
 271134                        .HasColumnType("TEXT");
 271135
 271136                    b.Property<string>("DeviceId")
 271137                        .IsRequired()
 271138                        .HasMaxLength(256)
 271139                        .HasColumnType("TEXT");
 271140
 271141                    b.Property<string>("DeviceName")
 271142                        .IsRequired()
 271143                        .HasMaxLength(64)
 271144                        .HasColumnType("TEXT");
 271145
 271146                    b.Property<bool>("IsActive")
 271147                        .HasColumnType("INTEGER");
 271148
 271149                    b.Property<Guid>("UserId")
 271150                        .HasColumnType("TEXT");
 271151
 271152                    b.HasKey("Id");
 271153
 271154                    b.HasIndex("DeviceId");
 271155
 271156                    b.HasIndex("AccessToken", "DateLastActivity");
 271157
 271158                    b.HasIndex("DeviceId", "DateLastActivity");
 271159
 271160                    b.HasIndex("UserId", "DeviceId");
 271161
 271162                    b.ToTable("Devices");
 271163
 271164                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271165                });
 1166
 271167            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 271168                {
 271169                    b.Property<int>("Id")
 271170                        .ValueGeneratedOnAdd()
 271171                        .HasColumnType("INTEGER");
 271172
 271173                    b.Property<string>("CustomName")
 271174                        .HasColumnType("TEXT");
 271175
 271176                    b.Property<string>("DeviceId")
 271177                        .IsRequired()
 271178                        .HasColumnType("TEXT");
 271179
 271180                    b.HasKey("Id");
 271181
 271182                    b.HasIndex("DeviceId")
 271183                        .IsUnique();
 271184
 271185                    b.ToTable("DeviceOptions");
 271186
 271187                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271188                });
 1189
 271190            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 271191                {
 271192                    b.Property<Guid>("ItemId")
 271193                        .HasColumnType("TEXT");
 271194
 271195                    b.Property<int>("Width")
 271196                        .HasColumnType("INTEGER");
 271197
 271198                    b.Property<int>("Bandwidth")
 271199                        .HasColumnType("INTEGER");
 271200
 271201                    b.Property<int>("Height")
 271202                        .HasColumnType("INTEGER");
 271203
 271204                    b.Property<int>("Interval")
 271205                        .HasColumnType("INTEGER");
 271206
 271207                    b.Property<int>("ThumbnailCount")
 271208                        .HasColumnType("INTEGER");
 271209
 271210                    b.Property<int>("TileHeight")
 271211                        .HasColumnType("INTEGER");
 271212
 271213                    b.Property<int>("TileWidth")
 271214                        .HasColumnType("INTEGER");
 271215
 271216                    b.HasKey("ItemId", "Width");
 271217
 271218                    b.ToTable("TrickplayInfos");
 271219
 271220                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271221                });
 1222
 271223            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271224                {
 271225                    b.Property<Guid>("Id")
 271226                        .ValueGeneratedOnAdd()
 271227                        .HasColumnType("TEXT");
 271228
 271229                    b.Property<string>("AudioLanguagePreference")
 271230                        .HasMaxLength(255)
 271231                        .HasColumnType("TEXT");
 271232
 271233                    b.Property<string>("AuthenticationProviderId")
 271234                        .IsRequired()
 271235                        .HasMaxLength(255)
 271236                        .HasColumnType("TEXT");
 271237
 271238                    b.Property<string>("CastReceiverId")
 271239                        .HasMaxLength(32)
 271240                        .HasColumnType("TEXT");
 271241
 271242                    b.Property<bool>("DisplayCollectionsView")
 271243                        .HasColumnType("INTEGER");
 271244
 271245                    b.Property<bool>("DisplayMissingEpisodes")
 271246                        .HasColumnType("INTEGER");
 271247
 271248                    b.Property<bool>("EnableAutoLogin")
 271249                        .HasColumnType("INTEGER");
 271250
 271251                    b.Property<bool>("EnableLocalPassword")
 271252                        .HasColumnType("INTEGER");
 271253
 271254                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 271255                        .HasColumnType("INTEGER");
 271256
 271257                    b.Property<bool>("EnableUserPreferenceAccess")
 271258                        .HasColumnType("INTEGER");
 271259
 271260                    b.Property<bool>("HidePlayedInLatest")
 271261                        .HasColumnType("INTEGER");
 271262
 271263                    b.Property<long>("InternalId")
 271264                        .HasColumnType("INTEGER");
 271265
 271266                    b.Property<int>("InvalidLoginAttemptCount")
 271267                        .HasColumnType("INTEGER");
 271268
 271269                    b.Property<DateTime?>("LastActivityDate")
 271270                        .HasColumnType("TEXT");
 271271
 271272                    b.Property<DateTime?>("LastLoginDate")
 271273                        .HasColumnType("TEXT");
 271274
 271275                    b.Property<int?>("LoginAttemptsBeforeLockout")
 271276                        .HasColumnType("INTEGER");
 271277
 271278                    b.Property<int>("MaxActiveSessions")
 271279                        .HasColumnType("INTEGER");
 271280
 271281                    b.Property<int?>("MaxParentalRatingScore")
 271282                        .HasColumnType("INTEGER");
 271283
 271284                    b.Property<int?>("MaxParentalRatingSubScore")
 271285                        .HasColumnType("INTEGER");
 271286
 271287                    b.Property<bool>("MustUpdatePassword")
 271288                        .HasColumnType("INTEGER");
 271289
 271290                    b.Property<string>("Password")
 271291                        .HasMaxLength(65535)
 271292                        .HasColumnType("TEXT");
 271293
 271294                    b.Property<string>("PasswordResetProviderId")
 271295                        .IsRequired()
 271296                        .HasMaxLength(255)
 271297                        .HasColumnType("TEXT");
 271298
 271299                    b.Property<bool>("PlayDefaultAudioTrack")
 271300                        .HasColumnType("INTEGER");
 271301
 271302                    b.Property<bool>("RememberAudioSelections")
 271303                        .HasColumnType("INTEGER");
 271304
 271305                    b.Property<bool>("RememberSubtitleSelections")
 271306                        .HasColumnType("INTEGER");
 271307
 271308                    b.Property<int?>("RemoteClientBitrateLimit")
 271309                        .HasColumnType("INTEGER");
 271310
 271311                    b.Property<uint>("RowVersion")
 271312                        .IsConcurrencyToken()
 271313                        .HasColumnType("INTEGER");
 271314
 271315                    b.Property<string>("SubtitleLanguagePreference")
 271316                        .HasMaxLength(255)
 271317                        .HasColumnType("TEXT");
 271318
 271319                    b.Property<int>("SubtitleMode")
 271320                        .HasColumnType("INTEGER");
 271321
 271322                    b.Property<int>("SyncPlayAccess")
 271323                        .HasColumnType("INTEGER");
 271324
 271325                    b.Property<string>("Username")
 271326                        .IsRequired()
 271327                        .HasMaxLength(255)
 271328                        .HasColumnType("TEXT");
 271329
 271330                    b.HasKey("Id");
 271331
 271332                    b.HasIndex("Username")
 271333                        .IsUnique();
 271334
 271335                    b.ToTable("Users");
 271336
 271337                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271338                });
 1339
 271340            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271341                {
 271342                    b.Property<Guid>("ItemId")
 271343                        .HasColumnType("TEXT");
 271344
 271345                    b.Property<Guid>("UserId")
 271346                        .HasColumnType("TEXT");
 271347
 271348                    b.Property<string>("CustomDataKey")
 271349                        .HasColumnType("TEXT");
 271350
 271351                    b.Property<int?>("AudioStreamIndex")
 271352                        .HasColumnType("INTEGER");
 271353
 271354                    b.Property<bool>("IsFavorite")
 271355                        .HasColumnType("INTEGER");
 271356
 271357                    b.Property<DateTime?>("LastPlayedDate")
 271358                        .HasColumnType("TEXT");
 271359
 271360                    b.Property<bool?>("Likes")
 271361                        .HasColumnType("INTEGER");
 271362
 271363                    b.Property<int>("PlayCount")
 271364                        .HasColumnType("INTEGER");
 271365
 271366                    b.Property<long>("PlaybackPositionTicks")
 271367                        .HasColumnType("INTEGER");
 271368
 271369                    b.Property<bool>("Played")
 271370                        .HasColumnType("INTEGER");
 271371
 271372                    b.Property<double?>("Rating")
 271373                        .HasColumnType("REAL");
 271374
 271375                    b.Property<int?>("SubtitleStreamIndex")
 271376                        .HasColumnType("INTEGER");
 271377
 271378                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 271379
 271380                    b.HasIndex("UserId");
 271381
 271382                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 271383
 271384                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 271385
 271386                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 271387
 271388                    b.HasIndex("ItemId", "UserId", "Played");
 271389
 271390                    b.ToTable("UserData");
 271391
 271392                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 271393                });
 1394
 271395            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 271396                {
 271397                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271398                        .WithMany("AccessSchedules")
 271399                        .HasForeignKey("UserId")
 271400                        .OnDelete(DeleteBehavior.Cascade)
 271401                        .IsRequired();
 271402                });
 1403
 271404            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 271405                {
 271406                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271407                        .WithMany("Children")
 271408                        .HasForeignKey("ItemId")
 271409                        .OnDelete(DeleteBehavior.Cascade)
 271410                        .IsRequired();
 271411
 271412                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 271413                        .WithMany("ParentAncestors")
 271414                        .HasForeignKey("ParentItemId")
 271415                        .OnDelete(DeleteBehavior.Cascade)
 271416                        .IsRequired();
 271417
 271418                    b.Navigation("Item");
 271419
 271420                    b.Navigation("ParentItem");
 271421                });
 1422
 271423            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 271424                {
 271425                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271426                        .WithMany()
 271427                        .HasForeignKey("ItemId")
 271428                        .OnDelete(DeleteBehavior.Cascade)
 271429                        .IsRequired();
 271430
 271431                    b.Navigation("Item");
 271432                });
 1433
 271434            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 271435                {
 271436                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271437                        .WithMany("Images")
 271438                        .HasForeignKey("ItemId")
 271439                        .OnDelete(DeleteBehavior.Cascade)
 271440                        .IsRequired();
 271441
 271442                    b.Navigation("Item");
 271443                });
 1444
 271445            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 271446                {
 271447                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271448                        .WithMany("LockedFields")
 271449                        .HasForeignKey("ItemId")
 271450                        .OnDelete(DeleteBehavior.Cascade)
 271451                        .IsRequired();
 271452
 271453                    b.Navigation("Item");
 271454                });
 1455
 271456            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 271457                {
 271458                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271459                        .WithMany("Provider")
 271460                        .HasForeignKey("ItemId")
 271461                        .OnDelete(DeleteBehavior.Cascade)
 271462                        .IsRequired();
 271463
 271464                    b.Navigation("Item");
 271465                });
 1466
 271467            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 271468                {
 271469                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271470                        .WithMany("TrailerTypes")
 271471                        .HasForeignKey("ItemId")
 271472                        .OnDelete(DeleteBehavior.Cascade)
 271473                        .IsRequired();
 271474
 271475                    b.Navigation("Item");
 271476                });
 1477
 271478            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 271479                {
 271480                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271481                        .WithMany("Chapters")
 271482                        .HasForeignKey("ItemId")
 271483                        .OnDelete(DeleteBehavior.Cascade)
 271484                        .IsRequired();
 271485
 271486                    b.Navigation("Item");
 271487                });
 1488
 271489            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271490                {
 271491                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271492                        .WithMany("DisplayPreferences")
 271493                        .HasForeignKey("UserId")
 271494                        .OnDelete(DeleteBehavior.Cascade)
 271495                        .IsRequired();
 271496                });
 1497
 271498            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 271499                {
 271500                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 271501                        .WithMany("HomeSections")
 271502                        .HasForeignKey("DisplayPreferencesId")
 271503                        .OnDelete(DeleteBehavior.Cascade)
 271504                        .IsRequired();
 271505                });
 1506
 271507            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 271508                {
 271509                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271510                        .WithOne("ProfileImage")
 271511                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 271512                        .OnDelete(DeleteBehavior.Cascade);
 271513                });
 1514
 271515            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 271516                {
 271517                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271518                        .WithMany("ItemDisplayPreferences")
 271519                        .HasForeignKey("UserId")
 271520                        .OnDelete(DeleteBehavior.Cascade)
 271521                        .IsRequired();
 271522                });
 1523
 271524            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 271525                {
 271526                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271527                        .WithMany("ItemValues")
 271528                        .HasForeignKey("ItemId")
 271529                        .OnDelete(DeleteBehavior.Cascade)
 271530                        .IsRequired();
 271531
 271532                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 271533                        .WithMany("BaseItemsMap")
 271534                        .HasForeignKey("ItemValueId")
 271535                        .OnDelete(DeleteBehavior.Cascade)
 271536                        .IsRequired();
 271537
 271538                    b.Navigation("Item");
 271539
 271540                    b.Navigation("ItemValue");
 271541                });
 1542
 271543            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 271544                {
 271545                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271546                        .WithMany()
 271547                        .HasForeignKey("ItemId")
 271548                        .OnDelete(DeleteBehavior.Cascade)
 271549                        .IsRequired();
 271550
 271551                    b.Navigation("Item");
 271552                });
 1553
 271554            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 271555                {
 271556                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271557                        .WithMany("MediaStreams")
 271558                        .HasForeignKey("ItemId")
 271559                        .OnDelete(DeleteBehavior.Cascade)
 271560                        .IsRequired();
 271561
 271562                    b.Navigation("Item");
 271563                });
 1564
 271565            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 271566                {
 271567                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271568                        .WithMany("Peoples")
 271569                        .HasForeignKey("ItemId")
 271570                        .OnDelete(DeleteBehavior.Cascade)
 271571                        .IsRequired();
 271572
 271573                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 271574                        .WithMany("BaseItems")
 271575                        .HasForeignKey("PeopleId")
 271576                        .OnDelete(DeleteBehavior.Cascade)
 271577                        .IsRequired();
 271578
 271579                    b.Navigation("Item");
 271580
 271581                    b.Navigation("People");
 271582                });
 1583
 271584            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 271585                {
 271586                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271587                        .WithMany("Permissions")
 271588                        .HasForeignKey("UserId")
 271589                        .OnDelete(DeleteBehavior.Cascade);
 271590                });
 1591
 271592            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 271593                {
 271594                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 271595                        .WithMany("Preferences")
 271596                        .HasForeignKey("UserId")
 271597                        .OnDelete(DeleteBehavior.Cascade);
 271598                });
 1599
 271600            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 271601                {
 271602                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271603                        .WithMany()
 271604                        .HasForeignKey("UserId")
 271605                        .OnDelete(DeleteBehavior.Cascade)
 271606                        .IsRequired();
 271607
 271608                    b.Navigation("User");
 271609                });
 1610
 271611            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 271612                {
 271613                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 271614                        .WithMany("UserData")
 271615                        .HasForeignKey("ItemId")
 271616                        .OnDelete(DeleteBehavior.Cascade)
 271617                        .IsRequired();
 271618
 271619                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 271620                        .WithMany()
 271621                        .HasForeignKey("UserId")
 271622                        .OnDelete(DeleteBehavior.Cascade)
 271623                        .IsRequired();
 271624
 271625                    b.Navigation("Item");
 271626
 271627                    b.Navigation("User");
 271628                });
 1629
 271630            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 271631                {
 271632                    b.Navigation("Chapters");
 271633
 271634                    b.Navigation("Children");
 271635
 271636                    b.Navigation("Images");
 271637
 271638                    b.Navigation("ItemValues");
 271639
 271640                    b.Navigation("LockedFields");
 271641
 271642                    b.Navigation("MediaStreams");
 271643
 271644                    b.Navigation("ParentAncestors");
 271645
 271646                    b.Navigation("Peoples");
 271647
 271648                    b.Navigation("Provider");
 271649
 271650                    b.Navigation("TrailerTypes");
 271651
 271652                    b.Navigation("UserData");
 271653                });
 1654
 271655            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 271656                {
 271657                    b.Navigation("HomeSections");
 271658                });
 1659
 271660            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 271661                {
 271662                    b.Navigation("BaseItemsMap");
 271663                });
 1664
 271665            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 271666                {
 271667                    b.Navigation("BaseItems");
 271668                });
 1669
 271670            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 271671                {
 271672                    b.Navigation("AccessSchedules");
 271673
 271674                    b.Navigation("DisplayPreferences");
 271675
 271676                    b.Navigation("ItemDisplayPreferences");
 271677
 271678                    b.Navigation("Permissions");
 271679
 271680                    b.Navigation("Preferences");
 271681
 271682                    b.Navigation("ProfileImage");
 271683                });
 1684#pragma warning restore 612, 618
 271685        }
 1686    }
 1687}