< Summary - Jellyfin

Line coverage
99%
Covered lines: 679
Uncovered lines: 3
Coverable lines: 682
Total lines: 749
Line coverage: 99.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/6/2026 - 12:15:23 AM Line coverage: 99.5% (676/679) Total lines: 7468/11/2026 - 12:17:00 AM Line coverage: 99.5% (679/682) Total lines: 749

Coverage delta

Coverage delta 1 -1

Metrics

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

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    /// <inheritdoc />
 9    public partial class AddMediaSegments : Migration
 10    {
 11        /// <inheritdoc />
 12        protected override void Up(MigrationBuilder migrationBuilder)
 13        {
 2214            migrationBuilder.CreateTable(
 2215                name: "MediaSegments",
 2216                columns: table => new
 2217                {
 2218                    Id = table.Column<Guid>(type: "TEXT", nullable: false),
 2219                    ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
 2220                    Type = table.Column<int>(type: "INTEGER", nullable: false),
 2221                    EndTicks = table.Column<long>(type: "INTEGER", nullable: false),
 2222                    StartTicks = table.Column<long>(type: "INTEGER", nullable: false),
 2223                    SegmentProviderId = table.Column<string>(type: "TEXT", nullable: false),
 2224                },
 2225                constraints: table =>
 2226                {
 2227                    table.PrimaryKey("PK_MediaSegments", x => x.Id);
 2228                });
 2229        }
 30
 31        /// <inheritdoc />
 32        protected override void Down(MigrationBuilder migrationBuilder)
 33        {
 034            migrationBuilder.DropTable(
 035                name: "MediaSegments");
 036        }
 37    }
 38}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Jellyfin.Server.Implementations.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20240729140605_AddMediaSegments")]
 15    partial class AddMediaSegments
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 2221            modelBuilder.HasAnnotation("ProductVersion", "8.0.7");
 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.MediaSegment", b =>
 22277                {
 22278                    b.Property<Guid>("Id")
 22279                        .ValueGeneratedOnAdd()
 22280                        .HasColumnType("TEXT");
 22281
 22282                    b.Property<long>("EndTicks")
 22283                        .HasColumnType("INTEGER");
 22284
 22285                    b.Property<Guid>("ItemId")
 22286                        .HasColumnType("TEXT");
 22287
 22288                    b.Property<string>("SegmentProviderId")
 22289                        .HasColumnType("TEXT");
 22290
 22291                    b.Property<long>("StartTicks")
 22292                        .HasColumnType("INTEGER");
 22293
 22294                    b.Property<int>("Type")
 22295                        .HasColumnType("INTEGER");
 22296
 22297                    b.HasKey("Id");
 22298
 22299                    b.ToTable("MediaSegments");
 22300                });
 301
 22302            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22303                {
 22304                    b.Property<int>("Id")
 22305                        .ValueGeneratedOnAdd()
 22306                        .HasColumnType("INTEGER");
 22307
 22308                    b.Property<int>("Kind")
 22309                        .HasColumnType("INTEGER");
 22310
 22311                    b.Property<Guid?>("Permission_Permissions_Guid")
 22312                        .HasColumnType("TEXT");
 22313
 22314                    b.Property<uint>("RowVersion")
 22315                        .IsConcurrencyToken()
 22316                        .HasColumnType("INTEGER");
 22317
 22318                    b.Property<Guid?>("UserId")
 22319                        .HasColumnType("TEXT");
 22320
 22321                    b.Property<bool>("Value")
 22322                        .HasColumnType("INTEGER");
 22323
 22324                    b.HasKey("Id");
 22325
 22326                    b.HasIndex("UserId", "Kind")
 22327                        .IsUnique()
 22328                        .HasFilter("[UserId] IS NOT NULL");
 22329
 22330                    b.ToTable("Permissions");
 22331                });
 332
 22333            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22334                {
 22335                    b.Property<int>("Id")
 22336                        .ValueGeneratedOnAdd()
 22337                        .HasColumnType("INTEGER");
 22338
 22339                    b.Property<int>("Kind")
 22340                        .HasColumnType("INTEGER");
 22341
 22342                    b.Property<Guid?>("Preference_Preferences_Guid")
 22343                        .HasColumnType("TEXT");
 22344
 22345                    b.Property<uint>("RowVersion")
 22346                        .IsConcurrencyToken()
 22347                        .HasColumnType("INTEGER");
 22348
 22349                    b.Property<Guid?>("UserId")
 22350                        .HasColumnType("TEXT");
 22351
 22352                    b.Property<string>("Value")
 22353                        .IsRequired()
 22354                        .HasMaxLength(65535)
 22355                        .HasColumnType("TEXT");
 22356
 22357                    b.HasKey("Id");
 22358
 22359                    b.HasIndex("UserId", "Kind")
 22360                        .IsUnique()
 22361                        .HasFilter("[UserId] IS NOT NULL");
 22362
 22363                    b.ToTable("Preferences");
 22364                });
 365
 22366            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 22367                {
 22368                    b.Property<int>("Id")
 22369                        .ValueGeneratedOnAdd()
 22370                        .HasColumnType("INTEGER");
 22371
 22372                    b.Property<string>("AccessToken")
 22373                        .IsRequired()
 22374                        .HasColumnType("TEXT");
 22375
 22376                    b.Property<DateTime>("DateCreated")
 22377                        .HasColumnType("TEXT");
 22378
 22379                    b.Property<DateTime>("DateLastActivity")
 22380                        .HasColumnType("TEXT");
 22381
 22382                    b.Property<string>("Name")
 22383                        .IsRequired()
 22384                        .HasMaxLength(64)
 22385                        .HasColumnType("TEXT");
 22386
 22387                    b.HasKey("Id");
 22388
 22389                    b.HasIndex("AccessToken")
 22390                        .IsUnique();
 22391
 22392                    b.ToTable("ApiKeys");
 22393                });
 394
 22395            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 22396                {
 22397                    b.Property<int>("Id")
 22398                        .ValueGeneratedOnAdd()
 22399                        .HasColumnType("INTEGER");
 22400
 22401                    b.Property<string>("AccessToken")
 22402                        .IsRequired()
 22403                        .HasColumnType("TEXT");
 22404
 22405                    b.Property<string>("AppName")
 22406                        .IsRequired()
 22407                        .HasMaxLength(64)
 22408                        .HasColumnType("TEXT");
 22409
 22410                    b.Property<string>("AppVersion")
 22411                        .IsRequired()
 22412                        .HasMaxLength(32)
 22413                        .HasColumnType("TEXT");
 22414
 22415                    b.Property<DateTime>("DateCreated")
 22416                        .HasColumnType("TEXT");
 22417
 22418                    b.Property<DateTime>("DateLastActivity")
 22419                        .HasColumnType("TEXT");
 22420
 22421                    b.Property<DateTime>("DateModified")
 22422                        .HasColumnType("TEXT");
 22423
 22424                    b.Property<string>("DeviceId")
 22425                        .IsRequired()
 22426                        .HasMaxLength(256)
 22427                        .HasColumnType("TEXT");
 22428
 22429                    b.Property<string>("DeviceName")
 22430                        .IsRequired()
 22431                        .HasMaxLength(64)
 22432                        .HasColumnType("TEXT");
 22433
 22434                    b.Property<bool>("IsActive")
 22435                        .HasColumnType("INTEGER");
 22436
 22437                    b.Property<Guid>("UserId")
 22438                        .HasColumnType("TEXT");
 22439
 22440                    b.HasKey("Id");
 22441
 22442                    b.HasIndex("DeviceId");
 22443
 22444                    b.HasIndex("AccessToken", "DateLastActivity");
 22445
 22446                    b.HasIndex("DeviceId", "DateLastActivity");
 22447
 22448                    b.HasIndex("UserId", "DeviceId");
 22449
 22450                    b.ToTable("Devices");
 22451                });
 452
 22453            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 22454                {
 22455                    b.Property<int>("Id")
 22456                        .ValueGeneratedOnAdd()
 22457                        .HasColumnType("INTEGER");
 22458
 22459                    b.Property<string>("CustomName")
 22460                        .HasColumnType("TEXT");
 22461
 22462                    b.Property<string>("DeviceId")
 22463                        .IsRequired()
 22464                        .HasColumnType("TEXT");
 22465
 22466                    b.HasKey("Id");
 22467
 22468                    b.HasIndex("DeviceId")
 22469                        .IsUnique();
 22470
 22471                    b.ToTable("DeviceOptions");
 22472                });
 473
 22474            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 22475                {
 22476                    b.Property<Guid>("ItemId")
 22477                        .HasColumnType("TEXT");
 22478
 22479                    b.Property<int>("Width")
 22480                        .HasColumnType("INTEGER");
 22481
 22482                    b.Property<int>("Bandwidth")
 22483                        .HasColumnType("INTEGER");
 22484
 22485                    b.Property<int>("Height")
 22486                        .HasColumnType("INTEGER");
 22487
 22488                    b.Property<int>("Interval")
 22489                        .HasColumnType("INTEGER");
 22490
 22491                    b.Property<int>("ThumbnailCount")
 22492                        .HasColumnType("INTEGER");
 22493
 22494                    b.Property<int>("TileHeight")
 22495                        .HasColumnType("INTEGER");
 22496
 22497                    b.Property<int>("TileWidth")
 22498                        .HasColumnType("INTEGER");
 22499
 22500                    b.HasKey("ItemId", "Width");
 22501
 22502                    b.ToTable("TrickplayInfos");
 22503                });
 504
 22505            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22506                {
 22507                    b.Property<Guid>("Id")
 22508                        .ValueGeneratedOnAdd()
 22509                        .HasColumnType("TEXT");
 22510
 22511                    b.Property<string>("AudioLanguagePreference")
 22512                        .HasMaxLength(255)
 22513                        .HasColumnType("TEXT");
 22514
 22515                    b.Property<string>("AuthenticationProviderId")
 22516                        .IsRequired()
 22517                        .HasMaxLength(255)
 22518                        .HasColumnType("TEXT");
 22519
 22520                    b.Property<string>("CastReceiverId")
 22521                        .HasMaxLength(32)
 22522                        .HasColumnType("TEXT");
 22523
 22524                    b.Property<bool>("DisplayCollectionsView")
 22525                        .HasColumnType("INTEGER");
 22526
 22527                    b.Property<bool>("DisplayMissingEpisodes")
 22528                        .HasColumnType("INTEGER");
 22529
 22530                    b.Property<bool>("EnableAutoLogin")
 22531                        .HasColumnType("INTEGER");
 22532
 22533                    b.Property<bool>("EnableLocalPassword")
 22534                        .HasColumnType("INTEGER");
 22535
 22536                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 22537                        .HasColumnType("INTEGER");
 22538
 22539                    b.Property<bool>("EnableUserPreferenceAccess")
 22540                        .HasColumnType("INTEGER");
 22541
 22542                    b.Property<bool>("HidePlayedInLatest")
 22543                        .HasColumnType("INTEGER");
 22544
 22545                    b.Property<long>("InternalId")
 22546                        .HasColumnType("INTEGER");
 22547
 22548                    b.Property<int>("InvalidLoginAttemptCount")
 22549                        .HasColumnType("INTEGER");
 22550
 22551                    b.Property<DateTime?>("LastActivityDate")
 22552                        .HasColumnType("TEXT");
 22553
 22554                    b.Property<DateTime?>("LastLoginDate")
 22555                        .HasColumnType("TEXT");
 22556
 22557                    b.Property<int?>("LoginAttemptsBeforeLockout")
 22558                        .HasColumnType("INTEGER");
 22559
 22560                    b.Property<int>("MaxActiveSessions")
 22561                        .HasColumnType("INTEGER");
 22562
 22563                    b.Property<int?>("MaxParentalAgeRating")
 22564                        .HasColumnType("INTEGER");
 22565
 22566                    b.Property<bool>("MustUpdatePassword")
 22567                        .HasColumnType("INTEGER");
 22568
 22569                    b.Property<string>("Password")
 22570                        .HasMaxLength(65535)
 22571                        .HasColumnType("TEXT");
 22572
 22573                    b.Property<string>("PasswordResetProviderId")
 22574                        .IsRequired()
 22575                        .HasMaxLength(255)
 22576                        .HasColumnType("TEXT");
 22577
 22578                    b.Property<bool>("PlayDefaultAudioTrack")
 22579                        .HasColumnType("INTEGER");
 22580
 22581                    b.Property<bool>("RememberAudioSelections")
 22582                        .HasColumnType("INTEGER");
 22583
 22584                    b.Property<bool>("RememberSubtitleSelections")
 22585                        .HasColumnType("INTEGER");
 22586
 22587                    b.Property<int?>("RemoteClientBitrateLimit")
 22588                        .HasColumnType("INTEGER");
 22589
 22590                    b.Property<uint>("RowVersion")
 22591                        .IsConcurrencyToken()
 22592                        .HasColumnType("INTEGER");
 22593
 22594                    b.Property<string>("SubtitleLanguagePreference")
 22595                        .HasMaxLength(255)
 22596                        .HasColumnType("TEXT");
 22597
 22598                    b.Property<int>("SubtitleMode")
 22599                        .HasColumnType("INTEGER");
 22600
 22601                    b.Property<int>("SyncPlayAccess")
 22602                        .HasColumnType("INTEGER");
 22603
 22604                    b.Property<string>("Username")
 22605                        .IsRequired()
 22606                        .HasMaxLength(255)
 22607                        .HasColumnType("TEXT")
 22608                        .UseCollation("NOCASE");
 22609
 22610                    b.HasKey("Id");
 22611
 22612                    b.HasIndex("Username")
 22613                        .IsUnique();
 22614
 22615                    b.ToTable("Users");
 22616                });
 617
 22618            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 22619                {
 22620                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22621                        .WithMany("AccessSchedules")
 22622                        .HasForeignKey("UserId")
 22623                        .OnDelete(DeleteBehavior.Cascade)
 22624                        .IsRequired();
 22625                });
 626
 22627            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22628                {
 22629                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22630                        .WithMany("DisplayPreferences")
 22631                        .HasForeignKey("UserId")
 22632                        .OnDelete(DeleteBehavior.Cascade)
 22633                        .IsRequired();
 22634                });
 635
 22636            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22637                {
 22638                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 22639                        .WithMany("HomeSections")
 22640                        .HasForeignKey("DisplayPreferencesId")
 22641                        .OnDelete(DeleteBehavior.Cascade)
 22642                        .IsRequired();
 22643                });
 644
 22645            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22646                {
 22647                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22648                        .WithOne("ProfileImage")
 22649                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 22650                        .OnDelete(DeleteBehavior.Cascade);
 22651                });
 652
 22653            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22654                {
 22655                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22656                        .WithMany("ItemDisplayPreferences")
 22657                        .HasForeignKey("UserId")
 22658                        .OnDelete(DeleteBehavior.Cascade)
 22659                        .IsRequired();
 22660                });
 661
 22662            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22663                {
 22664                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22665                        .WithMany("Permissions")
 22666                        .HasForeignKey("UserId")
 22667                        .OnDelete(DeleteBehavior.Cascade);
 22668                });
 669
 22670            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22671                {
 22672                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22673                        .WithMany("Preferences")
 22674                        .HasForeignKey("UserId")
 22675                        .OnDelete(DeleteBehavior.Cascade);
 22676                });
 677
 22678            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 22679                {
 22680                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 22681                        .WithMany()
 22682                        .HasForeignKey("UserId")
 22683                        .OnDelete(DeleteBehavior.Cascade)
 22684                        .IsRequired();
 22685
 22686                    b.Navigation("User");
 22687                });
 688
 22689            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22690                {
 22691                    b.Navigation("HomeSections");
 22692                });
 693
 22694            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22695                {
 22696                    b.Navigation("AccessSchedules");
 22697
 22698                    b.Navigation("DisplayPreferences");
 22699
 22700                    b.Navigation("ItemDisplayPreferences");
 22701
 22702                    b.Navigation("Permissions");
 22703
 22704                    b.Navigation("Preferences");
 22705
 22706                    b.Navigation("ProfileImage");
 22707                });
 708#pragma warning restore 612, 618
 22709        }
 710    }
 711}