< Summary - Jellyfin

Line coverage
94%
Covered lines: 73
Uncovered lines: 4
Coverable lines: 77
Total lines: 118
Line coverage: 94.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/20200514181226_AddActivityLog.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2#pragma warning disable SA1601
 3
 4using System;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6
 7namespace Jellyfin.Server.Implementations.Migrations
 8{
 9    public partial class AddActivityLog : Migration
 10    {
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 2213            migrationBuilder.EnsureSchema(
 2214                name: "jellyfin");
 15
 2216            migrationBuilder.CreateTable(
 2217                name: "ActivityLogs",
 2218                schema: "jellyfin",
 2219                columns: table => new
 2220                {
 2221                    Id = table.Column<int>(nullable: false)
 2222                        .Annotation("Sqlite:Autoincrement", true),
 2223                    Name = table.Column<string>(maxLength: 512, nullable: false),
 2224                    Overview = table.Column<string>(maxLength: 512, nullable: true),
 2225                    ShortOverview = table.Column<string>(maxLength: 512, nullable: true),
 2226                    Type = table.Column<string>(maxLength: 256, nullable: false),
 2227                    UserId = table.Column<Guid>(nullable: false),
 2228                    ItemId = table.Column<string>(maxLength: 256, nullable: true),
 2229                    DateCreated = table.Column<DateTime>(nullable: false),
 2230                    LogSeverity = table.Column<int>(nullable: false),
 2231                    RowVersion = table.Column<uint>(nullable: false)
 2232                },
 2233                constraints: table =>
 2234                {
 2235                    table.PrimaryKey("PK_ActivityLogs", x => x.Id);
 2236                });
 2237        }
 38
 39        protected override void Down(MigrationBuilder migrationBuilder)
 40        {
 041            migrationBuilder.DropTable(
 042                name: "ActivityLogs",
 043                schema: "jellyfin");
 044        }
 45    }
 46}

/srv/git/jellyfin/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.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("20200514181226_AddActivityLog")]
 15    partial class AddActivityLog
 16    {
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 2220            modelBuilder
 2221                .HasDefaultSchema("jellyfin")
 2222                .HasAnnotation("ProductVersion", "3.1.3");
 23
 2224            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2225                {
 2226                    b.Property<int>("Id")
 2227                        .ValueGeneratedOnAdd()
 2228                        .HasColumnType("INTEGER");
 2229
 2230                    b.Property<DateTime>("DateCreated")
 2231                        .HasColumnType("TEXT");
 2232
 2233                    b.Property<string>("ItemId")
 2234                        .HasColumnType("TEXT")
 2235                        .HasMaxLength(256);
 2236
 2237                    b.Property<int>("LogSeverity")
 2238                        .HasColumnType("INTEGER");
 2239
 2240                    b.Property<string>("Name")
 2241                        .IsRequired()
 2242                        .HasColumnType("TEXT")
 2243                        .HasMaxLength(512);
 2244
 2245                    b.Property<string>("Overview")
 2246                        .HasColumnType("TEXT")
 2247                        .HasMaxLength(512);
 2248
 2249                    b.Property<uint>("RowVersion")
 2250                        .IsConcurrencyToken()
 2251                        .HasColumnType("INTEGER");
 2252
 2253                    b.Property<string>("ShortOverview")
 2254                        .HasColumnType("TEXT")
 2255                        .HasMaxLength(512);
 2256
 2257                    b.Property<string>("Type")
 2258                        .IsRequired()
 2259                        .HasColumnType("TEXT")
 2260                        .HasMaxLength(256);
 2261
 2262                    b.Property<Guid>("UserId")
 2263                        .HasColumnType("TEXT");
 2264
 2265                    b.HasKey("Id");
 2266
 2267                    b.ToTable("ActivityLogs");
 2268                });
 69#pragma warning restore 612, 618
 2270        }
 71    }
 72}