< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 246
Coverable lines: 246
Total lines: 301
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: .ctor(...)100%210%
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/20250222190901_V3_4.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 V3_4 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 013        public V3_4(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 14        {
 015            _schema = schema;
 016        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 021            migrationBuilder.EnsureSchema(
 022                name: _schema.Schema);
 23
 024            migrationBuilder.RenameTable(
 025                name: "WorkflowInstances",
 026                newName: "WorkflowInstances",
 027                newSchema: _schema.Schema);
 28
 029            migrationBuilder.RenameTable(
 030                name: "WorkflowDefinitions",
 031                newName: "WorkflowDefinitions",
 032                newSchema: _schema.Schema);
 33
 034            migrationBuilder.AddColumn<bool>(
 035                name: "IsExecuting",
 036                schema: _schema.Schema,
 037                table: "WorkflowInstances",
 038                type: "INTEGER",
 039                nullable: false,
 040                defaultValue: false);
 41
 042            migrationBuilder.CreateIndex(
 043                name: "IX_WorkflowInstance_IsExecuting",
 044                schema: _schema.Schema,
 045                table: "WorkflowInstances",
 046                column: "IsExecuting");
 047        }
 48
 49        /// <inheritdoc />
 50        protected override void Down(MigrationBuilder migrationBuilder)
 51        {
 052            migrationBuilder.DropIndex(
 053                name: "IX_WorkflowInstance_IsExecuting",
 054                schema: _schema.Schema,
 055                table: "WorkflowInstances");
 56
 057            migrationBuilder.DropColumn(
 058                name: "IsExecuting",
 059                schema: _schema.Schema,
 060                table: "WorkflowInstances");
 61
 062            migrationBuilder.RenameTable(
 063                name: "WorkflowInstances",
 064                schema: _schema.Schema,
 065                newName: "WorkflowInstances");
 66
 067            migrationBuilder.RenameTable(
 068                name: "WorkflowDefinitions",
 069                schema: _schema.Schema,
 070                newName: "WorkflowDefinitions");
 071        }
 72    }
 73}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Management/20250222190901_V3_4.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("20250222190901_V3_4")]
 15    partial class V3_4
 16    {
 17        /// <inheritdoc />
 18        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 19        {
 20#pragma warning disable 612, 618
 021            modelBuilder
 022                .HasDefaultSchema("Elsa")
 023                .HasAnnotation("ProductVersion", "8.0.12");
 24
 025            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
 026                {
 027                    b.Property<string>("Id")
 028                        .HasColumnType("TEXT");
 029
 030                    b.Property<byte[]>("BinaryData")
 031                        .HasColumnType("BLOB");
 032
 033                    b.Property<DateTimeOffset>("CreatedAt")
 034                        .HasColumnType("TEXT");
 035
 036                    b.Property<string>("Data")
 037                        .HasColumnType("TEXT");
 038
 039                    b.Property<string>("DefinitionId")
 040                        .IsRequired()
 041                        .HasColumnType("TEXT");
 042
 043                    b.Property<string>("Description")
 044                        .HasColumnType("TEXT");
 045
 046                    b.Property<bool>("IsLatest")
 047                        .HasColumnType("INTEGER");
 048
 049                    b.Property<bool>("IsPublished")
 050                        .HasColumnType("INTEGER");
 051
 052                    b.Property<bool>("IsReadonly")
 053                        .HasColumnType("INTEGER");
 054
 055                    b.Property<bool>("IsSystem")
 056                        .HasColumnType("INTEGER");
 057
 058                    b.Property<string>("MaterializerContext")
 059                        .HasColumnType("TEXT");
 060
 061                    b.Property<string>("MaterializerName")
 062                        .IsRequired()
 063                        .HasColumnType("TEXT");
 064
 065                    b.Property<string>("Name")
 066                        .HasColumnType("TEXT");
 067
 068                    b.Property<string>("ProviderName")
 069                        .HasColumnType("TEXT");
 070
 071                    b.Property<string>("StringData")
 072                        .HasColumnType("TEXT");
 073
 074                    b.Property<string>("TenantId")
 075                        .HasColumnType("TEXT");
 076
 077                    b.Property<string>("ToolVersion")
 078                        .HasColumnType("TEXT");
 079
 080                    b.Property<bool?>("UsableAsActivity")
 081                        .HasColumnType("INTEGER");
 082
 083                    b.Property<int>("Version")
 084                        .HasColumnType("INTEGER");
 085
 086                    b.HasKey("Id");
 087
 088                    b.HasIndex("IsLatest")
 089                        .HasDatabaseName("IX_WorkflowDefinition_IsLatest");
 090
 091                    b.HasIndex("IsPublished")
 092                        .HasDatabaseName("IX_WorkflowDefinition_IsPublished");
 093
 094                    b.HasIndex("IsSystem")
 095                        .HasDatabaseName("IX_WorkflowDefinition_IsSystem");
 096
 097                    b.HasIndex("Name")
 098                        .HasDatabaseName("IX_WorkflowDefinition_Name");
 099
 0100                    b.HasIndex("TenantId")
 0101                        .HasDatabaseName("IX_WorkflowDefinition_TenantId");
 0102
 0103                    b.HasIndex("UsableAsActivity")
 0104                        .HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
 0105
 0106                    b.HasIndex("Version")
 0107                        .HasDatabaseName("IX_WorkflowDefinition_Version");
 0108
 0109                    b.HasIndex("DefinitionId", "Version")
 0110                        .IsUnique()
 0111                        .HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
 0112
 0113                    b.ToTable("WorkflowDefinitions", "Elsa");
 0114                });
 115
 0116            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
 0117                {
 0118                    b.Property<string>("Id")
 0119                        .HasColumnType("TEXT");
 0120
 0121                    b.Property<string>("CorrelationId")
 0122                        .HasColumnType("TEXT");
 0123
 0124                    b.Property<DateTimeOffset>("CreatedAt")
 0125                        .HasColumnType("TEXT");
 0126
 0127                    b.Property<string>("Data")
 0128                        .HasColumnType("TEXT");
 0129
 0130                    b.Property<string>("DataCompressionAlgorithm")
 0131                        .HasColumnType("TEXT");
 0132
 0133                    b.Property<string>("DefinitionId")
 0134                        .IsRequired()
 0135                        .HasColumnType("TEXT");
 0136
 0137                    b.Property<string>("DefinitionVersionId")
 0138                        .IsRequired()
 0139                        .HasColumnType("TEXT");
 0140
 0141                    b.Property<DateTimeOffset?>("FinishedAt")
 0142                        .HasColumnType("TEXT");
 0143
 0144                    b.Property<int>("IncidentCount")
 0145                        .HasColumnType("INTEGER");
 0146
 0147                    b.Property<bool>("IsExecuting")
 0148                        .HasColumnType("INTEGER");
 0149
 0150                    b.Property<bool>("IsSystem")
 0151                        .HasColumnType("INTEGER");
 0152
 0153                    b.Property<string>("Name")
 0154                        .HasColumnType("TEXT");
 0155
 0156                    b.Property<string>("ParentWorkflowInstanceId")
 0157                        .HasColumnType("TEXT");
 0158
 0159                    b.Property<string>("Status")
 0160                        .IsRequired()
 0161                        .HasColumnType("TEXT");
 0162
 0163                    b.Property<string>("SubStatus")
 0164                        .IsRequired()
 0165                        .HasColumnType("TEXT");
 0166
 0167                    b.Property<string>("TenantId")
 0168                        .HasColumnType("TEXT");
 0169
 0170                    b.Property<DateTimeOffset>("UpdatedAt")
 0171                        .HasColumnType("TEXT");
 0172
 0173                    b.Property<int>("Version")
 0174                        .HasColumnType("INTEGER");
 0175
 0176                    b.HasKey("Id");
 0177
 0178                    b.HasIndex("CorrelationId")
 0179                        .HasDatabaseName("IX_WorkflowInstance_CorrelationId");
 0180
 0181                    b.HasIndex("CreatedAt")
 0182                        .HasDatabaseName("IX_WorkflowInstance_CreatedAt");
 0183
 0184                    b.HasIndex("DefinitionId")
 0185                        .HasDatabaseName("IX_WorkflowInstance_DefinitionId");
 0186
 0187                    b.HasIndex("FinishedAt")
 0188                        .HasDatabaseName("IX_WorkflowInstance_FinishedAt");
 0189
 0190                    b.HasIndex("IsExecuting")
 0191                        .HasDatabaseName("IX_WorkflowInstance_IsExecuting");
 0192
 0193                    b.HasIndex("IsSystem")
 0194                        .HasDatabaseName("IX_WorkflowInstance_IsSystem");
 0195
 0196                    b.HasIndex("Name")
 0197                        .HasDatabaseName("IX_WorkflowInstance_Name");
 0198
 0199                    b.HasIndex("Status")
 0200                        .HasDatabaseName("IX_WorkflowInstance_Status");
 0201
 0202                    b.HasIndex("SubStatus")
 0203                        .HasDatabaseName("IX_WorkflowInstance_SubStatus");
 0204
 0205                    b.HasIndex("TenantId")
 0206                        .HasDatabaseName("IX_WorkflowInstance_TenantId");
 0207
 0208                    b.HasIndex("UpdatedAt")
 0209                        .HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
 0210
 0211                    b.HasIndex("Status", "DefinitionId")
 0212                        .HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
 0213
 0214                    b.HasIndex("Status", "SubStatus")
 0215                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
 0216
 0217                    b.HasIndex("SubStatus", "DefinitionId")
 0218                        .HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
 0219
 0220                    b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
 0221                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
 0222
 0223                    b.ToTable("WorkflowInstances", "Elsa");
 0224                });
 225#pragma warning restore 612, 618
 0226        }
 227    }
 228}