< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 100
Coverable lines: 100
Total lines: 147
Line coverage: 0%
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

Metrics

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Labels/20231015122301_Initial.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Labels
 6{
 7    /// <inheritdoc />
 8    public partial class Initial : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 013            migrationBuilder.CreateTable(
 014                name: "Labels",
 015                columns: table => new
 016                {
 017                    Id = table.Column<string>(type: "TEXT", nullable: false),
 018                    Name = table.Column<string>(type: "TEXT", nullable: false),
 019                    NormalizedName = table.Column<string>(type: "TEXT", nullable: false),
 020                    Description = table.Column<string>(type: "TEXT", nullable: true),
 021                    Color = table.Column<string>(type: "TEXT", nullable: true)
 022                },
 023                constraints: table =>
 024                {
 025                    table.PrimaryKey("PK_Labels", x => x.Id);
 026                });
 27
 028            migrationBuilder.CreateTable(
 029                name: "WorkflowDefinitionLabels",
 030                columns: table => new
 031                {
 032                    Id = table.Column<string>(type: "TEXT", nullable: false),
 033                    WorkflowDefinitionId = table.Column<string>(type: "TEXT", nullable: false),
 034                    WorkflowDefinitionVersionId = table.Column<string>(type: "TEXT", nullable: false),
 035                    LabelId = table.Column<string>(type: "TEXT", nullable: false)
 036                },
 037                constraints: table =>
 038                {
 039                    table.PrimaryKey("PK_WorkflowDefinitionLabels", x => x.Id);
 040                });
 41
 042            migrationBuilder.CreateIndex(
 043                name: "WorkflowDefinitionLabel_LabelId",
 044                table: "WorkflowDefinitionLabels",
 045                column: "LabelId");
 46
 047            migrationBuilder.CreateIndex(
 048                name: "WorkflowDefinitionLabel_WorkflowDefinitionId",
 049                table: "WorkflowDefinitionLabels",
 050                column: "WorkflowDefinitionId");
 51
 052            migrationBuilder.CreateIndex(
 053                name: "WorkflowDefinitionLabel_WorkflowDefinitionVersionId",
 054                table: "WorkflowDefinitionLabels",
 055                column: "WorkflowDefinitionVersionId");
 056        }
 57
 58        /// <inheritdoc />
 59        protected override void Down(MigrationBuilder migrationBuilder)
 60        {
 061            migrationBuilder.DropTable(
 062                name: "Labels");
 63
 064            migrationBuilder.DropTable(
 065                name: "WorkflowDefinitionLabels");
 066        }
 67    }
 68}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Labels/20231015122301_Initial.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using Elsa.Persistence.EFCore.Modules.Labels;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 7
 8#nullable disable
 9
 10namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Labels
 11{
 12    [DbContext(typeof(LabelsElsaDbContext))]
 13    [Migration("20231015122301_Initial")]
 14    partial class Initial
 15    {
 16        /// <inheritdoc />
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 020            modelBuilder.HasAnnotation("ProductVersion", "7.0.11");
 21
 022            modelBuilder.Entity("Elsa.Labels.Entities.Label", b =>
 023                {
 024                    b.Property<string>("Id")
 025                        .HasColumnType("TEXT");
 026
 027                    b.Property<string>("Color")
 028                        .HasColumnType("TEXT");
 029
 030                    b.Property<string>("Description")
 031                        .HasColumnType("TEXT");
 032
 033                    b.Property<string>("Name")
 034                        .IsRequired()
 035                        .HasColumnType("TEXT");
 036
 037                    b.Property<string>("NormalizedName")
 038                        .IsRequired()
 039                        .HasColumnType("TEXT");
 040
 041                    b.HasKey("Id");
 042
 043                    b.ToTable("Labels");
 044                });
 45
 046            modelBuilder.Entity("Elsa.Labels.Entities.WorkflowDefinitionLabel", b =>
 047                {
 048                    b.Property<string>("Id")
 049                        .HasColumnType("TEXT");
 050
 051                    b.Property<string>("LabelId")
 052                        .IsRequired()
 053                        .HasColumnType("TEXT");
 054
 055                    b.Property<string>("WorkflowDefinitionId")
 056                        .IsRequired()
 057                        .HasColumnType("TEXT");
 058
 059                    b.Property<string>("WorkflowDefinitionVersionId")
 060                        .IsRequired()
 061                        .HasColumnType("TEXT");
 062
 063                    b.HasKey("Id");
 064
 065                    b.HasIndex("LabelId")
 066                        .HasDatabaseName("WorkflowDefinitionLabel_LabelId");
 067
 068                    b.HasIndex("WorkflowDefinitionId")
 069                        .HasDatabaseName("WorkflowDefinitionLabel_WorkflowDefinitionId");
 070
 071                    b.HasIndex("WorkflowDefinitionVersionId")
 072                        .HasDatabaseName("WorkflowDefinitionLabel_WorkflowDefinitionVersionId");
 073
 074                    b.ToTable("WorkflowDefinitionLabels");
 075                });
 76#pragma warning restore 612, 618
 077        }
 78    }
 79}