< Summary - Jellyfin

Line coverage
97%
Covered lines: 489
Uncovered lines: 11
Coverable lines: 500
Total lines: 555
Line coverage: 97.8%
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/20210407110544_NullableCustomPrefValue.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2// <auto-generated />
 3using Microsoft.EntityFrameworkCore.Migrations;
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    public partial class NullableCustomPrefValue : Migration
 8    {
 9        protected override void Up(MigrationBuilder migrationBuilder)
 10        {
 2211            migrationBuilder.AlterColumn<string>(
 2212                name: "Value",
 2213                schema: "jellyfin",
 2214                table: "CustomItemDisplayPreferences",
 2215                type: "TEXT",
 2216                nullable: true,
 2217                oldClrType: typeof(string),
 2218                oldType: "TEXT");
 2219        }
 20
 21        protected override void Down(MigrationBuilder migrationBuilder)
 22        {
 023            migrationBuilder.AlterColumn<string>(
 024                name: "Value",
 025                schema: "jellyfin",
 026                table: "CustomItemDisplayPreferences",
 027                type: "TEXT",
 028                nullable: false,
 029                defaultValue: "",
 030                oldClrType: typeof(string),
 031                oldType: "TEXT",
 032                oldNullable: true);
 033        }
 34    }
 35}

/srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2// <auto-generated />
 3using System;
 4using Jellyfin.Server.Implementations;
 5using Microsoft.EntityFrameworkCore;
 6using Microsoft.EntityFrameworkCore.Infrastructure;
 7using Microsoft.EntityFrameworkCore.Migrations;
 8using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 9
 10namespace Jellyfin.Server.Implementations.Migrations
 11{
 12    [DbContext(typeof(JellyfinDbContext))]
 13    [Migration("20210407110544_NullableCustomPrefValue")]
 14    partial class NullableCustomPrefValue
 15    {
 16        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 17        {
 18#pragma warning disable 612, 618
 2219            modelBuilder
 2220                .HasDefaultSchema("jellyfin")
 2221                .HasAnnotation("ProductVersion", "5.0.3");
 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.ToTable("ActivityLogs");
 2292                });
 93
 2294            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 2295                {
 2296                    b.Property<int>("Id")
 2297                        .ValueGeneratedOnAdd()
 2298                        .HasColumnType("INTEGER");
 2299
 22100                    b.Property<string>("Client")
 22101                        .IsRequired()
 22102                        .HasMaxLength(32)
 22103                        .HasColumnType("TEXT");
 22104
 22105                    b.Property<Guid>("ItemId")
 22106                        .HasColumnType("TEXT");
 22107
 22108                    b.Property<string>("Key")
 22109                        .IsRequired()
 22110                        .HasColumnType("TEXT");
 22111
 22112                    b.Property<Guid>("UserId")
 22113                        .HasColumnType("TEXT");
 22114
 22115                    b.Property<string>("Value")
 22116                        .HasColumnType("TEXT");
 22117
 22118                    b.HasKey("Id");
 22119
 22120                    b.HasIndex("UserId");
 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");
 22180
 22181                    b.HasIndex("UserId", "ItemId", "Client")
 22182                        .IsUnique();
 22183
 22184                    b.ToTable("DisplayPreferences");
 22185                });
 186
 22187            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22188                {
 22189                    b.Property<int>("Id")
 22190                        .ValueGeneratedOnAdd()
 22191                        .HasColumnType("INTEGER");
 22192
 22193                    b.Property<int>("DisplayPreferencesId")
 22194                        .HasColumnType("INTEGER");
 22195
 22196                    b.Property<int>("Order")
 22197                        .HasColumnType("INTEGER");
 22198
 22199                    b.Property<int>("Type")
 22200                        .HasColumnType("INTEGER");
 22201
 22202                    b.HasKey("Id");
 22203
 22204                    b.HasIndex("DisplayPreferencesId");
 22205
 22206                    b.ToTable("HomeSection");
 22207                });
 208
 22209            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22210                {
 22211                    b.Property<int>("Id")
 22212                        .ValueGeneratedOnAdd()
 22213                        .HasColumnType("INTEGER");
 22214
 22215                    b.Property<DateTime>("LastModified")
 22216                        .HasColumnType("TEXT");
 22217
 22218                    b.Property<string>("Path")
 22219                        .IsRequired()
 22220                        .HasMaxLength(512)
 22221                        .HasColumnType("TEXT");
 22222
 22223                    b.Property<Guid?>("UserId")
 22224                        .HasColumnType("TEXT");
 22225
 22226                    b.HasKey("Id");
 22227
 22228                    b.HasIndex("UserId")
 22229                        .IsUnique();
 22230
 22231                    b.ToTable("ImageInfos");
 22232                });
 233
 22234            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22235                {
 22236                    b.Property<int>("Id")
 22237                        .ValueGeneratedOnAdd()
 22238                        .HasColumnType("INTEGER");
 22239
 22240                    b.Property<string>("Client")
 22241                        .IsRequired()
 22242                        .HasMaxLength(32)
 22243                        .HasColumnType("TEXT");
 22244
 22245                    b.Property<int?>("IndexBy")
 22246                        .HasColumnType("INTEGER");
 22247
 22248                    b.Property<Guid>("ItemId")
 22249                        .HasColumnType("TEXT");
 22250
 22251                    b.Property<bool>("RememberIndexing")
 22252                        .HasColumnType("INTEGER");
 22253
 22254                    b.Property<bool>("RememberSorting")
 22255                        .HasColumnType("INTEGER");
 22256
 22257                    b.Property<string>("SortBy")
 22258                        .IsRequired()
 22259                        .HasMaxLength(64)
 22260                        .HasColumnType("TEXT");
 22261
 22262                    b.Property<int>("SortOrder")
 22263                        .HasColumnType("INTEGER");
 22264
 22265                    b.Property<Guid>("UserId")
 22266                        .HasColumnType("TEXT");
 22267
 22268                    b.Property<int>("ViewType")
 22269                        .HasColumnType("INTEGER");
 22270
 22271                    b.HasKey("Id");
 22272
 22273                    b.HasIndex("UserId");
 22274
 22275                    b.ToTable("ItemDisplayPreferences");
 22276                });
 277
 22278            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22279                {
 22280                    b.Property<int>("Id")
 22281                        .ValueGeneratedOnAdd()
 22282                        .HasColumnType("INTEGER");
 22283
 22284                    b.Property<int>("Kind")
 22285                        .HasColumnType("INTEGER");
 22286
 22287                    b.Property<Guid?>("Permission_Permissions_Guid")
 22288                        .HasColumnType("TEXT");
 22289
 22290                    b.Property<uint>("RowVersion")
 22291                        .IsConcurrencyToken()
 22292                        .HasColumnType("INTEGER");
 22293
 22294                    b.Property<bool>("Value")
 22295                        .HasColumnType("INTEGER");
 22296
 22297                    b.HasKey("Id");
 22298
 22299                    b.HasIndex("Permission_Permissions_Guid");
 22300
 22301                    b.ToTable("Permissions");
 22302                });
 303
 22304            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22305                {
 22306                    b.Property<int>("Id")
 22307                        .ValueGeneratedOnAdd()
 22308                        .HasColumnType("INTEGER");
 22309
 22310                    b.Property<int>("Kind")
 22311                        .HasColumnType("INTEGER");
 22312
 22313                    b.Property<Guid?>("Preference_Preferences_Guid")
 22314                        .HasColumnType("TEXT");
 22315
 22316                    b.Property<uint>("RowVersion")
 22317                        .IsConcurrencyToken()
 22318                        .HasColumnType("INTEGER");
 22319
 22320                    b.Property<string>("Value")
 22321                        .IsRequired()
 22322                        .HasMaxLength(65535)
 22323                        .HasColumnType("TEXT");
 22324
 22325                    b.HasKey("Id");
 22326
 22327                    b.HasIndex("Preference_Preferences_Guid");
 22328
 22329                    b.ToTable("Preferences");
 22330                });
 331
 22332            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22333                {
 22334                    b.Property<Guid>("Id")
 22335                        .ValueGeneratedOnAdd()
 22336                        .HasColumnType("TEXT");
 22337
 22338                    b.Property<string>("AudioLanguagePreference")
 22339                        .HasMaxLength(255)
 22340                        .HasColumnType("TEXT");
 22341
 22342                    b.Property<string>("AuthenticationProviderId")
 22343                        .IsRequired()
 22344                        .HasMaxLength(255)
 22345                        .HasColumnType("TEXT");
 22346
 22347                    b.Property<bool>("DisplayCollectionsView")
 22348                        .HasColumnType("INTEGER");
 22349
 22350                    b.Property<bool>("DisplayMissingEpisodes")
 22351                        .HasColumnType("INTEGER");
 22352
 22353                    b.Property<string>("EasyPassword")
 22354                        .HasMaxLength(65535)
 22355                        .HasColumnType("TEXT");
 22356
 22357                    b.Property<bool>("EnableAutoLogin")
 22358                        .HasColumnType("INTEGER");
 22359
 22360                    b.Property<bool>("EnableLocalPassword")
 22361                        .HasColumnType("INTEGER");
 22362
 22363                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 22364                        .HasColumnType("INTEGER");
 22365
 22366                    b.Property<bool>("EnableUserPreferenceAccess")
 22367                        .HasColumnType("INTEGER");
 22368
 22369                    b.Property<bool>("HidePlayedInLatest")
 22370                        .HasColumnType("INTEGER");
 22371
 22372                    b.Property<long>("InternalId")
 22373                        .HasColumnType("INTEGER");
 22374
 22375                    b.Property<int>("InvalidLoginAttemptCount")
 22376                        .HasColumnType("INTEGER");
 22377
 22378                    b.Property<DateTime?>("LastActivityDate")
 22379                        .HasColumnType("TEXT");
 22380
 22381                    b.Property<DateTime?>("LastLoginDate")
 22382                        .HasColumnType("TEXT");
 22383
 22384                    b.Property<int?>("LoginAttemptsBeforeLockout")
 22385                        .HasColumnType("INTEGER");
 22386
 22387                    b.Property<int>("MaxActiveSessions")
 22388                        .HasColumnType("INTEGER");
 22389
 22390                    b.Property<int?>("MaxParentalAgeRating")
 22391                        .HasColumnType("INTEGER");
 22392
 22393                    b.Property<bool>("MustUpdatePassword")
 22394                        .HasColumnType("INTEGER");
 22395
 22396                    b.Property<string>("Password")
 22397                        .HasMaxLength(65535)
 22398                        .HasColumnType("TEXT");
 22399
 22400                    b.Property<string>("PasswordResetProviderId")
 22401                        .IsRequired()
 22402                        .HasMaxLength(255)
 22403                        .HasColumnType("TEXT");
 22404
 22405                    b.Property<bool>("PlayDefaultAudioTrack")
 22406                        .HasColumnType("INTEGER");
 22407
 22408                    b.Property<bool>("RememberAudioSelections")
 22409                        .HasColumnType("INTEGER");
 22410
 22411                    b.Property<bool>("RememberSubtitleSelections")
 22412                        .HasColumnType("INTEGER");
 22413
 22414                    b.Property<int?>("RemoteClientBitrateLimit")
 22415                        .HasColumnType("INTEGER");
 22416
 22417                    b.Property<uint>("RowVersion")
 22418                        .IsConcurrencyToken()
 22419                        .HasColumnType("INTEGER");
 22420
 22421                    b.Property<string>("SubtitleLanguagePreference")
 22422                        .HasMaxLength(255)
 22423                        .HasColumnType("TEXT");
 22424
 22425                    b.Property<int>("SubtitleMode")
 22426                        .HasColumnType("INTEGER");
 22427
 22428                    b.Property<int>("SyncPlayAccess")
 22429                        .HasColumnType("INTEGER");
 22430
 22431                    b.Property<string>("Username")
 22432                        .IsRequired()
 22433                        .HasMaxLength(255)
 22434                        .HasColumnType("TEXT");
 22435
 22436                    b.HasKey("Id");
 22437
 22438                    b.ToTable("Users");
 22439                });
 440
 22441            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 22442                {
 22443                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22444                        .WithMany("AccessSchedules")
 22445                        .HasForeignKey("UserId")
 22446                        .OnDelete(DeleteBehavior.Cascade)
 22447                        .IsRequired();
 22448                });
 449
 22450            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22451                {
 22452                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22453                        .WithMany("DisplayPreferences")
 22454                        .HasForeignKey("UserId")
 22455                        .OnDelete(DeleteBehavior.Cascade)
 22456                        .IsRequired();
 22457                });
 458
 22459            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22460                {
 22461                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 22462                        .WithMany("HomeSections")
 22463                        .HasForeignKey("DisplayPreferencesId")
 22464                        .OnDelete(DeleteBehavior.Cascade)
 22465                        .IsRequired();
 22466                });
 467
 22468            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22469                {
 22470                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22471                        .WithOne("ProfileImage")
 22472                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId");
 22473                });
 474
 22475            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22476                {
 22477                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22478                        .WithMany("ItemDisplayPreferences")
 22479                        .HasForeignKey("UserId")
 22480                        .OnDelete(DeleteBehavior.Cascade)
 22481                        .IsRequired();
 22482                });
 483
 22484            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22485                {
 22486                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22487                        .WithMany("Permissions")
 22488                        .HasForeignKey("Permission_Permissions_Guid");
 22489                });
 490
 22491            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22492                {
 22493                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22494                        .WithMany("Preferences")
 22495                        .HasForeignKey("Preference_Preferences_Guid");
 22496                });
 497
 22498            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22499                {
 22500                    b.Navigation("HomeSections");
 22501                });
 502
 22503            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22504                {
 22505                    b.Navigation("AccessSchedules");
 22506
 22507                    b.Navigation("DisplayPreferences");
 22508
 22509                    b.Navigation("ItemDisplayPreferences");
 22510
 22511                    b.Navigation("Permissions");
 22512
 22513                    b.Navigation("Preferences");
 22514
 22515                    b.Navigation("ProfileImage");
 22516                });
 517#pragma warning restore 612, 618
 22518        }
 519    }
 520}