< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 412
Coverable lines: 412
Total lines: 467
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/Runtime/20240329200705_V3_1.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Runtime
 6{
 7    /// <inheritdoc />
 8    public partial class V3_1 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 013        public V3_1(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: "SerializedActivityStateCompressionAlgorithm",
 023                table: "ActivityExecutionRecords",
 024                type: "TEXT",
 025                nullable: true);
 26
 027            migrationBuilder.AddColumn<string>(
 028                name: "SerializedProperties",
 029                table: "ActivityExecutionRecords",
 030                type: "TEXT",
 031                nullable: true);
 32
 033            migrationBuilder.CreateTable(
 034                name: "KeyValuePairs",
 035                columns: table => new
 036                {
 037                    Key = table.Column<string>(type: "TEXT", nullable: false),
 038                    SerializedValue = table.Column<string>(type: "TEXT", nullable: false)
 039                },
 040                constraints: table =>
 041                {
 042                    table.PrimaryKey("PK_KeyValuePairs", x => x.Key);
 043                });
 044        }
 45
 46        /// <inheritdoc />
 47        protected override void Down(MigrationBuilder migrationBuilder)
 48        {
 049            migrationBuilder.DropTable(
 050                name: "KeyValuePairs");
 51
 052            migrationBuilder.DropColumn(
 053                name: "SerializedActivityStateCompressionAlgorithm",
 054                table: "ActivityExecutionRecords");
 55
 056            migrationBuilder.DropColumn(
 057                name: "SerializedProperties",
 058                table: "ActivityExecutionRecords");
 059        }
 60    }
 61}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Sqlite/Migrations/Runtime/20240329200705_V3_1.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using Elsa.Persistence.EFCore.Modules.Runtime;
 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.Runtime
 11{
 12    [DbContext(typeof(RuntimeElsaDbContext))]
 13    [Migration("20240329200705_V3_1")]
 14    partial class V3_1
 15    {
 16        /// <inheritdoc />
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 020            modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
 21
 022            modelBuilder.Entity("Elsa.KeyValues.Entities.SerializedKeyValuePair", b =>
 023                {
 024                    b.Property<string>("Key")
 025                        .HasColumnType("TEXT");
 026
 027                    b.Property<string>("SerializedValue")
 028                        .IsRequired()
 029                        .HasColumnType("TEXT");
 030
 031                    b.HasKey("Key");
 032
 033                    b.ToTable("KeyValuePairs");
 034                });
 35
 036            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.ActivityExecutionRecord", b =>
 037                {
 038                    b.Property<string>("Id")
 039                        .HasColumnType("TEXT");
 040
 041                    b.Property<string>("ActivityId")
 042                        .IsRequired()
 043                        .HasColumnType("TEXT");
 044
 045                    b.Property<string>("ActivityName")
 046                        .HasColumnType("TEXT");
 047
 048                    b.Property<string>("ActivityNodeId")
 049                        .IsRequired()
 050                        .HasColumnType("TEXT");
 051
 052                    b.Property<string>("ActivityType")
 053                        .IsRequired()
 054                        .HasColumnType("TEXT");
 055
 056                    b.Property<int>("ActivityTypeVersion")
 057                        .HasColumnType("INTEGER");
 058
 059                    b.Property<string>("CompletedAt")
 060                        .HasColumnType("TEXT");
 061
 062                    b.Property<bool>("HasBookmarks")
 063                        .HasColumnType("INTEGER");
 064
 065                    b.Property<string>("SerializedActivityState")
 066                        .HasColumnType("TEXT");
 067
 068                    b.Property<string>("SerializedActivityStateCompressionAlgorithm")
 069                        .HasColumnType("TEXT");
 070
 071                    b.Property<string>("SerializedException")
 072                        .HasColumnType("TEXT");
 073
 074                    b.Property<string>("SerializedOutputs")
 075                        .HasColumnType("TEXT");
 076
 077                    b.Property<string>("SerializedPayload")
 078                        .HasColumnType("TEXT");
 079
 080                    b.Property<string>("SerializedProperties")
 081                        .HasColumnType("TEXT");
 082
 083                    b.Property<string>("StartedAt")
 084                        .IsRequired()
 085                        .HasColumnType("TEXT");
 086
 087                    b.Property<string>("Status")
 088                        .IsRequired()
 089                        .HasColumnType("TEXT");
 090
 091                    b.Property<string>("WorkflowInstanceId")
 092                        .IsRequired()
 093                        .HasColumnType("TEXT");
 094
 095                    b.HasKey("Id");
 096
 097                    b.HasIndex("ActivityId")
 098                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityId");
 099
 0100                    b.HasIndex("ActivityName")
 0101                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityName");
 0102
 0103                    b.HasIndex("ActivityNodeId")
 0104                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityNodeId");
 0105
 0106                    b.HasIndex("ActivityType")
 0107                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType");
 0108
 0109                    b.HasIndex("ActivityTypeVersion")
 0110                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityTypeVersion");
 0111
 0112                    b.HasIndex("CompletedAt")
 0113                        .HasDatabaseName("IX_ActivityExecutionRecord_CompletedAt");
 0114
 0115                    b.HasIndex("HasBookmarks")
 0116                        .HasDatabaseName("IX_ActivityExecutionRecord_HasBookmarks");
 0117
 0118                    b.HasIndex("StartedAt")
 0119                        .HasDatabaseName("IX_ActivityExecutionRecord_StartedAt");
 0120
 0121                    b.HasIndex("Status")
 0122                        .HasDatabaseName("IX_ActivityExecutionRecord_Status");
 0123
 0124                    b.HasIndex("WorkflowInstanceId")
 0125                        .HasDatabaseName("IX_ActivityExecutionRecord_WorkflowInstanceId");
 0126
 0127                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 0128                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion");
 0129
 0130                    b.ToTable("ActivityExecutionRecords");
 0131                });
 132
 0133            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredBookmark", b =>
 0134                {
 0135                    b.Property<string>("BookmarkId")
 0136                        .HasColumnType("TEXT");
 0137
 0138                    b.Property<string>("ActivityInstanceId")
 0139                        .HasColumnType("TEXT");
 0140
 0141                    b.Property<string>("ActivityTypeName")
 0142                        .IsRequired()
 0143                        .HasColumnType("TEXT");
 0144
 0145                    b.Property<string>("CorrelationId")
 0146                        .HasColumnType("TEXT");
 0147
 0148                    b.Property<string>("CreatedAt")
 0149                        .IsRequired()
 0150                        .HasColumnType("TEXT");
 0151
 0152                    b.Property<string>("Hash")
 0153                        .IsRequired()
 0154                        .HasColumnType("TEXT");
 0155
 0156                    b.Property<string>("SerializedMetadata")
 0157                        .HasColumnType("TEXT");
 0158
 0159                    b.Property<string>("SerializedPayload")
 0160                        .HasColumnType("TEXT");
 0161
 0162                    b.Property<string>("WorkflowInstanceId")
 0163                        .IsRequired()
 0164                        .HasColumnType("TEXT");
 0165
 0166                    b.HasKey("BookmarkId");
 0167
 0168                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_StoredBookmark_ActivityInstanceId");
 0169
 0170                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_StoredBookmark_ActivityTypeName");
 0171
 0172                    b.HasIndex(new[] { "ActivityTypeName", "Hash" }, "IX_StoredBookmark_ActivityTypeName_Hash");
 0173
 0174                    b.HasIndex(new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" }, "IX_StoredBookmark_ActivityTy
 0175
 0176                    b.HasIndex(new[] { "CreatedAt" }, "IX_StoredBookmark_CreatedAt");
 0177
 0178                    b.HasIndex(new[] { "Hash" }, "IX_StoredBookmark_Hash");
 0179
 0180                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_StoredBookmark_WorkflowInstanceId");
 0181
 0182                    b.ToTable("Bookmarks");
 0183                });
 184
 0185            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredTrigger", b =>
 0186                {
 0187                    b.Property<string>("Id")
 0188                        .HasColumnType("TEXT");
 0189
 0190                    b.Property<string>("ActivityId")
 0191                        .IsRequired()
 0192                        .HasColumnType("TEXT");
 0193
 0194                    b.Property<string>("Hash")
 0195                        .HasColumnType("TEXT");
 0196
 0197                    b.Property<string>("Name")
 0198                        .IsRequired()
 0199                        .HasColumnType("TEXT");
 0200
 0201                    b.Property<string>("SerializedPayload")
 0202                        .HasColumnType("TEXT");
 0203
 0204                    b.Property<string>("WorkflowDefinitionId")
 0205                        .IsRequired()
 0206                        .HasColumnType("TEXT");
 0207
 0208                    b.Property<string>("WorkflowDefinitionVersionId")
 0209                        .IsRequired()
 0210                        .HasColumnType("TEXT");
 0211
 0212                    b.HasKey("Id");
 0213
 0214                    b.HasIndex("Hash")
 0215                        .HasDatabaseName("IX_StoredTrigger_Hash");
 0216
 0217                    b.HasIndex("Name")
 0218                        .HasDatabaseName("IX_StoredTrigger_Name");
 0219
 0220                    b.HasIndex("WorkflowDefinitionId")
 0221                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionId");
 0222
 0223                    b.HasIndex("WorkflowDefinitionVersionId")
 0224                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionVersionId");
 0225
 0226                    b.ToTable("Triggers");
 0227                });
 228
 0229            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowExecutionLogRecord", b =>
 0230                {
 0231                    b.Property<string>("Id")
 0232                        .HasColumnType("TEXT");
 0233
 0234                    b.Property<string>("ActivityId")
 0235                        .IsRequired()
 0236                        .HasColumnType("TEXT");
 0237
 0238                    b.Property<string>("ActivityInstanceId")
 0239                        .IsRequired()
 0240                        .HasColumnType("TEXT");
 0241
 0242                    b.Property<string>("ActivityName")
 0243                        .HasColumnType("TEXT");
 0244
 0245                    b.Property<string>("ActivityNodeId")
 0246                        .IsRequired()
 0247                        .HasColumnType("TEXT");
 0248
 0249                    b.Property<string>("ActivityType")
 0250                        .IsRequired()
 0251                        .HasColumnType("TEXT");
 0252
 0253                    b.Property<int>("ActivityTypeVersion")
 0254                        .HasColumnType("INTEGER");
 0255
 0256                    b.Property<string>("EventName")
 0257                        .HasColumnType("TEXT");
 0258
 0259                    b.Property<string>("Message")
 0260                        .HasColumnType("TEXT");
 0261
 0262                    b.Property<string>("ParentActivityInstanceId")
 0263                        .HasColumnType("TEXT");
 0264
 0265                    b.Property<long>("Sequence")
 0266                        .HasColumnType("INTEGER");
 0267
 0268                    b.Property<string>("SerializedActivityState")
 0269                        .HasColumnType("TEXT");
 0270
 0271                    b.Property<string>("SerializedPayload")
 0272                        .HasColumnType("TEXT");
 0273
 0274                    b.Property<string>("Source")
 0275                        .HasColumnType("TEXT");
 0276
 0277                    b.Property<string>("Timestamp")
 0278                        .IsRequired()
 0279                        .HasColumnType("TEXT");
 0280
 0281                    b.Property<string>("WorkflowDefinitionId")
 0282                        .IsRequired()
 0283                        .HasColumnType("TEXT");
 0284
 0285                    b.Property<string>("WorkflowDefinitionVersionId")
 0286                        .IsRequired()
 0287                        .HasColumnType("TEXT");
 0288
 0289                    b.Property<string>("WorkflowInstanceId")
 0290                        .IsRequired()
 0291                        .HasColumnType("TEXT");
 0292
 0293                    b.Property<int>("WorkflowVersion")
 0294                        .HasColumnType("INTEGER");
 0295
 0296                    b.HasKey("Id");
 0297
 0298                    b.HasIndex("ActivityId")
 0299                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityId");
 0300
 0301                    b.HasIndex("ActivityInstanceId")
 0302                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityInstanceId");
 0303
 0304                    b.HasIndex("ActivityName")
 0305                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityName");
 0306
 0307                    b.HasIndex("ActivityNodeId")
 0308                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityNodeId");
 0309
 0310                    b.HasIndex("ActivityType")
 0311                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType");
 0312
 0313                    b.HasIndex("ActivityTypeVersion")
 0314                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityTypeVersion");
 0315
 0316                    b.HasIndex("EventName")
 0317                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_EventName");
 0318
 0319                    b.HasIndex("ParentActivityInstanceId")
 0320                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ParentActivityInstanceId");
 0321
 0322                    b.HasIndex("Sequence")
 0323                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Sequence");
 0324
 0325                    b.HasIndex("Timestamp")
 0326                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp");
 0327
 0328                    b.HasIndex("WorkflowDefinitionId")
 0329                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionId");
 0330
 0331                    b.HasIndex("WorkflowDefinitionVersionId")
 0332                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId");
 0333
 0334                    b.HasIndex("WorkflowInstanceId")
 0335                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowInstanceId");
 0336
 0337                    b.HasIndex("WorkflowVersion")
 0338                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowVersion");
 0339
 0340                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 0341                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion");
 0342
 0343                    b.HasIndex("Timestamp", "Sequence")
 0344                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp_Sequence");
 0345
 0346                    b.ToTable("WorkflowExecutionLogRecords");
 0347                });
 348
 0349            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowInboxMessage", b =>
 0350                {
 0351                    b.Property<string>("Id")
 0352                        .HasColumnType("TEXT");
 0353
 0354                    b.Property<string>("ActivityInstanceId")
 0355                        .HasColumnType("TEXT");
 0356
 0357                    b.Property<string>("ActivityTypeName")
 0358                        .IsRequired()
 0359                        .HasColumnType("TEXT");
 0360
 0361                    b.Property<string>("CorrelationId")
 0362                        .HasColumnType("TEXT");
 0363
 0364                    b.Property<string>("CreatedAt")
 0365                        .IsRequired()
 0366                        .HasColumnType("TEXT");
 0367
 0368                    b.Property<string>("ExpiresAt")
 0369                        .IsRequired()
 0370                        .HasColumnType("TEXT");
 0371
 0372                    b.Property<string>("Hash")
 0373                        .IsRequired()
 0374                        .HasColumnType("TEXT");
 0375
 0376                    b.Property<string>("SerializedBookmarkPayload")
 0377                        .HasColumnType("TEXT");
 0378
 0379                    b.Property<string>("SerializedInput")
 0380                        .HasColumnType("TEXT");
 0381
 0382                    b.Property<string>("WorkflowInstanceId")
 0383                        .HasColumnType("TEXT");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_WorkflowInboxMessage_ActivityInstanceId");
 0388
 0389                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_WorkflowInboxMessage_ActivityTypeName");
 0390
 0391                    b.HasIndex(new[] { "CorrelationId" }, "IX_WorkflowInboxMessage_CorrelationId");
 0392
 0393                    b.HasIndex(new[] { "CreatedAt" }, "IX_WorkflowInboxMessage_CreatedAt");
 0394
 0395                    b.HasIndex(new[] { "ExpiresAt" }, "IX_WorkflowInboxMessage_ExpiresAt");
 0396
 0397                    b.HasIndex(new[] { "Hash" }, "IX_WorkflowInboxMessage_Hash");
 0398
 0399                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_WorkflowInboxMessage_WorkflowInstanceId");
 0400
 0401                    b.ToTable("WorkflowInboxMessages");
 0402                });
 403#pragma warning restore 612, 618
 0404        }
 405    }
 406}