< Summary - Jellyfin

Line coverage
86%
Covered lines: 595
Uncovered lines: 91
Coverable lines: 686
Total lines: 775
Line coverage: 86.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/16/2026 - 12:15:55 AM Line coverage: 86.7% (595/686) Total lines: 775

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/20210320181425_AddIndexesAndCollations.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2#pragma warning disable SA1601
 3
 4using System;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6
 7namespace Jellyfin.Server.Implementations.Migrations
 8{
 9    public partial class AddIndexesAndCollations : Migration
 10    {
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2713            migrationBuilder.DropForeignKey(
 2714                name: "FK_ImageInfos_Users_UserId",
 2715                schema: "jellyfin",
 2716                table: "ImageInfos");
 17
 2718            migrationBuilder.DropForeignKey(
 2719                name: "FK_Permissions_Users_Permission_Permissions_Guid",
 2720                schema: "jellyfin",
 2721                table: "Permissions");
 22
 2723            migrationBuilder.DropForeignKey(
 2724                name: "FK_Preferences_Users_Preference_Preferences_Guid",
 2725                schema: "jellyfin",
 2726                table: "Preferences");
 27
 2728            migrationBuilder.DropIndex(
 2729                name: "IX_Preferences_Preference_Preferences_Guid",
 2730                schema: "jellyfin",
 2731                table: "Preferences");
 32
 2733            migrationBuilder.DropIndex(
 2734                name: "IX_Permissions_Permission_Permissions_Guid",
 2735                schema: "jellyfin",
 2736                table: "Permissions");
 37
 2738            migrationBuilder.DropIndex(
 2739                name: "IX_DisplayPreferences_UserId",
 2740                schema: "jellyfin",
 2741                table: "DisplayPreferences");
 42
 2743            migrationBuilder.DropIndex(
 2744                name: "IX_CustomItemDisplayPreferences_UserId",
 2745                schema: "jellyfin",
 2746                table: "CustomItemDisplayPreferences");
 47
 2748            migrationBuilder.AlterColumn<string>(
 2749                name: "Username",
 2750                schema: "jellyfin",
 2751                table: "Users",
 2752                type: "TEXT",
 2753                maxLength: 255,
 2754                nullable: false,
 2755                collation: "NOCASE",
 2756                oldClrType: typeof(string),
 2757                oldType: "TEXT",
 2758                oldMaxLength: 255);
 59
 2760            migrationBuilder.AddColumn<Guid>(
 2761                name: "UserId",
 2762                schema: "jellyfin",
 2763                table: "Preferences",
 2764                type: "TEXT",
 2765                nullable: true);
 66
 2767            migrationBuilder.AddColumn<Guid>(
 2768                name: "UserId",
 2769                schema: "jellyfin",
 2770                table: "Permissions",
 2771                type: "TEXT",
 2772                nullable: true);
 73
 2774            migrationBuilder.Sql("UPDATE Preferences SET UserId = Preference_Preferences_Guid");
 2775            migrationBuilder.Sql("UPDATE Permissions SET UserId = Permission_Permissions_Guid");
 76
 2777            migrationBuilder.CreateIndex(
 2778                name: "IX_Users_Username",
 2779                schema: "jellyfin",
 2780                table: "Users",
 2781                column: "Username",
 2782                unique: true);
 83
 2784            migrationBuilder.CreateIndex(
 2785                name: "IX_Preferences_UserId_Kind",
 2786                schema: "jellyfin",
 2787                table: "Preferences",
 2788                columns: new[] { "UserId", "Kind" },
 2789                unique: true,
 2790                filter: "[UserId] IS NOT NULL");
 91
 2792            migrationBuilder.CreateIndex(
 2793                name: "IX_Permissions_UserId_Kind",
 2794                schema: "jellyfin",
 2795                table: "Permissions",
 2796                columns: new[] { "UserId", "Kind" },
 2797                unique: true,
 2798                filter: "[UserId] IS NOT NULL");
 99
 27100            migrationBuilder.AddForeignKey(
 27101                name: "FK_ImageInfos_Users_UserId",
 27102                schema: "jellyfin",
 27103                table: "ImageInfos",
 27104                column: "UserId",
 27105                principalSchema: "jellyfin",
 27106                principalTable: "Users",
 27107                principalColumn: "Id",
 27108                onDelete: ReferentialAction.Cascade);
 109
 27110            migrationBuilder.AddForeignKey(
 27111                name: "FK_Permissions_Users_UserId",
 27112                schema: "jellyfin",
 27113                table: "Permissions",
 27114                column: "UserId",
 27115                principalSchema: "jellyfin",
 27116                principalTable: "Users",
 27117                principalColumn: "Id",
 27118                onDelete: ReferentialAction.Cascade);
 119
 27120            migrationBuilder.AddForeignKey(
 27121                name: "FK_Preferences_Users_UserId",
 27122                schema: "jellyfin",
 27123                table: "Preferences",
 27124                column: "UserId",
 27125                principalSchema: "jellyfin",
 27126                principalTable: "Users",
 27127                principalColumn: "Id",
 27128                onDelete: ReferentialAction.Cascade);
 27129        }
 130
 131        protected override void Down(MigrationBuilder migrationBuilder)
 132        {
 0133            migrationBuilder.DropForeignKey(
 0134                name: "FK_ImageInfos_Users_UserId",
 0135                schema: "jellyfin",
 0136                table: "ImageInfos");
 137
 0138            migrationBuilder.DropForeignKey(
 0139                name: "FK_Permissions_Users_UserId",
 0140                schema: "jellyfin",
 0141                table: "Permissions");
 142
 0143            migrationBuilder.DropForeignKey(
 0144                name: "FK_Preferences_Users_UserId",
 0145                schema: "jellyfin",
 0146                table: "Preferences");
 147
 0148            migrationBuilder.DropIndex(
 0149                name: "IX_Users_Username",
 0150                schema: "jellyfin",
 0151                table: "Users");
 152
 0153            migrationBuilder.DropIndex(
 0154                name: "IX_Preferences_UserId_Kind",
 0155                schema: "jellyfin",
 0156                table: "Preferences");
 157
 0158            migrationBuilder.DropIndex(
 0159                name: "IX_Permissions_UserId_Kind",
 0160                schema: "jellyfin",
 0161                table: "Permissions");
 162
 0163            migrationBuilder.DropColumn(
 0164                name: "UserId",
 0165                schema: "jellyfin",
 0166                table: "Preferences");
 167
 0168            migrationBuilder.DropColumn(
 0169                name: "UserId",
 0170                schema: "jellyfin",
 0171                table: "Permissions");
 172
 0173            migrationBuilder.AlterColumn<string>(
 0174                name: "Username",
 0175                schema: "jellyfin",
 0176                table: "Users",
 0177                type: "TEXT",
 0178                maxLength: 255,
 0179                nullable: false,
 0180                oldClrType: typeof(string),
 0181                oldType: "TEXT",
 0182                oldMaxLength: 255,
 0183                oldCollation: "NOCASE");
 184
 0185            migrationBuilder.CreateIndex(
 0186                name: "IX_Preferences_Preference_Preferences_Guid",
 0187                schema: "jellyfin",
 0188                table: "Preferences",
 0189                column: "Preference_Preferences_Guid");
 190
 0191            migrationBuilder.CreateIndex(
 0192                name: "IX_Permissions_Permission_Permissions_Guid",
 0193                schema: "jellyfin",
 0194                table: "Permissions",
 0195                column: "Permission_Permissions_Guid");
 196
 0197            migrationBuilder.CreateIndex(
 0198                name: "IX_DisplayPreferences_UserId",
 0199                schema: "jellyfin",
 0200                table: "DisplayPreferences",
 0201                column: "UserId");
 202
 0203            migrationBuilder.CreateIndex(
 0204                name: "IX_CustomItemDisplayPreferences_UserId",
 0205                schema: "jellyfin",
 0206                table: "CustomItemDisplayPreferences",
 0207                column: "UserId");
 208
 0209            migrationBuilder.AddForeignKey(
 0210                name: "FK_ImageInfos_Users_UserId",
 0211                schema: "jellyfin",
 0212                table: "ImageInfos",
 0213                column: "UserId",
 0214                principalSchema: "jellyfin",
 0215                principalTable: "Users",
 0216                principalColumn: "Id",
 0217                onDelete: ReferentialAction.Restrict);
 218
 0219            migrationBuilder.AddForeignKey(
 0220                name: "FK_Permissions_Users_Permission_Permissions_Guid",
 0221                schema: "jellyfin",
 0222                table: "Permissions",
 0223                column: "Permission_Permissions_Guid",
 0224                principalSchema: "jellyfin",
 0225                principalTable: "Users",
 0226                principalColumn: "Id",
 0227                onDelete: ReferentialAction.Restrict);
 228
 0229            migrationBuilder.AddForeignKey(
 0230                name: "FK_Preferences_Users_Preference_Preferences_Guid",
 0231                schema: "jellyfin",
 0232                table: "Preferences",
 0233                column: "Preference_Preferences_Guid",
 0234                principalSchema: "jellyfin",
 0235                principalTable: "Users",
 0236                principalColumn: "Id",
 0237                onDelete: ReferentialAction.Restrict);
 0238        }
 239    }
 240}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3// <auto-generated />
 4using System;
 5using Jellyfin.Database.Implementations;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Migrations;
 9using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 10
 11namespace Jellyfin.Server.Implementations.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20210320181425_AddIndexesAndCollations")]
 15    partial class AddIndexesAndCollations
 16    {
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 2720            modelBuilder
 2721                .HasDefaultSchema("jellyfin")
 2722                .HasAnnotation("ProductVersion", "5.0.3");
 23
 2724            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2725                {
 2726                    b.Property<int>("Id")
 2727                        .ValueGeneratedOnAdd()
 2728                        .HasColumnType("INTEGER");
 2729
 2730                    b.Property<int>("DayOfWeek")
 2731                        .HasColumnType("INTEGER");
 2732
 2733                    b.Property<double>("EndHour")
 2734                        .HasColumnType("REAL");
 2735
 2736                    b.Property<double>("StartHour")
 2737                        .HasColumnType("REAL");
 2738
 2739                    b.Property<Guid>("UserId")
 2740                        .HasColumnType("TEXT");
 2741
 2742                    b.HasKey("Id");
 2743
 2744                    b.HasIndex("UserId");
 2745
 2746                    b.ToTable("AccessSchedules");
 2747                });
 48
 2749            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2750                {
 2751                    b.Property<int>("Id")
 2752                        .ValueGeneratedOnAdd()
 2753                        .HasColumnType("INTEGER");
 2754
 2755                    b.Property<DateTime>("DateCreated")
 2756                        .HasColumnType("TEXT");
 2757
 2758                    b.Property<string>("ItemId")
 2759                        .HasMaxLength(256)
 2760                        .HasColumnType("TEXT");
 2761
 2762                    b.Property<int>("LogSeverity")
 2763                        .HasColumnType("INTEGER");
 2764
 2765                    b.Property<string>("Name")
 2766                        .IsRequired()
 2767                        .HasMaxLength(512)
 2768                        .HasColumnType("TEXT");
 2769
 2770                    b.Property<string>("Overview")
 2771                        .HasMaxLength(512)
 2772                        .HasColumnType("TEXT");
 2773
 2774                    b.Property<uint>("RowVersion")
 2775                        .IsConcurrencyToken()
 2776                        .HasColumnType("INTEGER");
 2777
 2778                    b.Property<string>("ShortOverview")
 2779                        .HasMaxLength(512)
 2780                        .HasColumnType("TEXT");
 2781
 2782                    b.Property<string>("Type")
 2783                        .IsRequired()
 2784                        .HasMaxLength(256)
 2785                        .HasColumnType("TEXT");
 2786
 2787                    b.Property<Guid>("UserId")
 2788                        .HasColumnType("TEXT");
 2789
 2790                    b.HasKey("Id");
 2791
 2792                    b.ToTable("ActivityLogs");
 2793                });
 94
 2795            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 2796                {
 2797                    b.Property<int>("Id")
 2798                        .ValueGeneratedOnAdd()
 2799                        .HasColumnType("INTEGER");
 27100
 27101                    b.Property<string>("Client")
 27102                        .IsRequired()
 27103                        .HasMaxLength(32)
 27104                        .HasColumnType("TEXT");
 27105
 27106                    b.Property<Guid>("ItemId")
 27107                        .HasColumnType("TEXT");
 27108
 27109                    b.Property<string>("Key")
 27110                        .IsRequired()
 27111                        .HasColumnType("TEXT");
 27112
 27113                    b.Property<Guid>("UserId")
 27114                        .HasColumnType("TEXT");
 27115
 27116                    b.Property<string>("Value")
 27117                        .IsRequired()
 27118                        .HasColumnType("TEXT");
 27119
 27120                    b.HasKey("Id");
 27121
 27122                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27123                        .IsUnique();
 27124
 27125                    b.ToTable("CustomItemDisplayPreferences");
 27126                });
 127
 27128            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27129                {
 27130                    b.Property<int>("Id")
 27131                        .ValueGeneratedOnAdd()
 27132                        .HasColumnType("INTEGER");
 27133
 27134                    b.Property<int>("ChromecastVersion")
 27135                        .HasColumnType("INTEGER");
 27136
 27137                    b.Property<string>("Client")
 27138                        .IsRequired()
 27139                        .HasMaxLength(32)
 27140                        .HasColumnType("TEXT");
 27141
 27142                    b.Property<string>("DashboardTheme")
 27143                        .HasMaxLength(32)
 27144                        .HasColumnType("TEXT");
 27145
 27146                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27147                        .HasColumnType("INTEGER");
 27148
 27149                    b.Property<int?>("IndexBy")
 27150                        .HasColumnType("INTEGER");
 27151
 27152                    b.Property<Guid>("ItemId")
 27153                        .HasColumnType("TEXT");
 27154
 27155                    b.Property<int>("ScrollDirection")
 27156                        .HasColumnType("INTEGER");
 27157
 27158                    b.Property<bool>("ShowBackdrop")
 27159                        .HasColumnType("INTEGER");
 27160
 27161                    b.Property<bool>("ShowSidebar")
 27162                        .HasColumnType("INTEGER");
 27163
 27164                    b.Property<int>("SkipBackwardLength")
 27165                        .HasColumnType("INTEGER");
 27166
 27167                    b.Property<int>("SkipForwardLength")
 27168                        .HasColumnType("INTEGER");
 27169
 27170                    b.Property<string>("TvHome")
 27171                        .HasMaxLength(32)
 27172                        .HasColumnType("TEXT");
 27173
 27174                    b.Property<Guid>("UserId")
 27175                        .HasColumnType("TEXT");
 27176
 27177                    b.HasKey("Id");
 27178
 27179                    b.HasIndex("UserId", "ItemId", "Client")
 27180                        .IsUnique();
 27181
 27182                    b.ToTable("DisplayPreferences");
 27183                });
 184
 27185            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27186                {
 27187                    b.Property<int>("Id")
 27188                        .ValueGeneratedOnAdd()
 27189                        .HasColumnType("INTEGER");
 27190
 27191                    b.Property<int>("DisplayPreferencesId")
 27192                        .HasColumnType("INTEGER");
 27193
 27194                    b.Property<int>("Order")
 27195                        .HasColumnType("INTEGER");
 27196
 27197                    b.Property<int>("Type")
 27198                        .HasColumnType("INTEGER");
 27199
 27200                    b.HasKey("Id");
 27201
 27202                    b.HasIndex("DisplayPreferencesId");
 27203
 27204                    b.ToTable("HomeSection");
 27205                });
 206
 27207            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27208                {
 27209                    b.Property<int>("Id")
 27210                        .ValueGeneratedOnAdd()
 27211                        .HasColumnType("INTEGER");
 27212
 27213                    b.Property<DateTime>("LastModified")
 27214                        .HasColumnType("TEXT");
 27215
 27216                    b.Property<string>("Path")
 27217                        .IsRequired()
 27218                        .HasMaxLength(512)
 27219                        .HasColumnType("TEXT");
 27220
 27221                    b.Property<Guid?>("UserId")
 27222                        .HasColumnType("TEXT");
 27223
 27224                    b.HasKey("Id");
 27225
 27226                    b.HasIndex("UserId")
 27227                        .IsUnique();
 27228
 27229                    b.ToTable("ImageInfos");
 27230                });
 231
 27232            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27233                {
 27234                    b.Property<int>("Id")
 27235                        .ValueGeneratedOnAdd()
 27236                        .HasColumnType("INTEGER");
 27237
 27238                    b.Property<string>("Client")
 27239                        .IsRequired()
 27240                        .HasMaxLength(32)
 27241                        .HasColumnType("TEXT");
 27242
 27243                    b.Property<int?>("IndexBy")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<Guid>("ItemId")
 27247                        .HasColumnType("TEXT");
 27248
 27249                    b.Property<bool>("RememberIndexing")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("RememberSorting")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<string>("SortBy")
 27256                        .IsRequired()
 27257                        .HasMaxLength(64)
 27258                        .HasColumnType("TEXT");
 27259
 27260                    b.Property<int>("SortOrder")
 27261                        .HasColumnType("INTEGER");
 27262
 27263                    b.Property<Guid>("UserId")
 27264                        .HasColumnType("TEXT");
 27265
 27266                    b.Property<int>("ViewType")
 27267                        .HasColumnType("INTEGER");
 27268
 27269                    b.HasKey("Id");
 27270
 27271                    b.HasIndex("UserId");
 27272
 27273                    b.ToTable("ItemDisplayPreferences");
 27274                });
 275
 27276            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27277                {
 27278                    b.Property<int>("Id")
 27279                        .ValueGeneratedOnAdd()
 27280                        .HasColumnType("INTEGER");
 27281
 27282                    b.Property<int>("Kind")
 27283                        .HasColumnType("INTEGER");
 27284
 27285                    b.Property<Guid?>("Permission_Permissions_Guid")
 27286                        .HasColumnType("TEXT");
 27287
 27288                    b.Property<uint>("RowVersion")
 27289                        .IsConcurrencyToken()
 27290                        .HasColumnType("INTEGER");
 27291
 27292                    b.Property<Guid?>("UserId")
 27293                        .HasColumnType("TEXT");
 27294
 27295                    b.Property<bool>("Value")
 27296                        .HasColumnType("INTEGER");
 27297
 27298                    b.HasKey("Id");
 27299
 27300                    b.HasIndex("UserId", "Kind")
 27301                        .IsUnique()
 27302                        .HasFilter("[UserId] IS NOT NULL");
 27303
 27304                    b.ToTable("Permissions");
 27305                });
 306
 27307            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27308                {
 27309                    b.Property<int>("Id")
 27310                        .ValueGeneratedOnAdd()
 27311                        .HasColumnType("INTEGER");
 27312
 27313                    b.Property<int>("Kind")
 27314                        .HasColumnType("INTEGER");
 27315
 27316                    b.Property<Guid?>("Preference_Preferences_Guid")
 27317                        .HasColumnType("TEXT");
 27318
 27319                    b.Property<uint>("RowVersion")
 27320                        .IsConcurrencyToken()
 27321                        .HasColumnType("INTEGER");
 27322
 27323                    b.Property<Guid?>("UserId")
 27324                        .HasColumnType("TEXT");
 27325
 27326                    b.Property<string>("Value")
 27327                        .IsRequired()
 27328                        .HasMaxLength(65535)
 27329                        .HasColumnType("TEXT");
 27330
 27331                    b.HasKey("Id");
 27332
 27333                    b.HasIndex("UserId", "Kind")
 27334                        .IsUnique()
 27335                        .HasFilter("[UserId] IS NOT NULL");
 27336
 27337                    b.ToTable("Preferences");
 27338                });
 339
 27340            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27341                {
 27342                    b.Property<Guid>("Id")
 27343                        .ValueGeneratedOnAdd()
 27344                        .HasColumnType("TEXT");
 27345
 27346                    b.Property<string>("AudioLanguagePreference")
 27347                        .HasMaxLength(255)
 27348                        .HasColumnType("TEXT");
 27349
 27350                    b.Property<string>("AuthenticationProviderId")
 27351                        .IsRequired()
 27352                        .HasMaxLength(255)
 27353                        .HasColumnType("TEXT");
 27354
 27355                    b.Property<bool>("DisplayCollectionsView")
 27356                        .HasColumnType("INTEGER");
 27357
 27358                    b.Property<bool>("DisplayMissingEpisodes")
 27359                        .HasColumnType("INTEGER");
 27360
 27361                    b.Property<string>("EasyPassword")
 27362                        .HasMaxLength(65535)
 27363                        .HasColumnType("TEXT");
 27364
 27365                    b.Property<bool>("EnableAutoLogin")
 27366                        .HasColumnType("INTEGER");
 27367
 27368                    b.Property<bool>("EnableLocalPassword")
 27369                        .HasColumnType("INTEGER");
 27370
 27371                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 27372                        .HasColumnType("INTEGER");
 27373
 27374                    b.Property<bool>("EnableUserPreferenceAccess")
 27375                        .HasColumnType("INTEGER");
 27376
 27377                    b.Property<bool>("HidePlayedInLatest")
 27378                        .HasColumnType("INTEGER");
 27379
 27380                    b.Property<long>("InternalId")
 27381                        .HasColumnType("INTEGER");
 27382
 27383                    b.Property<int>("InvalidLoginAttemptCount")
 27384                        .HasColumnType("INTEGER");
 27385
 27386                    b.Property<DateTime?>("LastActivityDate")
 27387                        .HasColumnType("TEXT");
 27388
 27389                    b.Property<DateTime?>("LastLoginDate")
 27390                        .HasColumnType("TEXT");
 27391
 27392                    b.Property<int?>("LoginAttemptsBeforeLockout")
 27393                        .HasColumnType("INTEGER");
 27394
 27395                    b.Property<int>("MaxActiveSessions")
 27396                        .HasColumnType("INTEGER");
 27397
 27398                    b.Property<int?>("MaxParentalAgeRating")
 27399                        .HasColumnType("INTEGER");
 27400
 27401                    b.Property<bool>("MustUpdatePassword")
 27402                        .HasColumnType("INTEGER");
 27403
 27404                    b.Property<string>("Password")
 27405                        .HasMaxLength(65535)
 27406                        .HasColumnType("TEXT");
 27407
 27408                    b.Property<string>("PasswordResetProviderId")
 27409                        .IsRequired()
 27410                        .HasMaxLength(255)
 27411                        .HasColumnType("TEXT");
 27412
 27413                    b.Property<bool>("PlayDefaultAudioTrack")
 27414                        .HasColumnType("INTEGER");
 27415
 27416                    b.Property<bool>("RememberAudioSelections")
 27417                        .HasColumnType("INTEGER");
 27418
 27419                    b.Property<bool>("RememberSubtitleSelections")
 27420                        .HasColumnType("INTEGER");
 27421
 27422                    b.Property<int?>("RemoteClientBitrateLimit")
 27423                        .HasColumnType("INTEGER");
 27424
 27425                    b.Property<uint>("RowVersion")
 27426                        .IsConcurrencyToken()
 27427                        .HasColumnType("INTEGER");
 27428
 27429                    b.Property<string>("SubtitleLanguagePreference")
 27430                        .HasMaxLength(255)
 27431                        .HasColumnType("TEXT");
 27432
 27433                    b.Property<int>("SubtitleMode")
 27434                        .HasColumnType("INTEGER");
 27435
 27436                    b.Property<int>("SyncPlayAccess")
 27437                        .HasColumnType("INTEGER");
 27438
 27439                    b.Property<string>("Username")
 27440                        .IsRequired()
 27441                        .HasMaxLength(255)
 27442                        .HasColumnType("TEXT")
 27443                        .UseCollation("NOCASE");
 27444
 27445                    b.HasKey("Id");
 27446
 27447                    b.HasIndex("Username")
 27448                        .IsUnique();
 27449
 27450                    b.ToTable("Users");
 27451                });
 452
 27453            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 27454                {
 27455                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27456                        .WithMany("AccessSchedules")
 27457                        .HasForeignKey("UserId")
 27458                        .OnDelete(DeleteBehavior.Cascade)
 27459                        .IsRequired();
 27460                });
 461
 27462            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27463                {
 27464                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27465                        .WithMany("DisplayPreferences")
 27466                        .HasForeignKey("UserId")
 27467                        .OnDelete(DeleteBehavior.Cascade)
 27468                        .IsRequired();
 27469                });
 470
 27471            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27472                {
 27473                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 27474                        .WithMany("HomeSections")
 27475                        .HasForeignKey("DisplayPreferencesId")
 27476                        .OnDelete(DeleteBehavior.Cascade)
 27477                        .IsRequired();
 27478                });
 479
 27480            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27481                {
 27482                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27483                        .WithOne("ProfileImage")
 27484                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 27485                        .OnDelete(DeleteBehavior.Cascade);
 27486                });
 487
 27488            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27489                {
 27490                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27491                        .WithMany("ItemDisplayPreferences")
 27492                        .HasForeignKey("UserId")
 27493                        .OnDelete(DeleteBehavior.Cascade)
 27494                        .IsRequired();
 27495                });
 496
 27497            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27498                {
 27499                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27500                        .WithMany("Permissions")
 27501                        .HasForeignKey("UserId")
 27502                        .OnDelete(DeleteBehavior.Cascade);
 27503                });
 504
 27505            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27506                {
 27507                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27508                        .WithMany("Preferences")
 27509                        .HasForeignKey("UserId")
 27510                        .OnDelete(DeleteBehavior.Cascade);
 27511                });
 512
 27513            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27514                {
 27515                    b.Navigation("HomeSections");
 27516                });
 517
 27518            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27519                {
 27520                    b.Navigation("AccessSchedules");
 27521
 27522                    b.Navigation("DisplayPreferences");
 27523
 27524                    b.Navigation("ItemDisplayPreferences");
 27525
 27526                    b.Navigation("Permissions");
 27527
 27528                    b.Navigation("Preferences");
 27529
 27530                    b.Navigation("ProfileImage");
 27531                });
 532#pragma warning restore 612, 618
 27533        }
 534    }
 535}