< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 172
Coverable lines: 172
Total lines: 226
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/Alterations/20231015122159_Initial.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Alterations
 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: "AlterationJobs",
 015                columns: table => new
 016                {
 017                    Id = table.Column<string>(type: "TEXT", nullable: false),
 018                    PlanId = table.Column<string>(type: "TEXT", nullable: false),
 019                    WorkflowInstanceId = table.Column<string>(type: "TEXT", nullable: false),
 020                    Status = table.Column<int>(type: "INTEGER", nullable: false),
 021                    CreatedAt = table.Column<string>(type: "TEXT", nullable: false),
 022                    StartedAt = table.Column<string>(type: "TEXT", nullable: true),
 023                    CompletedAt = table.Column<string>(type: "TEXT", nullable: true),
 024                    SerializedLog = table.Column<string>(type: "TEXT", nullable: true)
 025                },
 026                constraints: table =>
 027                {
 028                    table.PrimaryKey("PK_AlterationJobs", x => x.Id);
 029                });
 30
 031            migrationBuilder.CreateTable(
 032                name: "AlterationPlans",
 033                columns: table => new
 034                {
 035                    Id = table.Column<string>(type: "TEXT", nullable: false),
 036                    Status = table.Column<int>(type: "INTEGER", nullable: false),
 037                    CreatedAt = table.Column<string>(type: "TEXT", nullable: false),
 038                    StartedAt = table.Column<string>(type: "TEXT", nullable: true),
 039                    CompletedAt = table.Column<string>(type: "TEXT", nullable: true),
 040                    SerializedAlterations = table.Column<string>(type: "TEXT", nullable: true),
 041                    SerializedWorkflowInstanceIds = table.Column<string>(type: "TEXT", nullable: true)
 042                },
 043                constraints: table =>
 044                {
 045                    table.PrimaryKey("PK_AlterationPlans", x => x.Id);
 046                });
 47
 048            migrationBuilder.CreateIndex(
 049                name: "IX_AlterationJob_CompletedAt",
 050                table: "AlterationJobs",
 051                column: "CompletedAt");
 52
 053            migrationBuilder.CreateIndex(
 054                name: "IX_AlterationJob_CreatedAt",
 055                table: "AlterationJobs",
 056                column: "CreatedAt");
 57
 058            migrationBuilder.CreateIndex(
 059                name: "IX_AlterationJob_PlanId",
 060                table: "AlterationJobs",
 061                column: "PlanId");
 62
 063            migrationBuilder.CreateIndex(
 064                name: "IX_AlterationJob_StartedAt",
 065                table: "AlterationJobs",
 066                column: "StartedAt");
 67
 068            migrationBuilder.CreateIndex(
 069                name: "IX_AlterationJob_Status",
 070                table: "AlterationJobs",
 071                column: "Status");
 72
 073            migrationBuilder.CreateIndex(
 074                name: "IX_AlterationJob_WorkflowInstanceId",
 075                table: "AlterationJobs",
 076                column: "WorkflowInstanceId");
 77
 078            migrationBuilder.CreateIndex(
 079                name: "IX_AlterationPlan_CompletedAt",
 080                table: "AlterationPlans",
 081                column: "CompletedAt");
 82
 083            migrationBuilder.CreateIndex(
 084                name: "IX_AlterationPlan_CreatedAt",
 085                table: "AlterationPlans",
 086                column: "CreatedAt");
 87
 088            migrationBuilder.CreateIndex(
 089                name: "IX_AlterationPlan_StartedAt",
 090                table: "AlterationPlans",
 091                column: "StartedAt");
 92
 093            migrationBuilder.CreateIndex(
 094                name: "IX_AlterationPlan_Status",
 095                table: "AlterationPlans",
 096                column: "Status");
 097        }
 98
 99        /// <inheritdoc />
 100        protected override void Down(MigrationBuilder migrationBuilder)
 101        {
 0102            migrationBuilder.DropTable(
 0103                name: "AlterationJobs");
 104
 0105            migrationBuilder.DropTable(
 0106                name: "AlterationPlans");
 0107        }
 108    }
 109}

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

#LineLine coverage
 1// <auto-generated />
 2using Elsa.Persistence.EFCore.Modules.Alterations;
 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.Alterations
 11{
 12    [DbContext(typeof(AlterationsElsaDbContext))]
 13    [Migration("20231015122159_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.Alterations.Core.Entities.AlterationJob", b =>
 023                {
 024                    b.Property<string>("Id")
 025                        .HasColumnType("TEXT");
 026
 027                    b.Property<string>("CompletedAt")
 028                        .HasColumnType("TEXT");
 029
 030                    b.Property<string>("CreatedAt")
 031                        .IsRequired()
 032                        .HasColumnType("TEXT");
 033
 034                    b.Property<string>("PlanId")
 035                        .IsRequired()
 036                        .HasColumnType("TEXT");
 037
 038                    b.Property<string>("SerializedLog")
 039                        .HasColumnType("TEXT");
 040
 041                    b.Property<string>("StartedAt")
 042                        .HasColumnType("TEXT");
 043
 044                    b.Property<int>("Status")
 045                        .HasColumnType("INTEGER");
 046
 047                    b.Property<string>("WorkflowInstanceId")
 048                        .IsRequired()
 049                        .HasColumnType("TEXT");
 050
 051                    b.HasKey("Id");
 052
 053                    b.HasIndex("CompletedAt")
 054                        .HasDatabaseName("IX_AlterationJob_CompletedAt");
 055
 056                    b.HasIndex("CreatedAt")
 057                        .HasDatabaseName("IX_AlterationJob_CreatedAt");
 058
 059                    b.HasIndex("PlanId")
 060                        .HasDatabaseName("IX_AlterationJob_PlanId");
 061
 062                    b.HasIndex("StartedAt")
 063                        .HasDatabaseName("IX_AlterationJob_StartedAt");
 064
 065                    b.HasIndex("Status")
 066                        .HasDatabaseName("IX_AlterationJob_Status");
 067
 068                    b.HasIndex("WorkflowInstanceId")
 069                        .HasDatabaseName("IX_AlterationJob_WorkflowInstanceId");
 070
 071                    b.ToTable("AlterationJobs");
 072                });
 73
 074            modelBuilder.Entity("Elsa.Alterations.Core.Entities.AlterationPlan", b =>
 075                {
 076                    b.Property<string>("Id")
 077                        .HasColumnType("TEXT");
 078
 079                    b.Property<string>("CompletedAt")
 080                        .HasColumnType("TEXT");
 081
 082                    b.Property<string>("CreatedAt")
 083                        .IsRequired()
 084                        .HasColumnType("TEXT");
 085
 086                    b.Property<string>("SerializedAlterations")
 087                        .HasColumnType("TEXT");
 088
 089                    b.Property<string>("SerializedWorkflowInstanceIds")
 090                        .HasColumnType("TEXT");
 091
 092                    b.Property<string>("StartedAt")
 093                        .HasColumnType("TEXT");
 094
 095                    b.Property<int>("Status")
 096                        .HasColumnType("INTEGER");
 097
 098                    b.HasKey("Id");
 099
 0100                    b.HasIndex("CompletedAt")
 0101                        .HasDatabaseName("IX_AlterationPlan_CompletedAt");
 0102
 0103                    b.HasIndex("CreatedAt")
 0104                        .HasDatabaseName("IX_AlterationPlan_CreatedAt");
 0105
 0106                    b.HasIndex("StartedAt")
 0107                        .HasDatabaseName("IX_AlterationPlan_StartedAt");
 0108
 0109                    b.HasIndex("Status")
 0110                        .HasDatabaseName("IX_AlterationPlan_Status");
 0111
 0112                    b.ToTable("AlterationPlans");
 0113                });
 114#pragma warning restore 612, 618
 0115        }
 116    }
 117}