< Summary

Line coverage
96%
Covered lines: 221
Uncovered lines: 9
Coverable lines: 230
Total lines: 282
Line coverage: 96%
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%11100%
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Management/20250222190906_V3_4.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Management
 6{
 7    /// <inheritdoc />
 8    public partial class V3_4 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 213        public V3_4(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 14        {
 215            _schema = schema;
 216        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 221            migrationBuilder.AddColumn<bool>(
 222                name: "IsExecuting",
 223                schema: _schema.Schema,
 224                table: "WorkflowInstances",
 225                type: "boolean",
 226                nullable: false,
 227                defaultValue: false);
 28
 229            migrationBuilder.CreateIndex(
 230                name: "IX_WorkflowInstance_IsExecuting",
 231                schema: _schema.Schema,
 232                table: "WorkflowInstances",
 233                column: "IsExecuting");
 234        }
 35
 36        /// <inheritdoc />
 37        protected override void Down(MigrationBuilder migrationBuilder)
 38        {
 039            migrationBuilder.DropIndex(
 040                name: "IX_WorkflowInstance_IsExecuting",
 041                schema: _schema.Schema,
 042                table: "WorkflowInstances");
 43
 044            migrationBuilder.DropColumn(
 045                name: "IsExecuting",
 046                schema: _schema.Schema,
 047                table: "WorkflowInstances");
 048        }
 49    }
 50}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Management/20250222190906_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;
 8using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 9
 10#nullable disable
 11
 12namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Management
 13{
 14    [DbContext(typeof(ManagementElsaDbContext))]
 15    [Migration("20250222190906_V3_4")]
 16    partial class V3_4
 17    {
 18        /// <inheritdoc />
 19        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 20        {
 21#pragma warning disable 612, 618
 122            modelBuilder
 123                .HasDefaultSchema("Elsa")
 124                .HasAnnotation("ProductVersion", "8.0.12")
 125                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 26
 127            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 28
 129            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
 130                {
 131                    b.Property<string>("Id")
 132                        .HasColumnType("text");
 133
 134                    b.Property<byte[]>("BinaryData")
 135                        .HasColumnType("bytea");
 136
 137                    b.Property<DateTimeOffset>("CreatedAt")
 138                        .HasColumnType("timestamp with time zone");
 139
 140                    b.Property<string>("Data")
 141                        .HasColumnType("text");
 142
 143                    b.Property<string>("DefinitionId")
 144                        .IsRequired()
 145                        .HasColumnType("text");
 146
 147                    b.Property<string>("Description")
 148                        .HasColumnType("text");
 149
 150                    b.Property<bool>("IsLatest")
 151                        .HasColumnType("boolean");
 152
 153                    b.Property<bool>("IsPublished")
 154                        .HasColumnType("boolean");
 155
 156                    b.Property<bool>("IsReadonly")
 157                        .HasColumnType("boolean");
 158
 159                    b.Property<bool>("IsSystem")
 160                        .HasColumnType("boolean");
 161
 162                    b.Property<string>("MaterializerContext")
 163                        .HasColumnType("text");
 164
 165                    b.Property<string>("MaterializerName")
 166                        .IsRequired()
 167                        .HasColumnType("text");
 168
 169                    b.Property<string>("Name")
 170                        .HasColumnType("text");
 171
 172                    b.Property<string>("ProviderName")
 173                        .HasColumnType("text");
 174
 175                    b.Property<string>("StringData")
 176                        .HasColumnType("text");
 177
 178                    b.Property<string>("TenantId")
 179                        .HasColumnType("text");
 180
 181                    b.Property<string>("ToolVersion")
 182                        .HasColumnType("text");
 183
 184                    b.Property<bool?>("UsableAsActivity")
 185                        .HasColumnType("boolean");
 186
 187                    b.Property<int>("Version")
 188                        .HasColumnType("integer");
 189
 190                    b.HasKey("Id");
 191
 192                    b.HasIndex("IsLatest")
 193                        .HasDatabaseName("IX_WorkflowDefinition_IsLatest");
 194
 195                    b.HasIndex("IsPublished")
 196                        .HasDatabaseName("IX_WorkflowDefinition_IsPublished");
 197
 198                    b.HasIndex("IsSystem")
 199                        .HasDatabaseName("IX_WorkflowDefinition_IsSystem");
 1100
 1101                    b.HasIndex("Name")
 1102                        .HasDatabaseName("IX_WorkflowDefinition_Name");
 1103
 1104                    b.HasIndex("TenantId")
 1105                        .HasDatabaseName("IX_WorkflowDefinition_TenantId");
 1106
 1107                    b.HasIndex("UsableAsActivity")
 1108                        .HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
 1109
 1110                    b.HasIndex("Version")
 1111                        .HasDatabaseName("IX_WorkflowDefinition_Version");
 1112
 1113                    b.HasIndex("DefinitionId", "Version")
 1114                        .IsUnique()
 1115                        .HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
 1116
 1117                    b.ToTable("WorkflowDefinitions", "Elsa");
 2118                });
 119
 1120            modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
 1121                {
 1122                    b.Property<string>("Id")
 1123                        .HasColumnType("text");
 1124
 1125                    b.Property<string>("CorrelationId")
 1126                        .HasColumnType("text");
 1127
 1128                    b.Property<DateTimeOffset>("CreatedAt")
 1129                        .HasColumnType("timestamp with time zone");
 1130
 1131                    b.Property<string>("Data")
 1132                        .HasColumnType("text");
 1133
 1134                    b.Property<string>("DataCompressionAlgorithm")
 1135                        .HasColumnType("text");
 1136
 1137                    b.Property<string>("DefinitionId")
 1138                        .IsRequired()
 1139                        .HasColumnType("text");
 1140
 1141                    b.Property<string>("DefinitionVersionId")
 1142                        .IsRequired()
 1143                        .HasColumnType("text");
 1144
 1145                    b.Property<DateTimeOffset?>("FinishedAt")
 1146                        .HasColumnType("timestamp with time zone");
 1147
 1148                    b.Property<int>("IncidentCount")
 1149                        .HasColumnType("integer");
 1150
 1151                    b.Property<bool>("IsExecuting")
 1152                        .HasColumnType("boolean");
 1153
 1154                    b.Property<bool>("IsSystem")
 1155                        .HasColumnType("boolean");
 1156
 1157                    b.Property<string>("Name")
 1158                        .HasColumnType("text");
 1159
 1160                    b.Property<string>("ParentWorkflowInstanceId")
 1161                        .HasColumnType("text");
 1162
 1163                    b.Property<string>("Status")
 1164                        .IsRequired()
 1165                        .HasColumnType("text");
 1166
 1167                    b.Property<string>("SubStatus")
 1168                        .IsRequired()
 1169                        .HasColumnType("text");
 1170
 1171                    b.Property<string>("TenantId")
 1172                        .HasColumnType("text");
 1173
 1174                    b.Property<DateTimeOffset>("UpdatedAt")
 1175                        .HasColumnType("timestamp with time zone");
 1176
 1177                    b.Property<int>("Version")
 1178                        .HasColumnType("integer");
 1179
 1180                    b.HasKey("Id");
 1181
 1182                    b.HasIndex("CorrelationId")
 1183                        .HasDatabaseName("IX_WorkflowInstance_CorrelationId");
 1184
 1185                    b.HasIndex("CreatedAt")
 1186                        .HasDatabaseName("IX_WorkflowInstance_CreatedAt");
 1187
 1188                    b.HasIndex("DefinitionId")
 1189                        .HasDatabaseName("IX_WorkflowInstance_DefinitionId");
 1190
 1191                    b.HasIndex("FinishedAt")
 1192                        .HasDatabaseName("IX_WorkflowInstance_FinishedAt");
 1193
 1194                    b.HasIndex("IsExecuting")
 1195                        .HasDatabaseName("IX_WorkflowInstance_IsExecuting");
 1196
 1197                    b.HasIndex("IsSystem")
 1198                        .HasDatabaseName("IX_WorkflowInstance_IsSystem");
 1199
 1200                    b.HasIndex("Name")
 1201                        .HasDatabaseName("IX_WorkflowInstance_Name");
 1202
 1203                    b.HasIndex("Status")
 1204                        .HasDatabaseName("IX_WorkflowInstance_Status");
 1205
 1206                    b.HasIndex("SubStatus")
 1207                        .HasDatabaseName("IX_WorkflowInstance_SubStatus");
 1208
 1209                    b.HasIndex("TenantId")
 1210                        .HasDatabaseName("IX_WorkflowInstance_TenantId");
 1211
 1212                    b.HasIndex("UpdatedAt")
 1213                        .HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
 1214
 1215                    b.HasIndex("Status", "DefinitionId")
 1216                        .HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
 1217
 1218                    b.HasIndex("Status", "SubStatus")
 1219                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
 1220
 1221                    b.HasIndex("SubStatus", "DefinitionId")
 1222                        .HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
 1223
 1224                    b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
 1225                        .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
 1226
 1227                    b.ToTable("WorkflowInstances", "Elsa");
 2228                });
 229#pragma warning restore 612, 618
 1230        }
 231    }
 232}