< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 230
Coverable lines: 230
Total lines: 284
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/20241212211754_V3_3.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_3 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 013        public V3_3(Elsa.Persistence.EFCore.IElsaDbContextSchema schema)
 14        {
 015            _schema = schema;
 016        }
 17
 18        /// <inheritdoc />
 19        protected override void Up(MigrationBuilder migrationBuilder)
 20        {
 021            migrationBuilder.AddColumn<string>(
 022                name: "TenantId",
 023                table: "WorkflowInstances",
 024                type: "TEXT",
 025                nullable: true);
 26
 027            migrationBuilder.AddColumn<string>(
 028                name: "TenantId",
 029                table: "WorkflowDefinitions",
 030                type: "TEXT",
 031                nullable: true);
 32
 033            migrationBuilder.CreateIndex(
 034                name: "IX_WorkflowInstance_TenantId",
 035                table: "WorkflowInstances",
 036                column: "TenantId");
 37
 038            migrationBuilder.CreateIndex(
 039                name: "IX_WorkflowDefinition_TenantId",
 040                table: "WorkflowDefinitions",
 041                column: "TenantId");
 042        }
 43
 44        /// <inheritdoc />
 45        protected override void Down(MigrationBuilder migrationBuilder)
 46        {
 047            migrationBuilder.DropIndex(
 048                name: "IX_WorkflowInstance_TenantId",
 049                table: "WorkflowInstances");
 50
 051            migrationBuilder.DropIndex(
 052                name: "IX_WorkflowDefinition_TenantId",
 053                table: "WorkflowDefinitions");
 54
 055            migrationBuilder.DropColumn(
 056                name: "TenantId",
 057                table: "WorkflowInstances");
 58
 059            migrationBuilder.DropColumn(
 060                name: "TenantId",
 061                table: "WorkflowDefinitions");
 062        }
 63    }
 64}

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