< 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/16/2026 - 12:15:55 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        {
 2714            migrationBuilder.CreateTable(
 2715                name: "MediaSegments",
 2716                columns: table => new
 2717                {
 2718                    Id = table.Column<Guid>(type: "TEXT", nullable: false),
 2719                    ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
 2720                    Type = table.Column<int>(type: "INTEGER", nullable: false),
 2721                    EndTicks = table.Column<long>(type: "INTEGER", nullable: false),
 2722                    StartTicks = table.Column<long>(type: "INTEGER", nullable: false),
 2723                    SegmentProviderId = table.Column<string>(type: "TEXT", nullable: false),
 2724                },
 2725                constraints: table =>
 2726                {
 2727                    table.PrimaryKey("PK_MediaSegments", x => x.Id);
 2728                });
 2729        }
 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
 2721            modelBuilder.HasAnnotation("ProductVersion", "8.0.7");
 22
 2723            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2724                {
 2725                    b.Property<int>("Id")
 2726                        .ValueGeneratedOnAdd()
 2727                        .HasColumnType("INTEGER");
 2728
 2729                    b.Property<int>("DayOfWeek")
 2730                        .HasColumnType("INTEGER");
 2731
 2732                    b.Property<double>("EndHour")
 2733                        .HasColumnType("REAL");
 2734
 2735                    b.Property<double>("StartHour")
 2736                        .HasColumnType("REAL");
 2737
 2738                    b.Property<Guid>("UserId")
 2739                        .HasColumnType("TEXT");
 2740
 2741                    b.HasKey("Id");
 2742
 2743                    b.HasIndex("UserId");
 2744
 2745                    b.ToTable("AccessSchedules");
 2746                });
 47
 2748            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2749                {
 2750                    b.Property<int>("Id")
 2751                        .ValueGeneratedOnAdd()
 2752                        .HasColumnType("INTEGER");
 2753
 2754                    b.Property<DateTime>("DateCreated")
 2755                        .HasColumnType("TEXT");
 2756
 2757                    b.Property<string>("ItemId")
 2758                        .HasMaxLength(256)
 2759                        .HasColumnType("TEXT");
 2760
 2761                    b.Property<int>("LogSeverity")
 2762                        .HasColumnType("INTEGER");
 2763
 2764                    b.Property<string>("Name")
 2765                        .IsRequired()
 2766                        .HasMaxLength(512)
 2767                        .HasColumnType("TEXT");
 2768
 2769                    b.Property<string>("Overview")
 2770                        .HasMaxLength(512)
 2771                        .HasColumnType("TEXT");
 2772
 2773                    b.Property<uint>("RowVersion")
 2774                        .IsConcurrencyToken()
 2775                        .HasColumnType("INTEGER");
 2776
 2777                    b.Property<string>("ShortOverview")
 2778                        .HasMaxLength(512)
 2779                        .HasColumnType("TEXT");
 2780
 2781                    b.Property<string>("Type")
 2782                        .IsRequired()
 2783                        .HasMaxLength(256)
 2784                        .HasColumnType("TEXT");
 2785
 2786                    b.Property<Guid>("UserId")
 2787                        .HasColumnType("TEXT");
 2788
 2789                    b.HasKey("Id");
 2790
 2791                    b.HasIndex("DateCreated");
 2792
 2793                    b.ToTable("ActivityLogs");
 2794                });
 95
 2796            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 2797                {
 2798                    b.Property<int>("Id")
 2799                        .ValueGeneratedOnAdd()
 27100                        .HasColumnType("INTEGER");
 27101
 27102                    b.Property<string>("Client")
 27103                        .IsRequired()
 27104                        .HasMaxLength(32)
 27105                        .HasColumnType("TEXT");
 27106
 27107                    b.Property<Guid>("ItemId")
 27108                        .HasColumnType("TEXT");
 27109
 27110                    b.Property<string>("Key")
 27111                        .IsRequired()
 27112                        .HasColumnType("TEXT");
 27113
 27114                    b.Property<Guid>("UserId")
 27115                        .HasColumnType("TEXT");
 27116
 27117                    b.Property<string>("Value")
 27118                        .HasColumnType("TEXT");
 27119
 27120                    b.HasKey("Id");
 27121
 27122                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 27123                        .IsUnique();
 27124
 27125                    b.ToTable("CustomItemDisplayPreferences");
 27126                });
 127
 27128            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27129                {
 27130                    b.Property<int>("Id")
 27131                        .ValueGeneratedOnAdd()
 27132                        .HasColumnType("INTEGER");
 27133
 27134                    b.Property<int>("ChromecastVersion")
 27135                        .HasColumnType("INTEGER");
 27136
 27137                    b.Property<string>("Client")
 27138                        .IsRequired()
 27139                        .HasMaxLength(32)
 27140                        .HasColumnType("TEXT");
 27141
 27142                    b.Property<string>("DashboardTheme")
 27143                        .HasMaxLength(32)
 27144                        .HasColumnType("TEXT");
 27145
 27146                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27147                        .HasColumnType("INTEGER");
 27148
 27149                    b.Property<int?>("IndexBy")
 27150                        .HasColumnType("INTEGER");
 27151
 27152                    b.Property<Guid>("ItemId")
 27153                        .HasColumnType("TEXT");
 27154
 27155                    b.Property<int>("ScrollDirection")
 27156                        .HasColumnType("INTEGER");
 27157
 27158                    b.Property<bool>("ShowBackdrop")
 27159                        .HasColumnType("INTEGER");
 27160
 27161                    b.Property<bool>("ShowSidebar")
 27162                        .HasColumnType("INTEGER");
 27163
 27164                    b.Property<int>("SkipBackwardLength")
 27165                        .HasColumnType("INTEGER");
 27166
 27167                    b.Property<int>("SkipForwardLength")
 27168                        .HasColumnType("INTEGER");
 27169
 27170                    b.Property<string>("TvHome")
 27171                        .HasMaxLength(32)
 27172                        .HasColumnType("TEXT");
 27173
 27174                    b.Property<Guid>("UserId")
 27175                        .HasColumnType("TEXT");
 27176
 27177                    b.HasKey("Id");
 27178
 27179                    b.HasIndex("UserId", "ItemId", "Client")
 27180                        .IsUnique();
 27181
 27182                    b.ToTable("DisplayPreferences");
 27183                });
 184
 27185            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27186                {
 27187                    b.Property<int>("Id")
 27188                        .ValueGeneratedOnAdd()
 27189                        .HasColumnType("INTEGER");
 27190
 27191                    b.Property<int>("DisplayPreferencesId")
 27192                        .HasColumnType("INTEGER");
 27193
 27194                    b.Property<int>("Order")
 27195                        .HasColumnType("INTEGER");
 27196
 27197                    b.Property<int>("Type")
 27198                        .HasColumnType("INTEGER");
 27199
 27200                    b.HasKey("Id");
 27201
 27202                    b.HasIndex("DisplayPreferencesId");
 27203
 27204                    b.ToTable("HomeSection");
 27205                });
 206
 27207            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27208                {
 27209                    b.Property<int>("Id")
 27210                        .ValueGeneratedOnAdd()
 27211                        .HasColumnType("INTEGER");
 27212
 27213                    b.Property<DateTime>("LastModified")
 27214                        .HasColumnType("TEXT");
 27215
 27216                    b.Property<string>("Path")
 27217                        .IsRequired()
 27218                        .HasMaxLength(512)
 27219                        .HasColumnType("TEXT");
 27220
 27221                    b.Property<Guid?>("UserId")
 27222                        .HasColumnType("TEXT");
 27223
 27224                    b.HasKey("Id");
 27225
 27226                    b.HasIndex("UserId")
 27227                        .IsUnique();
 27228
 27229                    b.ToTable("ImageInfos");
 27230                });
 231
 27232            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27233                {
 27234                    b.Property<int>("Id")
 27235                        .ValueGeneratedOnAdd()
 27236                        .HasColumnType("INTEGER");
 27237
 27238                    b.Property<string>("Client")
 27239                        .IsRequired()
 27240                        .HasMaxLength(32)
 27241                        .HasColumnType("TEXT");
 27242
 27243                    b.Property<int?>("IndexBy")
 27244                        .HasColumnType("INTEGER");
 27245
 27246                    b.Property<Guid>("ItemId")
 27247                        .HasColumnType("TEXT");
 27248
 27249                    b.Property<bool>("RememberIndexing")
 27250                        .HasColumnType("INTEGER");
 27251
 27252                    b.Property<bool>("RememberSorting")
 27253                        .HasColumnType("INTEGER");
 27254
 27255                    b.Property<string>("SortBy")
 27256                        .IsRequired()
 27257                        .HasMaxLength(64)
 27258                        .HasColumnType("TEXT");
 27259
 27260                    b.Property<int>("SortOrder")
 27261                        .HasColumnType("INTEGER");
 27262
 27263                    b.Property<Guid>("UserId")
 27264                        .HasColumnType("TEXT");
 27265
 27266                    b.Property<int>("ViewType")
 27267                        .HasColumnType("INTEGER");
 27268
 27269                    b.HasKey("Id");
 27270
 27271                    b.HasIndex("UserId");
 27272
 27273                    b.ToTable("ItemDisplayPreferences");
 27274                });
 275
 27276            modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
 27277                {
 27278                    b.Property<Guid>("Id")
 27279                        .ValueGeneratedOnAdd()
 27280                        .HasColumnType("TEXT");
 27281
 27282                    b.Property<long>("EndTicks")
 27283                        .HasColumnType("INTEGER");
 27284
 27285                    b.Property<Guid>("ItemId")
 27286                        .HasColumnType("TEXT");
 27287
 27288                    b.Property<string>("SegmentProviderId")
 27289                        .HasColumnType("TEXT");
 27290
 27291                    b.Property<long>("StartTicks")
 27292                        .HasColumnType("INTEGER");
 27293
 27294                    b.Property<int>("Type")
 27295                        .HasColumnType("INTEGER");
 27296
 27297                    b.HasKey("Id");
 27298
 27299                    b.ToTable("MediaSegments");
 27300                });
 301
 27302            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27303                {
 27304                    b.Property<int>("Id")
 27305                        .ValueGeneratedOnAdd()
 27306                        .HasColumnType("INTEGER");
 27307
 27308                    b.Property<int>("Kind")
 27309                        .HasColumnType("INTEGER");
 27310
 27311                    b.Property<Guid?>("Permission_Permissions_Guid")
 27312                        .HasColumnType("TEXT");
 27313
 27314                    b.Property<uint>("RowVersion")
 27315                        .IsConcurrencyToken()
 27316                        .HasColumnType("INTEGER");
 27317
 27318                    b.Property<Guid?>("UserId")
 27319                        .HasColumnType("TEXT");
 27320
 27321                    b.Property<bool>("Value")
 27322                        .HasColumnType("INTEGER");
 27323
 27324                    b.HasKey("Id");
 27325
 27326                    b.HasIndex("UserId", "Kind")
 27327                        .IsUnique()
 27328                        .HasFilter("[UserId] IS NOT NULL");
 27329
 27330                    b.ToTable("Permissions");
 27331                });
 332
 27333            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27334                {
 27335                    b.Property<int>("Id")
 27336                        .ValueGeneratedOnAdd()
 27337                        .HasColumnType("INTEGER");
 27338
 27339                    b.Property<int>("Kind")
 27340                        .HasColumnType("INTEGER");
 27341
 27342                    b.Property<Guid?>("Preference_Preferences_Guid")
 27343                        .HasColumnType("TEXT");
 27344
 27345                    b.Property<uint>("RowVersion")
 27346                        .IsConcurrencyToken()
 27347                        .HasColumnType("INTEGER");
 27348
 27349                    b.Property<Guid?>("UserId")
 27350                        .HasColumnType("TEXT");
 27351
 27352                    b.Property<string>("Value")
 27353                        .IsRequired()
 27354                        .HasMaxLength(65535)
 27355                        .HasColumnType("TEXT");
 27356
 27357                    b.HasKey("Id");
 27358
 27359                    b.HasIndex("UserId", "Kind")
 27360                        .IsUnique()
 27361                        .HasFilter("[UserId] IS NOT NULL");
 27362
 27363                    b.ToTable("Preferences");
 27364                });
 365
 27366            modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
 27367                {
 27368                    b.Property<int>("Id")
 27369                        .ValueGeneratedOnAdd()
 27370                        .HasColumnType("INTEGER");
 27371
 27372                    b.Property<string>("AccessToken")
 27373                        .IsRequired()
 27374                        .HasColumnType("TEXT");
 27375
 27376                    b.Property<DateTime>("DateCreated")
 27377                        .HasColumnType("TEXT");
 27378
 27379                    b.Property<DateTime>("DateLastActivity")
 27380                        .HasColumnType("TEXT");
 27381
 27382                    b.Property<string>("Name")
 27383                        .IsRequired()
 27384                        .HasMaxLength(64)
 27385                        .HasColumnType("TEXT");
 27386
 27387                    b.HasKey("Id");
 27388
 27389                    b.HasIndex("AccessToken")
 27390                        .IsUnique();
 27391
 27392                    b.ToTable("ApiKeys");
 27393                });
 394
 27395            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 27396                {
 27397                    b.Property<int>("Id")
 27398                        .ValueGeneratedOnAdd()
 27399                        .HasColumnType("INTEGER");
 27400
 27401                    b.Property<string>("AccessToken")
 27402                        .IsRequired()
 27403                        .HasColumnType("TEXT");
 27404
 27405                    b.Property<string>("AppName")
 27406                        .IsRequired()
 27407                        .HasMaxLength(64)
 27408                        .HasColumnType("TEXT");
 27409
 27410                    b.Property<string>("AppVersion")
 27411                        .IsRequired()
 27412                        .HasMaxLength(32)
 27413                        .HasColumnType("TEXT");
 27414
 27415                    b.Property<DateTime>("DateCreated")
 27416                        .HasColumnType("TEXT");
 27417
 27418                    b.Property<DateTime>("DateLastActivity")
 27419                        .HasColumnType("TEXT");
 27420
 27421                    b.Property<DateTime>("DateModified")
 27422                        .HasColumnType("TEXT");
 27423
 27424                    b.Property<string>("DeviceId")
 27425                        .IsRequired()
 27426                        .HasMaxLength(256)
 27427                        .HasColumnType("TEXT");
 27428
 27429                    b.Property<string>("DeviceName")
 27430                        .IsRequired()
 27431                        .HasMaxLength(64)
 27432                        .HasColumnType("TEXT");
 27433
 27434                    b.Property<bool>("IsActive")
 27435                        .HasColumnType("INTEGER");
 27436
 27437                    b.Property<Guid>("UserId")
 27438                        .HasColumnType("TEXT");
 27439
 27440                    b.HasKey("Id");
 27441
 27442                    b.HasIndex("DeviceId");
 27443
 27444                    b.HasIndex("AccessToken", "DateLastActivity");
 27445
 27446                    b.HasIndex("DeviceId", "DateLastActivity");
 27447
 27448                    b.HasIndex("UserId", "DeviceId");
 27449
 27450                    b.ToTable("Devices");
 27451                });
 452
 27453            modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
 27454                {
 27455                    b.Property<int>("Id")
 27456                        .ValueGeneratedOnAdd()
 27457                        .HasColumnType("INTEGER");
 27458
 27459                    b.Property<string>("CustomName")
 27460                        .HasColumnType("TEXT");
 27461
 27462                    b.Property<string>("DeviceId")
 27463                        .IsRequired()
 27464                        .HasColumnType("TEXT");
 27465
 27466                    b.HasKey("Id");
 27467
 27468                    b.HasIndex("DeviceId")
 27469                        .IsUnique();
 27470
 27471                    b.ToTable("DeviceOptions");
 27472                });
 473
 27474            modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
 27475                {
 27476                    b.Property<Guid>("ItemId")
 27477                        .HasColumnType("TEXT");
 27478
 27479                    b.Property<int>("Width")
 27480                        .HasColumnType("INTEGER");
 27481
 27482                    b.Property<int>("Bandwidth")
 27483                        .HasColumnType("INTEGER");
 27484
 27485                    b.Property<int>("Height")
 27486                        .HasColumnType("INTEGER");
 27487
 27488                    b.Property<int>("Interval")
 27489                        .HasColumnType("INTEGER");
 27490
 27491                    b.Property<int>("ThumbnailCount")
 27492                        .HasColumnType("INTEGER");
 27493
 27494                    b.Property<int>("TileHeight")
 27495                        .HasColumnType("INTEGER");
 27496
 27497                    b.Property<int>("TileWidth")
 27498                        .HasColumnType("INTEGER");
 27499
 27500                    b.HasKey("ItemId", "Width");
 27501
 27502                    b.ToTable("TrickplayInfos");
 27503                });
 504
 27505            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27506                {
 27507                    b.Property<Guid>("Id")
 27508                        .ValueGeneratedOnAdd()
 27509                        .HasColumnType("TEXT");
 27510
 27511                    b.Property<string>("AudioLanguagePreference")
 27512                        .HasMaxLength(255)
 27513                        .HasColumnType("TEXT");
 27514
 27515                    b.Property<string>("AuthenticationProviderId")
 27516                        .IsRequired()
 27517                        .HasMaxLength(255)
 27518                        .HasColumnType("TEXT");
 27519
 27520                    b.Property<string>("CastReceiverId")
 27521                        .HasMaxLength(32)
 27522                        .HasColumnType("TEXT");
 27523
 27524                    b.Property<bool>("DisplayCollectionsView")
 27525                        .HasColumnType("INTEGER");
 27526
 27527                    b.Property<bool>("DisplayMissingEpisodes")
 27528                        .HasColumnType("INTEGER");
 27529
 27530                    b.Property<bool>("EnableAutoLogin")
 27531                        .HasColumnType("INTEGER");
 27532
 27533                    b.Property<bool>("EnableLocalPassword")
 27534                        .HasColumnType("INTEGER");
 27535
 27536                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 27537                        .HasColumnType("INTEGER");
 27538
 27539                    b.Property<bool>("EnableUserPreferenceAccess")
 27540                        .HasColumnType("INTEGER");
 27541
 27542                    b.Property<bool>("HidePlayedInLatest")
 27543                        .HasColumnType("INTEGER");
 27544
 27545                    b.Property<long>("InternalId")
 27546                        .HasColumnType("INTEGER");
 27547
 27548                    b.Property<int>("InvalidLoginAttemptCount")
 27549                        .HasColumnType("INTEGER");
 27550
 27551                    b.Property<DateTime?>("LastActivityDate")
 27552                        .HasColumnType("TEXT");
 27553
 27554                    b.Property<DateTime?>("LastLoginDate")
 27555                        .HasColumnType("TEXT");
 27556
 27557                    b.Property<int?>("LoginAttemptsBeforeLockout")
 27558                        .HasColumnType("INTEGER");
 27559
 27560                    b.Property<int>("MaxActiveSessions")
 27561                        .HasColumnType("INTEGER");
 27562
 27563                    b.Property<int?>("MaxParentalAgeRating")
 27564                        .HasColumnType("INTEGER");
 27565
 27566                    b.Property<bool>("MustUpdatePassword")
 27567                        .HasColumnType("INTEGER");
 27568
 27569                    b.Property<string>("Password")
 27570                        .HasMaxLength(65535)
 27571                        .HasColumnType("TEXT");
 27572
 27573                    b.Property<string>("PasswordResetProviderId")
 27574                        .IsRequired()
 27575                        .HasMaxLength(255)
 27576                        .HasColumnType("TEXT");
 27577
 27578                    b.Property<bool>("PlayDefaultAudioTrack")
 27579                        .HasColumnType("INTEGER");
 27580
 27581                    b.Property<bool>("RememberAudioSelections")
 27582                        .HasColumnType("INTEGER");
 27583
 27584                    b.Property<bool>("RememberSubtitleSelections")
 27585                        .HasColumnType("INTEGER");
 27586
 27587                    b.Property<int?>("RemoteClientBitrateLimit")
 27588                        .HasColumnType("INTEGER");
 27589
 27590                    b.Property<uint>("RowVersion")
 27591                        .IsConcurrencyToken()
 27592                        .HasColumnType("INTEGER");
 27593
 27594                    b.Property<string>("SubtitleLanguagePreference")
 27595                        .HasMaxLength(255)
 27596                        .HasColumnType("TEXT");
 27597
 27598                    b.Property<int>("SubtitleMode")
 27599                        .HasColumnType("INTEGER");
 27600
 27601                    b.Property<int>("SyncPlayAccess")
 27602                        .HasColumnType("INTEGER");
 27603
 27604                    b.Property<string>("Username")
 27605                        .IsRequired()
 27606                        .HasMaxLength(255)
 27607                        .HasColumnType("TEXT")
 27608                        .UseCollation("NOCASE");
 27609
 27610                    b.HasKey("Id");
 27611
 27612                    b.HasIndex("Username")
 27613                        .IsUnique();
 27614
 27615                    b.ToTable("Users");
 27616                });
 617
 27618            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 27619                {
 27620                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27621                        .WithMany("AccessSchedules")
 27622                        .HasForeignKey("UserId")
 27623                        .OnDelete(DeleteBehavior.Cascade)
 27624                        .IsRequired();
 27625                });
 626
 27627            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27628                {
 27629                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27630                        .WithMany("DisplayPreferences")
 27631                        .HasForeignKey("UserId")
 27632                        .OnDelete(DeleteBehavior.Cascade)
 27633                        .IsRequired();
 27634                });
 635
 27636            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27637                {
 27638                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 27639                        .WithMany("HomeSections")
 27640                        .HasForeignKey("DisplayPreferencesId")
 27641                        .OnDelete(DeleteBehavior.Cascade)
 27642                        .IsRequired();
 27643                });
 644
 27645            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27646                {
 27647                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27648                        .WithOne("ProfileImage")
 27649                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 27650                        .OnDelete(DeleteBehavior.Cascade);
 27651                });
 652
 27653            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27654                {
 27655                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27656                        .WithMany("ItemDisplayPreferences")
 27657                        .HasForeignKey("UserId")
 27658                        .OnDelete(DeleteBehavior.Cascade)
 27659                        .IsRequired();
 27660                });
 661
 27662            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27663                {
 27664                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27665                        .WithMany("Permissions")
 27666                        .HasForeignKey("UserId")
 27667                        .OnDelete(DeleteBehavior.Cascade);
 27668                });
 669
 27670            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27671                {
 27672                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27673                        .WithMany("Preferences")
 27674                        .HasForeignKey("UserId")
 27675                        .OnDelete(DeleteBehavior.Cascade);
 27676                });
 677
 27678            modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
 27679                {
 27680                    b.HasOne("Jellyfin.Data.Entities.User", "User")
 27681                        .WithMany()
 27682                        .HasForeignKey("UserId")
 27683                        .OnDelete(DeleteBehavior.Cascade)
 27684                        .IsRequired();
 27685
 27686                    b.Navigation("User");
 27687                });
 688
 27689            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27690                {
 27691                    b.Navigation("HomeSections");
 27692                });
 693
 27694            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27695                {
 27696                    b.Navigation("AccessSchedules");
 27697
 27698                    b.Navigation("DisplayPreferences");
 27699
 27700                    b.Navigation("ItemDisplayPreferences");
 27701
 27702                    b.Navigation("Permissions");
 27703
 27704                    b.Navigation("Preferences");
 27705
 27706                    b.Navigation("ProfileImage");
 27707                });
 708#pragma warning restore 612, 618
 27709        }
 710    }
 711}