< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 295
Coverable lines: 295
Total lines: 358
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/Management/20231015122231_Initial.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Management
 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: "WorkflowDefinitions",
 015                columns: table => new
 016                {
 017                    Id = table.Column<string>(type: "TEXT", nullable: false),
 018                    DefinitionId = table.Column<string>(type: "TEXT", nullable: false),
 019                    Name = table.Column<string>(type: "TEXT", nullable: true),
 020                    Description = table.Column<string>(type: "TEXT", nullable: true),
 021                    ToolVersion = table.Column<string>(type: "TEXT", nullable: true),
 022                    ProviderName = table.Column<string>(type: "TEXT", nullable: true),
 023                    MaterializerName = table.Column<string>(type: "TEXT", nullable: false),
 024                    MaterializerContext = table.Column<string>(type: "TEXT", nullable: true),
 025                    StringData = table.Column<string>(type: "TEXT", nullable: true),
 026                    BinaryData = table.Column<byte[]>(type: "BLOB", nullable: true),
 027                    IsReadonly = table.Column<bool>(type: "INTEGER", nullable: false),
 028                    Data = table.Column<string>(type: "TEXT", nullable: true),
 029                    UsableAsActivity = table.Column<bool>(type: "INTEGER", nullable: true),
 030                    CreatedAt = table.Column<string>(type: "TEXT", nullable: false),
 031                    Version = table.Column<int>(type: "INTEGER", nullable: false),
 032                    IsLatest = table.Column<bool>(type: "INTEGER", nullable: false),
 033                    IsPublished = table.Column<bool>(type: "INTEGER", nullable: false)
 034                },
 035                constraints: table =>
 036                {
 037                    table.PrimaryKey("PK_WorkflowDefinitions", x => x.Id);
 038                });
 39
 040            migrationBuilder.CreateTable(
 041                name: "WorkflowInstances",
 042                columns: table => new
 043                {
 044                    Id = table.Column<string>(type: "TEXT", nullable: false),
 045                    DefinitionId = table.Column<string>(type: "TEXT", nullable: false),
 046                    DefinitionVersionId = table.Column<string>(type: "TEXT", nullable: false),
 047                    Version = table.Column<int>(type: "INTEGER", nullable: false),
 048                    Status = table.Column<string>(type: "TEXT", nullable: false),
 049                    SubStatus = table.Column<string>(type: "TEXT", nullable: false),
 050                    CorrelationId = table.Column<string>(type: "TEXT", nullable: true),
 051                    Name = table.Column<string>(type: "TEXT", nullable: true),
 052                    IncidentCount = table.Column<int>(type: "INTEGER", nullable: false),
 053                    CreatedAt = table.Column<string>(type: "TEXT", nullable: false),
 054                    UpdatedAt = table.Column<string>(type: "TEXT", nullable: false),
 055                    FinishedAt = table.Column<string>(type: "TEXT", nullable: true),
 056                    Data = table.Column<string>(type: "TEXT", nullable: true)
 057                },
 058                constraints: table =>
 059                {
 060                    table.PrimaryKey("PK_WorkflowInstances", x => x.Id);
 061                });
 62
 063            migrationBuilder.CreateIndex(
 064                name: "IX_WorkflowDefinition_DefinitionId_Version",
 065                table: "WorkflowDefinitions",
 066                columns: new[] { "DefinitionId", "Version" },
 067                unique: true);
 68
 069            migrationBuilder.CreateIndex(
 070                name: "IX_WorkflowDefinition_IsLatest",
 071                table: "WorkflowDefinitions",
 072                column: "IsLatest");
 73
 074            migrationBuilder.CreateIndex(
 075                name: "IX_WorkflowDefinition_IsPublished",
 076                table: "WorkflowDefinitions",
 077                column: "IsPublished");
 78
 079            migrationBuilder.CreateIndex(
 080                name: "IX_WorkflowDefinition_Name",
 081                table: "WorkflowDefinitions",
 082                column: "Name");
 83
 084            migrationBuilder.CreateIndex(
 085                name: "IX_WorkflowDefinition_UsableAsActivity",
 086                table: "WorkflowDefinitions",
 087                column: "UsableAsActivity");
 88
 089            migrationBuilder.CreateIndex(
 090                name: "IX_WorkflowDefinition_Version",
 091                table: "WorkflowDefinitions",
 092                column: "Version");
 93
 094            migrationBuilder.CreateIndex(
 095                name: "IX_WorkflowInstance_CorrelationId",
 096                table: "WorkflowInstances",
 097                column: "CorrelationId");
 98
 099            migrationBuilder.CreateIndex(
 0100                name: "IX_WorkflowInstance_CreatedAt",
 0101                table: "WorkflowInstances",
 0102                column: "CreatedAt");
 103
 0104            migrationBuilder.CreateIndex(
 0105                name: "IX_WorkflowInstance_DefinitionId",
 0106                table: "WorkflowInstances",
 0107                column: "DefinitionId");
 108
 0109            migrationBuilder.CreateIndex(
 0110                name: "IX_WorkflowInstance_FinishedAt",
 0111                table: "WorkflowInstances",
 0112                column: "FinishedAt");
 113
 0114            migrationBuilder.CreateIndex(
 0115                name: "IX_WorkflowInstance_Name",
 0116                table: "WorkflowInstances",
 0117                column: "Name");
 118
 0119            migrationBuilder.CreateIndex(
 0120                name: "IX_WorkflowInstance_Status",
 0121                table: "WorkflowInstances",
 0122                column: "Status");
 123
 0124            migrationBuilder.CreateIndex(
 0125                name: "IX_WorkflowInstance_Status_DefinitionId",
 0126                table: "WorkflowInstances",
 0127                columns: new[] { "Status", "DefinitionId" });
 128
 0129            migrationBuilder.CreateIndex(
 0130                name: "IX_WorkflowInstance_Status_SubStatus",
 0131                table: "WorkflowInstances",
 0132                columns: new[] { "Status", "SubStatus" });
 133
 0134            migrationBuilder.CreateIndex(
 0135                name: "IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version",
 0136                table: "WorkflowInstances",
 0137                columns: new[] { "Status", "SubStatus", "DefinitionId", "Version" });
 138
 0139            migrationBuilder.CreateIndex(
 0140                name: "IX_WorkflowInstance_SubStatus",
 0141                table: "WorkflowInstances",
 0142                column: "SubStatus");
 143
 0144            migrationBuilder.CreateIndex(
 0145                name: "IX_WorkflowInstance_SubStatus_DefinitionId",
 0146                table: "WorkflowInstances",
 0147                columns: new[] { "SubStatus", "DefinitionId" });
 148
 0149            migrationBuilder.CreateIndex(
 0150                name: "IX_WorkflowInstance_UpdatedAt",
 0151                table: "WorkflowInstances",
 0152                column: "UpdatedAt");
 0153        }
 154
 155        /// <inheritdoc />
 156        protected override void Down(MigrationBuilder migrationBuilder)
 157        {
 0158            migrationBuilder.DropTable(
 0159                name: "WorkflowDefinitions");
 160
 0161            migrationBuilder.DropTable(
 0162                name: "WorkflowInstances");
 0163        }
 164    }
 165}

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

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Elsa.Persistence.EFCore.Modules.Management;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8
 9#nullable disable
 10
 11namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Management
 12{
 13    [DbContext(typeof(ManagementElsaDbContext))]
 14    [Migration("20231015122231_Initial")]
 15    partial class Initial
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 021            modelBuilder.HasAnnotation("ProductVersion", "7.0.11");
 22
 023            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
 024                {
 025                    b.Property<string>("Id")
 026                        .HasColumnType("TEXT");
 027
 028                    b.Property<byte[]>("BinaryData")
 029                        .HasColumnType("BLOB");
 030
 031                    b.Property<string>("CreatedAt")
 032                        .IsRequired()
 033                        .HasColumnType("TEXT");
 034
 035                    b.Property<string>("Data")
 036                        .HasColumnType("TEXT");
 037
 038                    b.Property<string>("DefinitionId")
 039                        .IsRequired()
 040                        .HasColumnType("TEXT");
 041
 042                    b.Property<string>("Description")
 043                        .HasColumnType("TEXT");
 044
 045                    b.Property<bool>("IsLatest")
 046                        .HasColumnType("INTEGER");
 047
 048                    b.Property<bool>("IsPublished")
 049                        .HasColumnType("INTEGER");
 050
 051                    b.Property<bool>("IsReadonly")
 052                        .HasColumnType("INTEGER");
 053
 054                    b.Property<string>("MaterializerContext")
 055                        .HasColumnType("TEXT");
 056
 057                    b.Property<string>("MaterializerName")
 058                        .IsRequired()
 059                        .HasColumnType("TEXT");
 060
 061                    b.Property<string>("Name")
 062                        .HasColumnType("TEXT");
 063
 064                    b.Property<string>("ProviderName")
 065                        .HasColumnType("TEXT");
 066
 067                    b.Property<string>("StringData")
 068                        .HasColumnType("TEXT");
 069
 070                    b.Property<string>("ToolVersion")
 071                        .HasColumnType("TEXT");
 072
 073                    b.Property<bool?>("UsableAsActivity")
 074                        .HasColumnType("INTEGER");
 075
 076                    b.Property<int>("Version")
 077                        .HasColumnType("INTEGER");
 078
 079                    b.HasKey("Id");
 080
 081                    b.HasIndex("IsLatest")
 082                        .HasDatabaseName("IX_WorkflowDefinition_IsLatest");
 083
 084                    b.HasIndex("IsPublished")
 085                        .HasDatabaseName("IX_WorkflowDefinition_IsPublished");
 086
 087                    b.HasIndex("Name")
 088                        .HasDatabaseName("IX_WorkflowDefinition_Name");
 089
 090                    b.HasIndex("UsableAsActivity")
 091                        .HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
 092
 093                    b.HasIndex("Version")
 094                        .HasDatabaseName("IX_WorkflowDefinition_Version");
 095
 096                    b.HasIndex("DefinitionId", "Version")
 097                        .IsUnique()
 098                        .HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
 099
 0100                    b.ToTable("WorkflowDefinitions");
 0101                });
 102
 0103            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
 0104                {
 0105                    b.Property<string>("Id")
 0106                        .HasColumnType("TEXT");
 0107
 0108                    b.Property<string>("CorrelationId")
 0109                        .HasColumnType("TEXT");
 0110
 0111                    b.Property<string>("CreatedAt")
 0112                        .IsRequired()
 0113                        .HasColumnType("TEXT");
 0114
 0115                    b.Property<string>("Data")
 0116                        .HasColumnType("TEXT");
 0117
 0118                    b.Property<string>("DefinitionId")
 0119                        .IsRequired()
 0120                        .HasColumnType("TEXT");
 0121
 0122                    b.Property<string>("DefinitionVersionId")
 0123                        .IsRequired()
 0124                        .HasColumnType("TEXT");
 0125
 0126                    b.Property<string>("FinishedAt")
 0127                        .HasColumnType("TEXT");
 0128
 0129                    b.Property<int>("IncidentCount")
 0130                        .HasColumnType("INTEGER");
 0131
 0132                    b.Property<string>("Name")
 0133                        .HasColumnType("TEXT");
 0134
 0135                    b.Property<string>("Status")
 0136                        .IsRequired()
 0137                        .HasColumnType("TEXT");
 0138
 0139                    b.Property<string>("SubStatus")
 0140                        .IsRequired()
 0141                        .HasColumnType("TEXT");
 0142
 0143                    b.Property<string>("UpdatedAt")
 0144                        .IsRequired()
 0145                        .HasColumnType("TEXT");
 0146
 0147                    b.Property<int>("Version")
 0148                        .HasColumnType("INTEGER");
 0149
 0150                    b.HasKey("Id");
 0151
 0152                    b.HasIndex("CorrelationId")
 0153                        .HasDatabaseName("IX_WorkflowInstance_CorrelationId");
 0154
 0155                    b.HasIndex("CreatedAt")
 0156                        .HasDatabaseName("IX_WorkflowInstance_CreatedAt");
 0157
 0158                    b.HasIndex("DefinitionId")
 0159                        .HasDatabaseName("IX_WorkflowInstance_DefinitionId");
 0160
 0161                    b.HasIndex("FinishedAt")
 0162                        .HasDatabaseName("IX_WorkflowInstance_FinishedAt");
 0163
 0164                    b.HasIndex("Name")
 0165                        .HasDatabaseName("IX_WorkflowInstance_Name");
 0166
 0167                    b.HasIndex("Status")
 0168                        .HasDatabaseName("IX_WorkflowInstance_Status");
 0169
 0170                    b.HasIndex("SubStatus")
 0171                        .HasDatabaseName("IX_WorkflowInstance_SubStatus");
 0172
 0173                    b.HasIndex("UpdatedAt")
 0174                        .HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
 0175
 0176                    b.HasIndex("Status", "DefinitionId")
 0177                        .HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
 0178
 0179                    b.HasIndex("Status", "SubStatus")
 0180                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
 0181
 0182                    b.HasIndex("SubStatus", "DefinitionId")
 0183                        .HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
 0184
 0185                    b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
 0186                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
 0187
 0188                    b.ToTable("WorkflowInstances");
 0189                });
 190#pragma warning restore 612, 618
 0191        }
 192    }
 193}