< Summary - Jellyfin

Line coverage
91%
Covered lines: 661
Uncovered lines: 62
Coverable lines: 723
Total lines: 814
Line coverage: 91.4%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class RemoveEasyPassword : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.DropColumn(
 2214                name: "EasyPassword",
 2215                schema: "jellyfin",
 2216                table: "Users");
 17
 2218            migrationBuilder.RenameTable(
 2219                name: "Users",
 2220                schema: "jellyfin",
 2221                newName: "Users");
 22
 2223            migrationBuilder.RenameTable(
 2224                name: "Preferences",
 2225                schema: "jellyfin",
 2226                newName: "Preferences");
 27
 2228            migrationBuilder.RenameTable(
 2229                name: "Permissions",
 2230                schema: "jellyfin",
 2231                newName: "Permissions");
 32
 2233            migrationBuilder.RenameTable(
 2234                name: "ItemDisplayPreferences",
 2235                schema: "jellyfin",
 2236                newName: "ItemDisplayPreferences");
 37
 2238            migrationBuilder.RenameTable(
 2239                name: "ImageInfos",
 2240                schema: "jellyfin",
 2241                newName: "ImageInfos");
 42
 2243            migrationBuilder.RenameTable(
 2244                name: "HomeSection",
 2245                schema: "jellyfin",
 2246                newName: "HomeSection");
 47
 2248            migrationBuilder.RenameTable(
 2249                name: "DisplayPreferences",
 2250                schema: "jellyfin",
 2251                newName: "DisplayPreferences");
 52
 2253            migrationBuilder.RenameTable(
 2254                name: "Devices",
 2255                schema: "jellyfin",
 2256                newName: "Devices");
 57
 2258            migrationBuilder.RenameTable(
 2259                name: "DeviceOptions",
 2260                schema: "jellyfin",
 2261                newName: "DeviceOptions");
 62
 2263            migrationBuilder.RenameTable(
 2264                name: "CustomItemDisplayPreferences",
 2265                schema: "jellyfin",
 2266                newName: "CustomItemDisplayPreferences");
 67
 2268            migrationBuilder.RenameTable(
 2269                name: "ApiKeys",
 2270                schema: "jellyfin",
 2271                newName: "ApiKeys");
 72
 2273            migrationBuilder.RenameTable(
 2274                name: "ActivityLogs",
 2275                schema: "jellyfin",
 2276                newName: "ActivityLogs");
 77
 2278            migrationBuilder.RenameTable(
 2279                name: "AccessSchedules",
 2280                schema: "jellyfin",
 2281                newName: "AccessSchedules");
 2282        }
 83
 84        /// <inheritdoc />
 85        protected override void Down(MigrationBuilder migrationBuilder)
 86        {
 087            migrationBuilder.EnsureSchema(
 088                name: "jellyfin");
 89
 090            migrationBuilder.RenameTable(
 091                name: "Users",
 092                newName: "Users",
 093                newSchema: "jellyfin");
 94
 095            migrationBuilder.RenameTable(
 096                name: "Preferences",
 097                newName: "Preferences",
 098                newSchema: "jellyfin");
 99
 0100            migrationBuilder.RenameTable(
 0101                name: "Permissions",
 0102                newName: "Permissions",
 0103                newSchema: "jellyfin");
 104
 0105            migrationBuilder.RenameTable(
 0106                name: "ItemDisplayPreferences",
 0107                newName: "ItemDisplayPreferences",
 0108                newSchema: "jellyfin");
 109
 0110            migrationBuilder.RenameTable(
 0111                name: "ImageInfos",
 0112                newName: "ImageInfos",
 0113                newSchema: "jellyfin");
 114
 0115            migrationBuilder.RenameTable(
 0116                name: "HomeSection",
 0117                newName: "HomeSection",
 0118                newSchema: "jellyfin");
 119
 0120            migrationBuilder.RenameTable(
 0121                name: "DisplayPreferences",
 0122                newName: "DisplayPreferences",
 0123                newSchema: "jellyfin");
 124
 0125            migrationBuilder.RenameTable(
 0126                name: "Devices",
 0127                newName: "Devices",
 0128                newSchema: "jellyfin");
 129
 0130            migrationBuilder.RenameTable(
 0131                name: "DeviceOptions",
 0132                newName: "DeviceOptions",
 0133                newSchema: "jellyfin");
 134
 0135            migrationBuilder.RenameTable(
 0136                name: "CustomItemDisplayPreferences",
 0137                newName: "CustomItemDisplayPreferences",
 0138                newSchema: "jellyfin");
 139
 0140            migrationBuilder.RenameTable(
 0141                name: "ApiKeys",
 0142                newName: "ApiKeys",
 0143                newSchema: "jellyfin");
 144
 0145            migrationBuilder.RenameTable(
 0146                name: "ActivityLogs",
 0147                newName: "ActivityLogs",
 0148                newSchema: "jellyfin");
 149
 0150            migrationBuilder.RenameTable(
 0151                name: "AccessSchedules",
 0152                newName: "AccessSchedules",
 0153                newSchema: "jellyfin");
 154
 0155            migrationBuilder.AddColumn<string>(
 0156                name: "EasyPassword",
 0157                schema: "jellyfin",
 0158                table: "Users",
 0159                type: "TEXT",
 0160                maxLength: 65535,
 0161                nullable: true);
 0162        }
 163    }
 164}

/srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Server.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("20230526173516_RemoveEasyPassword")]
 15    partial class RemoveEasyPassword
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "7.0.5");
 22
 2223            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246                });
 47
 2248            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2249                {
 2250                    b.Property<int>("Id")
 2251                        .ValueGeneratedOnAdd()
 2252                        .HasColumnType("INTEGER");
 2253
 2254                    b.Property<DateTime>("DateCreated")
 2255                        .HasColumnType("TEXT");
 2256
 2257                    b.Property<string>("ItemId")
 2258                        .HasMaxLength(256)
 2259                        .HasColumnType("TEXT");
 2260
 2261                    b.Property<int>("LogSeverity")
 2262                        .HasColumnType("INTEGER");
 2263
 2264                    b.Property<string>("Name")
 2265                        .IsRequired()
 2266                        .HasMaxLength(512)
 2267                        .HasColumnType("TEXT");
 2268
 2269                    b.Property<string>("Overview")
 2270                        .HasMaxLength(512)
 2271                        .HasColumnType("TEXT");
 2272
 2273                    b.Property<uint>("RowVersion")
 2274                        .IsConcurrencyToken()
 2275                        .HasColumnType("INTEGER");
 2276
 2277                    b.Property<string>("ShortOverview")
 2278                        .HasMaxLength(512)
 2279                        .HasColumnType("TEXT");
 2280
 2281                    b.Property<string>("Type")
 2282                        .IsRequired()
 2283                        .HasMaxLength(256)
 2284                        .HasColumnType("TEXT");
 2285
 2286                    b.Property<Guid>("UserId")
 2287                        .HasColumnType("TEXT");
 2288
 2289                    b.HasKey("Id");
 2290
 2291                    b.HasIndex("DateCreated");
 2292
 2293                    b.ToTable("ActivityLogs");
 2294                });
 95
 2296            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 2297                {
 2298                    b.Property<int>("Id")
 2299                        .ValueGeneratedOnAdd()
 22100                        .HasColumnType("INTEGER");
 22101
 22102                    b.Property<string>("Client")
 22103                        .IsRequired()
 22104                        .HasMaxLength(32)
 22105                        .HasColumnType("TEXT");
 22106
 22107                    b.Property<Guid>("ItemId")
 22108                        .HasColumnType("TEXT");
 22109
 22110                    b.Property<string>("Key")
 22111                        .IsRequired()
 22112                        .HasColumnType("TEXT");
 22113
 22114                    b.Property<Guid>("UserId")
 22115                        .HasColumnType("TEXT");
 22116
 22117                    b.Property<string>("Value")
 22118                        .HasColumnType("TEXT");
 22119
 22120                    b.HasKey("Id");
 22121
 22122                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22123                        .IsUnique();
 22124
 22125                    b.ToTable("CustomItemDisplayPreferences");
 22126                });
 127
 22128            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22129                {
 22130                    b.Property<int>("Id")
 22131                        .ValueGeneratedOnAdd()
 22132                        .HasColumnType("INTEGER");
 22133
 22134                    b.Property<int>("ChromecastVersion")
 22135                        .HasColumnType("INTEGER");
 22136
 22137                    b.Property<string>("Client")
 22138                        .IsRequired()
 22139                        .HasMaxLength(32)
 22140                        .HasColumnType("TEXT");
 22141
 22142                    b.Property<string>("DashboardTheme")
 22143                        .HasMaxLength(32)
 22144                        .HasColumnType("TEXT");
 22145
 22146                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22147                        .HasColumnType("INTEGER");
 22148
 22149                    b.Property<int?>("IndexBy")
 22150                        .HasColumnType("INTEGER");
 22151
 22152                    b.Property<Guid>("ItemId")
 22153                        .HasColumnType("TEXT");
 22154
 22155                    b.Property<int>("ScrollDirection")
 22156                        .HasColumnType("INTEGER");
 22157
 22158                    b.Property<bool>("ShowBackdrop")
 22159                        .HasColumnType("INTEGER");
 22160
 22161                    b.Property<bool>("ShowSidebar")
 22162                        .HasColumnType("INTEGER");
 22163
 22164                    b.Property<int>("SkipBackwardLength")
 22165                        .HasColumnType("INTEGER");
 22166
 22167                    b.Property<int>("SkipForwardLength")
 22168                        .HasColumnType("INTEGER");
 22169
 22170                    b.Property<string>("TvHome")
 22171                        .HasMaxLength(32)
 22172                        .HasColumnType("TEXT");
 22173
 22174                    b.Property<Guid>("UserId")
 22175                        .HasColumnType("TEXT");
 22176
 22177                    b.HasKey("Id");
 22178
 22179                    b.HasIndex("UserId", "ItemId", "Client")
 22180                        .IsUnique();
 22181
 22182                    b.ToTable("DisplayPreferences");
 22183                });
 184
 22185            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22186                {
 22187                    b.Property<int>("Id")
 22188                        .ValueGeneratedOnAdd()
 22189                        .HasColumnType("INTEGER");
 22190
 22191                    b.Property<int>("DisplayPreferencesId")
 22192                        .HasColumnType("INTEGER");
 22193
 22194                    b.Property<int>("Order")
 22195                        .HasColumnType("INTEGER");
 22196
 22197                    b.Property<int>("Type")
 22198                        .HasColumnType("INTEGER");
 22199
 22200                    b.HasKey("Id");
 22201
 22202                    b.HasIndex("DisplayPreferencesId");
 22203
 22204                    b.ToTable("HomeSection");
 22205                });
 206
 22207            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22208                {
 22209                    b.Property<int>("Id")
 22210                        .ValueGeneratedOnAdd()
 22211                        .HasColumnType("INTEGER");
 22212
 22213                    b.Property<DateTime>("LastModified")
 22214                        .HasColumnType("TEXT");
 22215
 22216                    b.Property<string>("Path")
 22217                        .IsRequired()
 22218                        .HasMaxLength(512)
 22219                        .HasColumnType("TEXT");
 22220
 22221                    b.Property<Guid?>("UserId")
 22222                        .HasColumnType("TEXT");
 22223
 22224                    b.HasKey("Id");
 22225
 22226                    b.HasIndex("UserId")
 22227                        .IsUnique();
 22228
 22229                    b.ToTable("ImageInfos");
 22230                });
 231
 22232            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22233                {
 22234                    b.Property<int>("Id")
 22235                        .ValueGeneratedOnAdd()
 22236                        .HasColumnType("INTEGER");
 22237
 22238                    b.Property<string>("Client")
 22239                        .IsRequired()
 22240                        .HasMaxLength(32)
 22241                        .HasColumnType("TEXT");
 22242
 22243                    b.Property<int?>("IndexBy")
 22244                        .HasColumnType("INTEGER");
 22245
 22246                    b.Property<Guid>("ItemId")
 22247                        .HasColumnType("TEXT");
 22248
 22249                    b.Property<bool>("RememberIndexing")
 22250                        .HasColumnType("INTEGER");
 22251
 22252                    b.Property<bool>("RememberSorting")
 22253                        .HasColumnType("INTEGER");
 22254
 22255                    b.Property<string>("SortBy")
 22256                        .IsRequired()
 22257                        .HasMaxLength(64)
 22258                        .HasColumnType("TEXT");
 22259
 22260                    b.Property<int>("SortOrder")
 22261                        .HasColumnType("INTEGER");
 22262
 22263                    b.Property<Guid>("UserId")
 22264                        .HasColumnType("TEXT");
 22265
 22266                    b.Property<int>("ViewType")
 22267                        .HasColumnType("INTEGER");
 22268
 22269                    b.HasKey("Id");
 22270
 22271                    b.HasIndex("UserId");
 22272
 22273                    b.ToTable("ItemDisplayPreferences");
 22274                });
 275
 22276            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22277                {
 22278                    b.Property<int>("Id")
 22279                        .ValueGeneratedOnAdd()
 22280                        .HasColumnType("INTEGER");
 22281
 22282                    b.Property<int>("Kind")
 22283                        .HasColumnType("INTEGER");
 22284
 22285                    b.Property<Guid?>("Permission_Permissions_Guid")
 22286                        .HasColumnType("TEXT");
 22287
 22288                    b.Property<uint>("RowVersion")
 22289                        .IsConcurrencyToken()
 22290                        .HasColumnType("INTEGER");
 22291
 22292                    b.Property<Guid?>("UserId")
 22293                        .HasColumnType("TEXT");
 22294
 22295                    b.Property<bool>("Value")
 22296                        .HasColumnType("INTEGER");
 22297
 22298                    b.HasKey("Id");
 22299
 22300                    b.HasIndex("UserId", "Kind")
 22301                        .IsUnique()
 22302                        .HasFilter("[UserId] IS NOT NULL");
 22303
 22304                    b.ToTable("Permissions");
 22305                });
 306
 22307            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22308                {
 22309                    b.Property<int>("Id")
 22310                        .ValueGeneratedOnAdd()
 22311                        .HasColumnType("INTEGER");
 22312
 22313                    b.Property<int>("Kind")
 22314                        .HasColumnType("INTEGER");
 22315
 22316                    b.Property<Guid?>("Preference_Preferences_Guid")
 22317                        .HasColumnType("TEXT");
 22318
 22319                    b.Property<uint>("RowVersion")
 22320                        .IsConcurrencyToken()
 22321                        .HasColumnType("INTEGER");
 22322
 22323                    b.Property<Guid?>("UserId")
 22324                        .HasColumnType("TEXT");
 22325
 22326                    b.Property<string>("Value")
 22327                        .IsRequired()
 22328                        .HasMaxLength(65535)
 22329                        .HasColumnType("TEXT");
 22330
 22331                    b.HasKey("Id");
 22332
 22333                    b.HasIndex("UserId", "Kind")
 22334                        .IsUnique()
 22335                        .HasFilter("[UserId] IS NOT NULL");
 22336
 22337                    b.ToTable("Preferences");
 22338                });
 339
 22340            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 22341                {
 22342                    b.Property<int>("Id")
 22343                        .ValueGeneratedOnAdd()
 22344                        .HasColumnType("INTEGER");
 22345
 22346                    b.Property<string>("AccessToken")
 22347                        .IsRequired()
 22348                        .HasColumnType("TEXT");
 22349
 22350                    b.Property<DateTime>("DateCreated")
 22351                        .HasColumnType("TEXT");
 22352
 22353                    b.Property<DateTime>("DateLastActivity")
 22354                        .HasColumnType("TEXT");
 22355
 22356                    b.Property<string>("Name")
 22357                        .IsRequired()
 22358                        .HasMaxLength(64)
 22359                        .HasColumnType("TEXT");
 22360
 22361                    b.HasKey("Id");
 22362
 22363                    b.HasIndex("AccessToken")
 22364                        .IsUnique();
 22365
 22366                    b.ToTable("ApiKeys");
 22367                });
 368
 22369            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 22370                {
 22371                    b.Property<int>("Id")
 22372                        .ValueGeneratedOnAdd()
 22373                        .HasColumnType("INTEGER");
 22374
 22375                    b.Property<string>("AccessToken")
 22376                        .IsRequired()
 22377                        .HasColumnType("TEXT");
 22378
 22379                    b.Property<string>("AppName")
 22380                        .IsRequired()
 22381                        .HasMaxLength(64)
 22382                        .HasColumnType("TEXT");
 22383
 22384                    b.Property<string>("AppVersion")
 22385                        .IsRequired()
 22386                        .HasMaxLength(32)
 22387                        .HasColumnType("TEXT");
 22388
 22389                    b.Property<DateTime>("DateCreated")
 22390                        .HasColumnType("TEXT");
 22391
 22392                    b.Property<DateTime>("DateLastActivity")
 22393                        .HasColumnType("TEXT");
 22394
 22395                    b.Property<DateTime>("DateModified")
 22396                        .HasColumnType("TEXT");
 22397
 22398                    b.Property<string>("DeviceId")
 22399                        .IsRequired()
 22400                        .HasMaxLength(256)
 22401                        .HasColumnType("TEXT");
 22402
 22403                    b.Property<string>("DeviceName")
 22404                        .IsRequired()
 22405                        .HasMaxLength(64)
 22406                        .HasColumnType("TEXT");
 22407
 22408                    b.Property<bool>("IsActive")
 22409                        .HasColumnType("INTEGER");
 22410
 22411                    b.Property<Guid>("UserId")
 22412                        .HasColumnType("TEXT");
 22413
 22414                    b.HasKey("Id");
 22415
 22416                    b.HasIndex("DeviceId");
 22417
 22418                    b.HasIndex("AccessToken", "DateLastActivity");
 22419
 22420                    b.HasIndex("DeviceId", "DateLastActivity");
 22421
 22422                    b.HasIndex("UserId", "DeviceId");
 22423
 22424                    b.ToTable("Devices");
 22425                });
 426
 22427            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 22428                {
 22429                    b.Property<int>("Id")
 22430                        .ValueGeneratedOnAdd()
 22431                        .HasColumnType("INTEGER");
 22432
 22433                    b.Property<string>("CustomName")
 22434                        .HasColumnType("TEXT");
 22435
 22436                    b.Property<string>("DeviceId")
 22437                        .IsRequired()
 22438                        .HasColumnType("TEXT");
 22439
 22440                    b.HasKey("Id");
 22441
 22442                    b.HasIndex("DeviceId")
 22443                        .IsUnique();
 22444
 22445                    b.ToTable("DeviceOptions");
 22446                });
 447
 22448            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22449                {
 22450                    b.Property<Guid>("Id")
 22451                        .ValueGeneratedOnAdd()
 22452                        .HasColumnType("TEXT");
 22453
 22454                    b.Property<string>("AudioLanguagePreference")
 22455                        .HasMaxLength(255)
 22456                        .HasColumnType("TEXT");
 22457
 22458                    b.Property<string>("AuthenticationProviderId")
 22459                        .IsRequired()
 22460                        .HasMaxLength(255)
 22461                        .HasColumnType("TEXT");
 22462
 22463                    b.Property<bool>("DisplayCollectionsView")
 22464                        .HasColumnType("INTEGER");
 22465
 22466                    b.Property<bool>("DisplayMissingEpisodes")
 22467                        .HasColumnType("INTEGER");
 22468
 22469                    b.Property<bool>("EnableAutoLogin")
 22470                        .HasColumnType("INTEGER");
 22471
 22472                    b.Property<bool>("EnableLocalPassword")
 22473                        .HasColumnType("INTEGER");
 22474
 22475                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 22476                        .HasColumnType("INTEGER");
 22477
 22478                    b.Property<bool>("EnableUserPreferenceAccess")
 22479                        .HasColumnType("INTEGER");
 22480
 22481                    b.Property<bool>("HidePlayedInLatest")
 22482                        .HasColumnType("INTEGER");
 22483
 22484                    b.Property<long>("InternalId")
 22485                        .HasColumnType("INTEGER");
 22486
 22487                    b.Property<int>("InvalidLoginAttemptCount")
 22488                        .HasColumnType("INTEGER");
 22489
 22490                    b.Property<DateTime?>("LastActivityDate")
 22491                        .HasColumnType("TEXT");
 22492
 22493                    b.Property<DateTime?>("LastLoginDate")
 22494                        .HasColumnType("TEXT");
 22495
 22496                    b.Property<int?>("LoginAttemptsBeforeLockout")
 22497                        .HasColumnType("INTEGER");
 22498
 22499                    b.Property<int>("MaxActiveSessions")
 22500                        .HasColumnType("INTEGER");
 22501
 22502                    b.Property<int?>("MaxParentalAgeRating")
 22503                        .HasColumnType("INTEGER");
 22504
 22505                    b.Property<bool>("MustUpdatePassword")
 22506                        .HasColumnType("INTEGER");
 22507
 22508                    b.Property<string>("Password")
 22509                        .HasMaxLength(65535)
 22510                        .HasColumnType("TEXT");
 22511
 22512                    b.Property<string>("PasswordResetProviderId")
 22513                        .IsRequired()
 22514                        .HasMaxLength(255)
 22515                        .HasColumnType("TEXT");
 22516
 22517                    b.Property<bool>("PlayDefaultAudioTrack")
 22518                        .HasColumnType("INTEGER");
 22519
 22520                    b.Property<bool>("RememberAudioSelections")
 22521                        .HasColumnType("INTEGER");
 22522
 22523                    b.Property<bool>("RememberSubtitleSelections")
 22524                        .HasColumnType("INTEGER");
 22525
 22526                    b.Property<int?>("RemoteClientBitrateLimit")
 22527                        .HasColumnType("INTEGER");
 22528
 22529                    b.Property<uint>("RowVersion")
 22530                        .IsConcurrencyToken()
 22531                        .HasColumnType("INTEGER");
 22532
 22533                    b.Property<string>("SubtitleLanguagePreference")
 22534                        .HasMaxLength(255)
 22535                        .HasColumnType("TEXT");
 22536
 22537                    b.Property<int>("SubtitleMode")
 22538                        .HasColumnType("INTEGER");
 22539
 22540                    b.Property<int>("SyncPlayAccess")
 22541                        .HasColumnType("INTEGER");
 22542
 22543                    b.Property<string>("Username")
 22544                        .IsRequired()
 22545                        .HasMaxLength(255)
 22546                        .HasColumnType("TEXT")
 22547                        .UseCollation("NOCASE");
 22548
 22549                    b.HasKey("Id");
 22550
 22551                    b.HasIndex("Username")
 22552                        .IsUnique();
 22553
 22554                    b.ToTable("Users");
 22555                });
 556
 22557            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 22558                {
 22559                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22560                        .WithMany("AccessSchedules")
 22561                        .HasForeignKey("UserId")
 22562                        .OnDelete(DeleteBehavior.Cascade)
 22563                        .IsRequired();
 22564                });
 565
 22566            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22567                {
 22568                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22569                        .WithMany("DisplayPreferences")
 22570                        .HasForeignKey("UserId")
 22571                        .OnDelete(DeleteBehavior.Cascade)
 22572                        .IsRequired();
 22573                });
 574
 22575            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22576                {
 22577                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 22578                        .WithMany("HomeSections")
 22579                        .HasForeignKey("DisplayPreferencesId")
 22580                        .OnDelete(DeleteBehavior.Cascade)
 22581                        .IsRequired();
 22582                });
 583
 22584            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22585                {
 22586                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22587                        .WithOne("ProfileImage")
 22588                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 22589                        .OnDelete(DeleteBehavior.Cascade);
 22590                });
 591
 22592            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22593                {
 22594                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22595                        .WithMany("ItemDisplayPreferences")
 22596                        .HasForeignKey("UserId")
 22597                        .OnDelete(DeleteBehavior.Cascade)
 22598                        .IsRequired();
 22599                });
 600
 22601            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22602                {
 22603                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22604                        .WithMany("Permissions")
 22605                        .HasForeignKey("UserId")
 22606                        .OnDelete(DeleteBehavior.Cascade);
 22607                });
 608
 22609            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22610                {
 22611                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22612                        .WithMany("Preferences")
 22613                        .HasForeignKey("UserId")
 22614                        .OnDelete(DeleteBehavior.Cascade);
 22615                });
 616
 22617            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 22618                {
 22619                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 22620                        .WithMany()
 22621                        .HasForeignKey("UserId")
 22622                        .OnDelete(DeleteBehavior.Cascade)
 22623                        .IsRequired();
 22624
 22625                    b.Navigation("User");
 22626                });
 627
 22628            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22629                {
 22630                    b.Navigation("HomeSections");
 22631                });
 632
 22633            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22634                {
 22635                    b.Navigation("AccessSchedules");
 22636
 22637                    b.Navigation("DisplayPreferences");
 22638
 22639                    b.Navigation("ItemDisplayPreferences");
 22640
 22641                    b.Navigation("Permissions");
 22642
 22643                    b.Navigation("Preferences");
 22644
 22645                    b.Navigation("ProfileImage");
 22646                });
 647#pragma warning restore 612, 618
 22648        }
 649    }
 650}