< 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

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/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        {
 2212            migrationBuilder.CreateTable(
 2213                name: "ApiKeys",
 2214                schema: "jellyfin",
 2215                columns: table => new
 2216                {
 2217                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2218                        .Annotation("Sqlite:Autoincrement", true),
 2219                    DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false),
 2220                    DateLastActivity = table.Column<DateTime>(type: "TEXT", nullable: false),
 2221                    Name = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2222                    AccessToken = table.Column<string>(type: "TEXT", nullable: false)
 2223                },
 2224                constraints: table =>
 2225                {
 2226                    table.PrimaryKey("PK_ApiKeys", x => x.Id);
 2227                });
 28
 2229            migrationBuilder.CreateTable(
 2230                name: "DeviceOptions",
 2231                schema: "jellyfin",
 2232                columns: table => new
 2233                {
 2234                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2235                        .Annotation("Sqlite:Autoincrement", true),
 2236                    DeviceId = table.Column<string>(type: "TEXT", nullable: false),
 2237                    CustomName = table.Column<string>(type: "TEXT", nullable: true)
 2238                },
 2239                constraints: table =>
 2240                {
 2241                    table.PrimaryKey("PK_DeviceOptions", x => x.Id);
 2242                });
 43
 2244            migrationBuilder.CreateTable(
 2245                name: "Devices",
 2246                schema: "jellyfin",
 2247                columns: table => new
 2248                {
 2249                    Id = table.Column<int>(type: "INTEGER", nullable: false)
 2250                        .Annotation("Sqlite:Autoincrement", true),
 2251                    UserId = table.Column<Guid>(type: "TEXT", nullable: false),
 2252                    AccessToken = table.Column<string>(type: "TEXT", nullable: false),
 2253                    AppName = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2254                    AppVersion = table.Column<string>(type: "TEXT", maxLength: 32, nullable: false),
 2255                    DeviceName = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
 2256                    DeviceId = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
 2257                    IsActive = table.Column<bool>(type: "INTEGER", nullable: false),
 2258                    DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false),
 2259                    DateModified = table.Column<DateTime>(type: "TEXT", nullable: false),
 2260                    DateLastActivity = table.Column<DateTime>(type: "TEXT", nullable: false)
 2261                },
 2262                constraints: table =>
 2263                {
 2264                    table.PrimaryKey("PK_Devices", x => x.Id);
 2265                    table.ForeignKey(
 2266                        name: "FK_Devices_Users_UserId",
 2267                        column: x => x.UserId,
 2268                        principalSchema: "jellyfin",
 2269                        principalTable: "Users",
 2270                        principalColumn: "Id",
 2271                        onDelete: ReferentialAction.Cascade);
 2272                });
 73
 2274            migrationBuilder.CreateIndex(
 2275                name: "IX_ApiKeys_AccessToken",
 2276                schema: "jellyfin",
 2277                table: "ApiKeys",
 2278                column: "AccessToken",
 2279                unique: true);
 80
 2281            migrationBuilder.CreateIndex(
 2282                name: "IX_DeviceOptions_DeviceId",
 2283                schema: "jellyfin",
 2284                table: "DeviceOptions",
 2285                column: "DeviceId",
 2286                unique: true);
 87
 2288            migrationBuilder.CreateIndex(
 2289                name: "IX_Devices_AccessToken_DateLastActivity",
 2290                schema: "jellyfin",
 2291                table: "Devices",
 2292                columns: new[] { "AccessToken", "DateLastActivity" });
 93
 2294            migrationBuilder.CreateIndex(
 2295                name: "IX_Devices_DeviceId",
 2296                schema: "jellyfin",
 2297                table: "Devices",
 2298                column: "DeviceId");
 99
 22100            migrationBuilder.CreateIndex(
 22101                name: "IX_Devices_DeviceId_DateLastActivity",
 22102                schema: "jellyfin",
 22103                table: "Devices",
 22104                columns: new[] { "DeviceId", "DateLastActivity" });
 105
 22106            migrationBuilder.CreateIndex(
 22107                name: "IX_Devices_UserId_DeviceId",
 22108                schema: "jellyfin",
 22109                table: "Devices",
 22110                columns: new[] { "UserId", "DeviceId" });
 22111        }
 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/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs

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