< Summary - Jellyfin

Line coverage
98%
Covered lines: 700
Uncovered lines: 10
Coverable lines: 710
Total lines: 781
Line coverage: 98.5%
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: 98.5% (700/710) Total lines: 781

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/20210814002109_AddDevices.cs

#LineLine coverage
 1#pragma warning disable CS1591, SA1601
 2
 3using System;
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    public partial class AddDevices : Migration
 9    {
 10        protected override void Up(MigrationBuilder migrationBuilder)
 11        {
 2712            migrationBuilder.CreateTable(
 2713                name: "ApiKeys",
 2714                schema: "jellyfin",
 2715                columns: table => new
 2716                {
 2717                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2718                        .Annotation("Sqlite:Autoincrement", true),
 2719                    DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false),
 2720                    DateLastActivity = table.Column<DateTime>(type: "TEXT", nullable: false),
 2721                    Name = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2722                    AccessToken = table.Column<string>(type: "TEXT", nullable: false)
 2723                },
 2724                constraints: table =>
 2725                {
 2726                    table.PrimaryKey("PK_ApiKeys", x => x.Id);
 2727                });
 28
 2729            migrationBuilder.CreateTable(
 2730                name: "DeviceOptions",
 2731                schema: "jellyfin",
 2732                columns: table => new
 2733                {
 2734                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2735                        .Annotation("Sqlite:Autoincrement", true),
 2736                    DeviceId = table.Column<string>(type: "TEXT", nullable: false),
 2737                    CustomName = table.Column<string>(type: "TEXT", nullable: true)
 2738                },
 2739                constraints: table =>
 2740                {
 2741                    table.PrimaryKey("PK_DeviceOptions", x => x.Id);
 2742                });
 43
 2744            migrationBuilder.CreateTable(
 2745                name: "Devices",
 2746                schema: "jellyfin",
 2747                columns: table => new
 2748                {
 2749                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2750                        .Annotation("Sqlite:Autoincrement", true),
 2751                    UserId = table.Column<Guid>(type: "TEXT", nullable: false),
 2752                    AccessToken = table.Column<string>(type: "TEXT", nullable: false),
 2753                    AppName = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2754                    AppVersion = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 2755                    DeviceName = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2756                    DeviceId = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
 2757                    IsActive = table.Column<bool>(type: "INTEGER", nullable: false),
 2758                    DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false),
 2759                    DateModified = table.Column<DateTime>(type: "TEXT", nullable: false),
 2760                    DateLastActivity = table.Column<DateTime>(type: "TEXT", nullable: false)
 2761                },
 2762                constraints: table =>
 2763                {
 2764                    table.PrimaryKey("PK_Devices", x => x.Id);
 2765                    table.ForeignKey(
 2766                        name: "FK_Devices_Users_UserId",
 2767                        column: x => x.UserId,
 2768                        principalSchema: "jellyfin",
 2769                        principalTable: "Users",
 2770                        principalColumn: "Id",
 2771                        onDelete: ReferentialAction.Cascade);
 2772                });
 73
 2774            migrationBuilder.CreateIndex(
 2775                name: "IX_ApiKeys_AccessToken",
 2776                schema: "jellyfin",
 2777                table: "ApiKeys",
 2778                column: "AccessToken",
 2779                unique: true);
 80
 2781            migrationBuilder.CreateIndex(
 2782                name: "IX_DeviceOptions_DeviceId",
 2783                schema: "jellyfin",
 2784                table: "DeviceOptions",
 2785                column: "DeviceId",
 2786                unique: true);
 87
 2788            migrationBuilder.CreateIndex(
 2789                name: "IX_Devices_AccessToken_DateLastActivity",
 2790                schema: "jellyfin",
 2791                table: "Devices",
 2792                columns: new[] { "AccessToken", "DateLastActivity" });
 93
 2794            migrationBuilder.CreateIndex(
 2795                name: "IX_Devices_DeviceId",
 2796                schema: "jellyfin",
 2797                table: "Devices",
 2798                column: "DeviceId");
 99
 27100            migrationBuilder.CreateIndex(
 27101                name: "IX_Devices_DeviceId_DateLastActivity",
 27102                schema: "jellyfin",
 27103                table: "Devices",
 27104                columns: new[] { "DeviceId", "DateLastActivity" });
 105
 27106            migrationBuilder.CreateIndex(
 27107                name: "IX_Devices_UserId_DeviceId",
 27108                schema: "jellyfin",
 27109                table: "Devices",
 27110                columns: new[] { "UserId", "DeviceId" });
 27111        }
 112
 113        protected override void Down(MigrationBuilder migrationBuilder)
 114        {
 0115            migrationBuilder.DropTable(
 0116                name: "ApiKeys",
 0117                schema: "jellyfin");
 118
 0119            migrationBuilder.DropTable(
 0120                name: "DeviceOptions",
 0121                schema: "jellyfin");
 122
 0123            migrationBuilder.DropTable(
 0124                name: "Devices",
 0125                schema: "jellyfin");
 0126        }
 127    }
 128}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.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("20210814002109_AddDevices")]
 15    partial class AddDevices
 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.7");
 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                        .HasColumnType("TEXT");
 27118
 27119                    b.HasKey("Id");
 27120
 27121                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27122                        .IsUnique();
 27123
 27124                    b.ToTable("CustomItemDisplayPreferences");
 27125                });
 126
 27127            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27128                {
 27129                    b.Property<int>("Id")
 27130                        .ValueGeneratedOnAdd()
 27131                        .HasColumnType("INTEGER");
 27132
 27133                    b.Property<int>("ChromecastVersion")
 27134                        .HasColumnType("INTEGER");
 27135
 27136                    b.Property<string>("Client")
 27137                        .IsRequired()
 27138                        .HasMaxLength(32)
 27139                        .HasColumnType("TEXT");
 27140
 27141                    b.Property<string>("DashboardTheme")
 27142                        .HasMaxLength(32)
 27143                        .HasColumnType("TEXT");
 27144
 27145                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27146                        .HasColumnType("INTEGER");
 27147
 27148                    b.Property<int?>("IndexBy")
 27149                        .HasColumnType("INTEGER");
 27150
 27151                    b.Property<Guid>("ItemId")
 27152                        .HasColumnType("TEXT");
 27153
 27154                    b.Property<int>("ScrollDirection")
 27155                        .HasColumnType("INTEGER");
 27156
 27157                    b.Property<bool>("ShowBackdrop")
 27158                        .HasColumnType("INTEGER");
 27159
 27160                    b.Property<bool>("ShowSidebar")
 27161                        .HasColumnType("INTEGER");
 27162
 27163                    b.Property<int>("SkipBackwardLength")
 27164                        .HasColumnType("INTEGER");
 27165
 27166                    b.Property<int>("SkipForwardLength")
 27167                        .HasColumnType("INTEGER");
 27168
 27169                    b.Property<string>("TvHome")
 27170                        .HasMaxLength(32)
 27171                        .HasColumnType("TEXT");
 27172
 27173                    b.Property<Guid>("UserId")
 27174                        .HasColumnType("TEXT");
 27175
 27176                    b.HasKey("Id");
 27177
 27178                    b.HasIndex("UserId", "ItemId", "Client")
 27179                        .IsUnique();
 27180
 27181                    b.ToTable("DisplayPreferences");
 27182                });
 183
 27184            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27185                {
 27186                    b.Property<int>("Id")
 27187                        .ValueGeneratedOnAdd()
 27188                        .HasColumnType("INTEGER");
 27189
 27190                    b.Property<int>("DisplayPreferencesId")
 27191                        .HasColumnType("INTEGER");
 27192
 27193                    b.Property<int>("Order")
 27194                        .HasColumnType("INTEGER");
 27195
 27196                    b.Property<int>("Type")
 27197                        .HasColumnType("INTEGER");
 27198
 27199                    b.HasKey("Id");
 27200
 27201                    b.HasIndex("DisplayPreferencesId");
 27202
 27203                    b.ToTable("HomeSection");
 27204                });
 205
 27206            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27207                {
 27208                    b.Property<int>("Id")
 27209                        .ValueGeneratedOnAdd()
 27210                        .HasColumnType("INTEGER");
 27211
 27212                    b.Property<DateTime>("LastModified")
 27213                        .HasColumnType("TEXT");
 27214
 27215                    b.Property<string>("Path")
 27216                        .IsRequired()
 27217                        .HasMaxLength(512)
 27218                        .HasColumnType("TEXT");
 27219
 27220                    b.Property<Guid?>("UserId")
 27221                        .HasColumnType("TEXT");
 27222
 27223                    b.HasKey("Id");
 27224
 27225                    b.HasIndex("UserId")
 27226                        .IsUnique();
 27227
 27228                    b.ToTable("ImageInfos");
 27229                });
 230
 27231            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27232                {
 27233                    b.Property<int>("Id")
 27234                        .ValueGeneratedOnAdd()
 27235                        .HasColumnType("INTEGER");
 27236
 27237                    b.Property<string>("Client")
 27238                        .IsRequired()
 27239                        .HasMaxLength(32)
 27240                        .HasColumnType("TEXT");
 27241
 27242                    b.Property<int?>("IndexBy")
 27243                        .HasColumnType("INTEGER");
 27244
 27245                    b.Property<Guid>("ItemId")
 27246                        .HasColumnType("TEXT");
 27247
 27248                    b.Property<bool>("RememberIndexing")
 27249                        .HasColumnType("INTEGER");
 27250
 27251                    b.Property<bool>("RememberSorting")
 27252                        .HasColumnType("INTEGER");
 27253
 27254                    b.Property<string>("SortBy")
 27255                        .IsRequired()
 27256                        .HasMaxLength(64)
 27257                        .HasColumnType("TEXT");
 27258
 27259                    b.Property<int>("SortOrder")
 27260                        .HasColumnType("INTEGER");
 27261
 27262                    b.Property<Guid>("UserId")
 27263                        .HasColumnType("TEXT");
 27264
 27265                    b.Property<int>("ViewType")
 27266                        .HasColumnType("INTEGER");
 27267
 27268                    b.HasKey("Id");
 27269
 27270                    b.HasIndex("UserId");
 27271
 27272                    b.ToTable("ItemDisplayPreferences");
 27273                });
 274
 27275            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27276                {
 27277                    b.Property<int>("Id")
 27278                        .ValueGeneratedOnAdd()
 27279                        .HasColumnType("INTEGER");
 27280
 27281                    b.Property<int>("Kind")
 27282                        .HasColumnType("INTEGER");
 27283
 27284                    b.Property<Guid?>("Permission_Permissions_Guid")
 27285                        .HasColumnType("TEXT");
 27286
 27287                    b.Property<uint>("RowVersion")
 27288                        .IsConcurrencyToken()
 27289                        .HasColumnType("INTEGER");
 27290
 27291                    b.Property<Guid?>("UserId")
 27292                        .HasColumnType("TEXT");
 27293
 27294                    b.Property<bool>("Value")
 27295                        .HasColumnType("INTEGER");
 27296
 27297                    b.HasKey("Id");
 27298
 27299                    b.HasIndex("UserId", "Kind")
 27300                        .IsUnique()
 27301                        .HasFilter("[UserId] IS NOT NULL");
 27302
 27303                    b.ToTable("Permissions");
 27304                });
 305
 27306            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27307                {
 27308                    b.Property<int>("Id")
 27309                        .ValueGeneratedOnAdd()
 27310                        .HasColumnType("INTEGER");
 27311
 27312                    b.Property<int>("Kind")
 27313                        .HasColumnType("INTEGER");
 27314
 27315                    b.Property<Guid?>("Preference_Preferences_Guid")
 27316                        .HasColumnType("TEXT");
 27317
 27318                    b.Property<uint>("RowVersion")
 27319                        .IsConcurrencyToken()
 27320                        .HasColumnType("INTEGER");
 27321
 27322                    b.Property<Guid?>("UserId")
 27323                        .HasColumnType("TEXT");
 27324
 27325                    b.Property<string>("Value")
 27326                        .IsRequired()
 27327                        .HasMaxLength(65535)
 27328                        .HasColumnType("TEXT");
 27329
 27330                    b.HasKey("Id");
 27331
 27332                    b.HasIndex("UserId", "Kind")
 27333                        .IsUnique()
 27334                        .HasFilter("[UserId] IS NOT NULL");
 27335
 27336                    b.ToTable("Preferences");
 27337                });
 338
 27339            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 27340                {
 27341                    b.Property<int>("Id")
 27342                        .ValueGeneratedOnAdd()
 27343                        .HasColumnType("INTEGER");
 27344
 27345                    b.Property<string>("AccessToken")
 27346                        .IsRequired()
 27347                        .HasColumnType("TEXT");
 27348
 27349                    b.Property<DateTime>("DateCreated")
 27350                        .HasColumnType("TEXT");
 27351
 27352                    b.Property<DateTime>("DateLastActivity")
 27353                        .HasColumnType("TEXT");
 27354
 27355                    b.Property<string>("Name")
 27356                        .IsRequired()
 27357                        .HasMaxLength(64)
 27358                        .HasColumnType("TEXT");
 27359
 27360                    b.HasKey("Id");
 27361
 27362                    b.HasIndex("AccessToken")
 27363                        .IsUnique();
 27364
 27365                    b.ToTable("ApiKeys");
 27366                });
 367
 27368            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 27369                {
 27370                    b.Property<int>("Id")
 27371                        .ValueGeneratedOnAdd()
 27372                        .HasColumnType("INTEGER");
 27373
 27374                    b.Property<string>("AccessToken")
 27375                        .IsRequired()
 27376                        .HasColumnType("TEXT");
 27377
 27378                    b.Property<string>("AppName")
 27379                        .IsRequired()
 27380                        .HasMaxLength(64)
 27381                        .HasColumnType("TEXT");
 27382
 27383                    b.Property<string>("AppVersion")
 27384                        .IsRequired()
 27385                        .HasMaxLength(32)
 27386                        .HasColumnType("TEXT");
 27387
 27388                    b.Property<DateTime>("DateCreated")
 27389                        .HasColumnType("TEXT");
 27390
 27391                    b.Property<DateTime>("DateLastActivity")
 27392                        .HasColumnType("TEXT");
 27393
 27394                    b.Property<DateTime>("DateModified")
 27395                        .HasColumnType("TEXT");
 27396
 27397                    b.Property<string>("DeviceId")
 27398                        .IsRequired()
 27399                        .HasMaxLength(256)
 27400                        .HasColumnType("TEXT");
 27401
 27402                    b.Property<string>("DeviceName")
 27403                        .IsRequired()
 27404                        .HasMaxLength(64)
 27405                        .HasColumnType("TEXT");
 27406
 27407                    b.Property<bool>("IsActive")
 27408                        .HasColumnType("INTEGER");
 27409
 27410                    b.Property<Guid>("UserId")
 27411                        .HasColumnType("TEXT");
 27412
 27413                    b.HasKey("Id");
 27414
 27415                    b.HasIndex("DeviceId");
 27416
 27417                    b.HasIndex("AccessToken", "DateLastActivity");
 27418
 27419                    b.HasIndex("DeviceId", "DateLastActivity");
 27420
 27421                    b.HasIndex("UserId", "DeviceId");
 27422
 27423                    b.ToTable("Devices");
 27424                });
 425
 27426            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 27427                {
 27428                    b.Property<int>("Id")
 27429                        .ValueGeneratedOnAdd()
 27430                        .HasColumnType("INTEGER");
 27431
 27432                    b.Property<string>("CustomName")
 27433                        .HasColumnType("TEXT");
 27434
 27435                    b.Property<string>("DeviceId")
 27436                        .IsRequired()
 27437                        .HasColumnType("TEXT");
 27438
 27439                    b.HasKey("Id");
 27440
 27441                    b.HasIndex("DeviceId")
 27442                        .IsUnique();
 27443
 27444                    b.ToTable("DeviceOptions");
 27445                });
 446
 27447            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27448                {
 27449                    b.Property<Guid>("Id")
 27450                        .ValueGeneratedOnAdd()
 27451                        .HasColumnType("TEXT");
 27452
 27453                    b.Property<string>("AudioLanguagePreference")
 27454                        .HasMaxLength(255)
 27455                        .HasColumnType("TEXT");
 27456
 27457                    b.Property<string>("AuthenticationProviderId")
 27458                        .IsRequired()
 27459                        .HasMaxLength(255)
 27460                        .HasColumnType("TEXT");
 27461
 27462                    b.Property<bool>("DisplayCollectionsView")
 27463                        .HasColumnType("INTEGER");
 27464
 27465                    b.Property<bool>("DisplayMissingEpisodes")
 27466                        .HasColumnType("INTEGER");
 27467
 27468                    b.Property<string>("EasyPassword")
 27469                        .HasMaxLength(65535)
 27470                        .HasColumnType("TEXT");
 27471
 27472                    b.Property<bool>("EnableAutoLogin")
 27473                        .HasColumnType("INTEGER");
 27474
 27475                    b.Property<bool>("EnableLocalPassword")
 27476                        .HasColumnType("INTEGER");
 27477
 27478                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 27479                        .HasColumnType("INTEGER");
 27480
 27481                    b.Property<bool>("EnableUserPreferenceAccess")
 27482                        .HasColumnType("INTEGER");
 27483
 27484                    b.Property<bool>("HidePlayedInLatest")
 27485                        .HasColumnType("INTEGER");
 27486
 27487                    b.Property<long>("InternalId")
 27488                        .HasColumnType("INTEGER");
 27489
 27490                    b.Property<int>("InvalidLoginAttemptCount")
 27491                        .HasColumnType("INTEGER");
 27492
 27493                    b.Property<DateTime?>("LastActivityDate")
 27494                        .HasColumnType("TEXT");
 27495
 27496                    b.Property<DateTime?>("LastLoginDate")
 27497                        .HasColumnType("TEXT");
 27498
 27499                    b.Property<int?>("LoginAttemptsBeforeLockout")
 27500                        .HasColumnType("INTEGER");
 27501
 27502                    b.Property<int>("MaxActiveSessions")
 27503                        .HasColumnType("INTEGER");
 27504
 27505                    b.Property<int?>("MaxParentalAgeRating")
 27506                        .HasColumnType("INTEGER");
 27507
 27508                    b.Property<bool>("MustUpdatePassword")
 27509                        .HasColumnType("INTEGER");
 27510
 27511                    b.Property<string>("Password")
 27512                        .HasMaxLength(65535)
 27513                        .HasColumnType("TEXT");
 27514
 27515                    b.Property<string>("PasswordResetProviderId")
 27516                        .IsRequired()
 27517                        .HasMaxLength(255)
 27518                        .HasColumnType("TEXT");
 27519
 27520                    b.Property<bool>("PlayDefaultAudioTrack")
 27521                        .HasColumnType("INTEGER");
 27522
 27523                    b.Property<bool>("RememberAudioSelections")
 27524                        .HasColumnType("INTEGER");
 27525
 27526                    b.Property<bool>("RememberSubtitleSelections")
 27527                        .HasColumnType("INTEGER");
 27528
 27529                    b.Property<int?>("RemoteClientBitrateLimit")
 27530                        .HasColumnType("INTEGER");
 27531
 27532                    b.Property<uint>("RowVersion")
 27533                        .IsConcurrencyToken()
 27534                        .HasColumnType("INTEGER");
 27535
 27536                    b.Property<string>("SubtitleLanguagePreference")
 27537                        .HasMaxLength(255)
 27538                        .HasColumnType("TEXT");
 27539
 27540                    b.Property<int>("SubtitleMode")
 27541                        .HasColumnType("INTEGER");
 27542
 27543                    b.Property<int>("SyncPlayAccess")
 27544                        .HasColumnType("INTEGER");
 27545
 27546                    b.Property<string>("Username")
 27547                        .IsRequired()
 27548                        .HasMaxLength(255)
 27549                        .HasColumnType("TEXT")
 27550                        .UseCollation("NOCASE");
 27551
 27552                    b.HasKey("Id");
 27553
 27554                    b.HasIndex("Username")
 27555                        .IsUnique();
 27556
 27557                    b.ToTable("Users");
 27558                });
 559
 27560            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 27561                {
 27562                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27563                        .WithMany("AccessSchedules")
 27564                        .HasForeignKey("UserId")
 27565                        .OnDelete(DeleteBehavior.Cascade)
 27566                        .IsRequired();
 27567                });
 568
 27569            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27570                {
 27571                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27572                        .WithMany("DisplayPreferences")
 27573                        .HasForeignKey("UserId")
 27574                        .OnDelete(DeleteBehavior.Cascade)
 27575                        .IsRequired();
 27576                });
 577
 27578            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27579                {
 27580                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 27581                        .WithMany("HomeSections")
 27582                        .HasForeignKey("DisplayPreferencesId")
 27583                        .OnDelete(DeleteBehavior.Cascade)
 27584                        .IsRequired();
 27585                });
 586
 27587            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27588                {
 27589                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27590                        .WithOne("ProfileImage")
 27591                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 27592                        .OnDelete(DeleteBehavior.Cascade);
 27593                });
 594
 27595            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27596                {
 27597                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27598                        .WithMany("ItemDisplayPreferences")
 27599                        .HasForeignKey("UserId")
 27600                        .OnDelete(DeleteBehavior.Cascade)
 27601                        .IsRequired();
 27602                });
 603
 27604            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27605                {
 27606                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27607                        .WithMany("Permissions")
 27608                        .HasForeignKey("UserId")
 27609                        .OnDelete(DeleteBehavior.Cascade);
 27610                });
 611
 27612            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27613                {
 27614                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27615                        .WithMany("Preferences")
 27616                        .HasForeignKey("UserId")
 27617                        .OnDelete(DeleteBehavior.Cascade);
 27618                });
 619
 27620            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 27621                {
 27622                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 27623                        .WithMany()
 27624                        .HasForeignKey("UserId")
 27625                        .OnDelete(DeleteBehavior.Cascade)
 27626                        .IsRequired();
 27627
 27628                    b.Navigation("User");
 27629                });
 630
 27631            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27632                {
 27633                    b.Navigation("HomeSections");
 27634                });
 635
 27636            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27637                {
 27638                    b.Navigation("AccessSchedules");
 27639
 27640                    b.Navigation("DisplayPreferences");
 27641
 27642                    b.Navigation("ItemDisplayPreferences");
 27643
 27644                    b.Navigation("Permissions");
 27645
 27646                    b.Navigation("Preferences");
 27647
 27648                    b.Navigation("ProfileImage");
 27649                });
 650#pragma warning restore 612, 618
 27651        }
 652    }
 653}