< Summary

Line coverage
99%
Covered lines: 464
Uncovered lines: 1
Coverable lines: 465
Total lines: 522
Line coverage: 99.7%
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/Runtime/20250222190844_V3_4.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Runtime
 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        {
 21
 222        }
 23
 24        /// <inheritdoc />
 25        protected override void Down(MigrationBuilder migrationBuilder)
 26        {
 27
 028        }
 29    }
 30}

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Migrations/Runtime/20250222190844_V3_4.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Elsa.Persistence.EFCore.Modules.Runtime;
 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.Runtime
 13{
 14    [DbContext(typeof(RuntimeElsaDbContext))]
 15    [Migration("20250222190844_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.KeyValues.Entities.SerializedKeyValuePair", b =>
 130                {
 131                    b.Property<string>("Id")
 132                        .HasColumnType("text");
 133
 134                    b.Property<string>("SerializedValue")
 135                        .IsRequired()
 136                        .HasColumnType("text");
 137
 138                    b.Property<string>("TenantId")
 139                        .HasColumnType("text");
 140
 141                    b.HasKey("Id");
 142
 143                    b.HasIndex(new[] { "TenantId" }, "IX_SerializedKeyValuePair_TenantId");
 144
 145                    b.ToTable("KeyValuePairs", "Elsa");
 246                });
 47
 148            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.ActivityExecutionRecord", b =>
 149                {
 150                    b.Property<string>("Id")
 151                        .HasColumnType("text");
 152
 153                    b.Property<string>("ActivityId")
 154                        .IsRequired()
 155                        .HasColumnType("text");
 156
 157                    b.Property<string>("ActivityName")
 158                        .HasColumnType("text");
 159
 160                    b.Property<string>("ActivityNodeId")
 161                        .IsRequired()
 162                        .HasColumnType("text");
 163
 164                    b.Property<string>("ActivityType")
 165                        .IsRequired()
 166                        .HasColumnType("text");
 167
 168                    b.Property<int>("ActivityTypeVersion")
 169                        .HasColumnType("integer");
 170
 171                    b.Property<DateTimeOffset?>("CompletedAt")
 172                        .HasColumnType("timestamp with time zone");
 173
 174                    b.Property<bool>("HasBookmarks")
 175                        .HasColumnType("boolean");
 176
 177                    b.Property<string>("SerializedActivityState")
 178                        .HasColumnType("text");
 179
 180                    b.Property<string>("SerializedActivityStateCompressionAlgorithm")
 181                        .HasColumnType("text");
 182
 183                    b.Property<string>("SerializedException")
 184                        .HasColumnType("text");
 185
 186                    b.Property<string>("SerializedOutputs")
 187                        .HasColumnType("text");
 188
 189                    b.Property<string>("SerializedPayload")
 190                        .HasColumnType("text");
 191
 192                    b.Property<string>("SerializedProperties")
 193                        .HasColumnType("text");
 194
 195                    b.Property<DateTimeOffset>("StartedAt")
 196                        .HasColumnType("timestamp with time zone");
 197
 198                    b.Property<string>("Status")
 199                        .IsRequired()
 1100                        .HasColumnType("text");
 1101
 1102                    b.Property<string>("TenantId")
 1103                        .HasColumnType("text");
 1104
 1105                    b.Property<string>("WorkflowInstanceId")
 1106                        .IsRequired()
 1107                        .HasColumnType("text");
 1108
 1109                    b.HasKey("Id");
 1110
 1111                    b.HasIndex("ActivityId")
 1112                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityId");
 1113
 1114                    b.HasIndex("ActivityName")
 1115                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityName");
 1116
 1117                    b.HasIndex("ActivityNodeId")
 1118                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityNodeId");
 1119
 1120                    b.HasIndex("ActivityType")
 1121                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType");
 1122
 1123                    b.HasIndex("ActivityTypeVersion")
 1124                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityTypeVersion");
 1125
 1126                    b.HasIndex("CompletedAt")
 1127                        .HasDatabaseName("IX_ActivityExecutionRecord_CompletedAt");
 1128
 1129                    b.HasIndex("HasBookmarks")
 1130                        .HasDatabaseName("IX_ActivityExecutionRecord_HasBookmarks");
 1131
 1132                    b.HasIndex("StartedAt")
 1133                        .HasDatabaseName("IX_ActivityExecutionRecord_StartedAt");
 1134
 1135                    b.HasIndex("Status")
 1136                        .HasDatabaseName("IX_ActivityExecutionRecord_Status");
 1137
 1138                    b.HasIndex("TenantId")
 1139                        .HasDatabaseName("IX_ActivityExecutionRecord_TenantId");
 1140
 1141                    b.HasIndex("WorkflowInstanceId")
 1142                        .HasDatabaseName("IX_ActivityExecutionRecord_WorkflowInstanceId");
 1143
 1144                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 1145                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion");
 1146
 1147                    b.ToTable("ActivityExecutionRecords", "Elsa");
 2148                });
 149
 1150            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.BookmarkQueueItem", b =>
 1151                {
 1152                    b.Property<string>("Id")
 1153                        .HasColumnType("text");
 1154
 1155                    b.Property<string>("ActivityInstanceId")
 1156                        .HasColumnType("text");
 1157
 1158                    b.Property<string>("ActivityTypeName")
 1159                        .HasColumnType("text");
 1160
 1161                    b.Property<string>("BookmarkId")
 1162                        .HasColumnType("text");
 1163
 1164                    b.Property<string>("CorrelationId")
 1165                        .HasColumnType("text");
 1166
 1167                    b.Property<DateTimeOffset>("CreatedAt")
 1168                        .HasColumnType("timestamp with time zone");
 1169
 1170                    b.Property<string>("SerializedOptions")
 1171                        .HasColumnType("text");
 1172
 1173                    b.Property<string>("StimulusHash")
 1174                        .HasColumnType("text");
 1175
 1176                    b.Property<string>("TenantId")
 1177                        .HasColumnType("text");
 1178
 1179                    b.Property<string>("WorkflowInstanceId")
 1180                        .HasColumnType("text");
 1181
 1182                    b.HasKey("Id");
 1183
 1184                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_BookmarkQueueItem_ActivityInstanceId");
 1185
 1186                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_BookmarkQueueItem_ActivityTypeName");
 1187
 1188                    b.HasIndex(new[] { "BookmarkId" }, "IX_BookmarkQueueItem_BookmarkId");
 1189
 1190                    b.HasIndex(new[] { "CorrelationId" }, "IX_BookmarkQueueItem_CorrelationId");
 1191
 1192                    b.HasIndex(new[] { "CreatedAt" }, "IX_BookmarkQueueItem_CreatedAt");
 1193
 1194                    b.HasIndex(new[] { "StimulusHash" }, "IX_BookmarkQueueItem_StimulusHash");
 1195
 1196                    b.HasIndex(new[] { "TenantId" }, "IX_BookmarkQueueItem_TenantId");
 1197
 1198                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_BookmarkQueueItem_WorkflowInstanceId");
 1199
 1200                    b.ToTable("BookmarkQueueItems", "Elsa");
 2201                });
 202
 1203            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredBookmark", b =>
 1204                {
 1205                    b.Property<string>("Id")
 1206                        .HasColumnType("text");
 1207
 1208                    b.Property<string>("ActivityInstanceId")
 1209                        .HasColumnType("text");
 1210
 1211                    b.Property<string>("ActivityTypeName")
 1212                        .IsRequired()
 1213                        .HasColumnType("text");
 1214
 1215                    b.Property<string>("CorrelationId")
 1216                        .HasColumnType("text");
 1217
 1218                    b.Property<DateTimeOffset>("CreatedAt")
 1219                        .HasColumnType("timestamp with time zone");
 1220
 1221                    b.Property<string>("Hash")
 1222                        .IsRequired()
 1223                        .HasColumnType("text");
 1224
 1225                    b.Property<string>("SerializedMetadata")
 1226                        .HasColumnType("text");
 1227
 1228                    b.Property<string>("SerializedPayload")
 1229                        .HasColumnType("text");
 1230
 1231                    b.Property<string>("TenantId")
 1232                        .HasColumnType("text");
 1233
 1234                    b.Property<string>("WorkflowInstanceId")
 1235                        .IsRequired()
 1236                        .HasColumnType("text");
 1237
 1238                    b.HasKey("Id");
 1239
 1240                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_StoredBookmark_ActivityInstanceId");
 1241
 1242                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_StoredBookmark_ActivityTypeName");
 1243
 1244                    b.HasIndex(new[] { "ActivityTypeName", "Hash" }, "IX_StoredBookmark_ActivityTypeName_Hash");
 1245
 1246                    b.HasIndex(new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" }, "IX_StoredBookmark_ActivityTy
 1247
 1248                    b.HasIndex(new[] { "CreatedAt" }, "IX_StoredBookmark_CreatedAt");
 1249
 1250                    b.HasIndex(new[] { "Hash" }, "IX_StoredBookmark_Hash");
 1251
 1252                    b.HasIndex(new[] { "TenantId" }, "IX_StoredBookmark_TenantId");
 1253
 1254                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_StoredBookmark_WorkflowInstanceId");
 1255
 1256                    b.ToTable("Bookmarks", "Elsa");
 2257                });
 258
 1259            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredTrigger", b =>
 1260                {
 1261                    b.Property<string>("Id")
 1262                        .HasColumnType("text");
 1263
 1264                    b.Property<string>("ActivityId")
 1265                        .IsRequired()
 1266                        .HasColumnType("text");
 1267
 1268                    b.Property<string>("Hash")
 1269                        .HasColumnType("text");
 1270
 1271                    b.Property<string>("Name")
 1272                        .IsRequired()
 1273                        .HasColumnType("text");
 1274
 1275                    b.Property<string>("SerializedPayload")
 1276                        .HasColumnType("text");
 1277
 1278                    b.Property<string>("TenantId")
 1279                        .HasColumnType("text");
 1280
 1281                    b.Property<string>("WorkflowDefinitionId")
 1282                        .IsRequired()
 1283                        .HasColumnType("text");
 1284
 1285                    b.Property<string>("WorkflowDefinitionVersionId")
 1286                        .IsRequired()
 1287                        .HasColumnType("text");
 1288
 1289                    b.HasKey("Id");
 1290
 1291                    b.HasIndex("Hash")
 1292                        .HasDatabaseName("IX_StoredTrigger_Hash");
 1293
 1294                    b.HasIndex("Name")
 1295                        .HasDatabaseName("IX_StoredTrigger_Name");
 1296
 1297                    b.HasIndex("TenantId")
 1298                        .HasDatabaseName("IX_StoredTrigger_TenantId");
 1299
 1300                    b.HasIndex("WorkflowDefinitionId")
 1301                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionId");
 1302
 1303                    b.HasIndex("WorkflowDefinitionVersionId")
 1304                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionVersionId");
 1305
 1306                    b.ToTable("Triggers", "Elsa");
 2307                });
 308
 1309            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowExecutionLogRecord", b =>
 1310                {
 1311                    b.Property<string>("Id")
 1312                        .HasColumnType("text");
 1313
 1314                    b.Property<string>("ActivityId")
 1315                        .IsRequired()
 1316                        .HasColumnType("text");
 1317
 1318                    b.Property<string>("ActivityInstanceId")
 1319                        .IsRequired()
 1320                        .HasColumnType("text");
 1321
 1322                    b.Property<string>("ActivityName")
 1323                        .HasColumnType("text");
 1324
 1325                    b.Property<string>("ActivityNodeId")
 1326                        .IsRequired()
 1327                        .HasColumnType("text");
 1328
 1329                    b.Property<string>("ActivityType")
 1330                        .IsRequired()
 1331                        .HasColumnType("text");
 1332
 1333                    b.Property<int>("ActivityTypeVersion")
 1334                        .HasColumnType("integer");
 1335
 1336                    b.Property<string>("EventName")
 1337                        .HasColumnType("text");
 1338
 1339                    b.Property<string>("Message")
 1340                        .HasColumnType("text");
 1341
 1342                    b.Property<string>("ParentActivityInstanceId")
 1343                        .HasColumnType("text");
 1344
 1345                    b.Property<long>("Sequence")
 1346                        .HasColumnType("bigint");
 1347
 1348                    b.Property<string>("SerializedActivityState")
 1349                        .HasColumnType("text");
 1350
 1351                    b.Property<string>("SerializedPayload")
 1352                        .HasColumnType("text");
 1353
 1354                    b.Property<string>("Source")
 1355                        .HasColumnType("text");
 1356
 1357                    b.Property<string>("TenantId")
 1358                        .HasColumnType("text");
 1359
 1360                    b.Property<DateTimeOffset>("Timestamp")
 1361                        .HasColumnType("timestamp with time zone");
 1362
 1363                    b.Property<string>("WorkflowDefinitionId")
 1364                        .IsRequired()
 1365                        .HasColumnType("text");
 1366
 1367                    b.Property<string>("WorkflowDefinitionVersionId")
 1368                        .IsRequired()
 1369                        .HasColumnType("text");
 1370
 1371                    b.Property<string>("WorkflowInstanceId")
 1372                        .IsRequired()
 1373                        .HasColumnType("text");
 1374
 1375                    b.Property<int>("WorkflowVersion")
 1376                        .HasColumnType("integer");
 1377
 1378                    b.HasKey("Id");
 1379
 1380                    b.HasIndex("ActivityId")
 1381                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityId");
 1382
 1383                    b.HasIndex("ActivityInstanceId")
 1384                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityInstanceId");
 1385
 1386                    b.HasIndex("ActivityName")
 1387                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityName");
 1388
 1389                    b.HasIndex("ActivityNodeId")
 1390                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityNodeId");
 1391
 1392                    b.HasIndex("ActivityType")
 1393                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType");
 1394
 1395                    b.HasIndex("ActivityTypeVersion")
 1396                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityTypeVersion");
 1397
 1398                    b.HasIndex("EventName")
 1399                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_EventName");
 1400
 1401                    b.HasIndex("ParentActivityInstanceId")
 1402                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ParentActivityInstanceId");
 1403
 1404                    b.HasIndex("Sequence")
 1405                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Sequence");
 1406
 1407                    b.HasIndex("TenantId")
 1408                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_TenantId");
 1409
 1410                    b.HasIndex("Timestamp")
 1411                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp");
 1412
 1413                    b.HasIndex("WorkflowDefinitionId")
 1414                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionId");
 1415
 1416                    b.HasIndex("WorkflowDefinitionVersionId")
 1417                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId");
 1418
 1419                    b.HasIndex("WorkflowInstanceId")
 1420                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowInstanceId");
 1421
 1422                    b.HasIndex("WorkflowVersion")
 1423                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowVersion");
 1424
 1425                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 1426                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion");
 1427
 1428                    b.HasIndex("Timestamp", "Sequence")
 1429                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp_Sequence");
 1430
 1431                    b.ToTable("WorkflowExecutionLogRecords", "Elsa");
 2432                });
 433
 1434            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowInboxMessage", b =>
 1435                {
 1436                    b.Property<string>("Id")
 1437                        .HasColumnType("text");
 1438
 1439                    b.Property<string>("ActivityInstanceId")
 1440                        .HasColumnType("text");
 1441
 1442                    b.Property<string>("ActivityTypeName")
 1443                        .IsRequired()
 1444                        .HasColumnType("text");
 1445
 1446                    b.Property<string>("CorrelationId")
 1447                        .HasColumnType("text");
 1448
 1449                    b.Property<DateTimeOffset>("CreatedAt")
 1450                        .HasColumnType("timestamp with time zone");
 1451
 1452                    b.Property<DateTimeOffset>("ExpiresAt")
 1453                        .HasColumnType("timestamp with time zone");
 1454
 1455                    b.Property<string>("Hash")
 1456                        .IsRequired()
 1457                        .HasColumnType("text");
 1458
 1459                    b.Property<string>("SerializedBookmarkPayload")
 1460                        .HasColumnType("text");
 1461
 1462                    b.Property<string>("SerializedInput")
 1463                        .HasColumnType("text");
 1464
 1465                    b.Property<string>("TenantId")
 1466                        .HasColumnType("text");
 1467
 1468                    b.Property<string>("WorkflowInstanceId")
 1469                        .HasColumnType("text");
 1470
 1471                    b.HasKey("Id");
 1472
 1473                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_WorkflowInboxMessage_ActivityInstanceId");
 1474
 1475                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_WorkflowInboxMessage_ActivityTypeName");
 1476
 1477                    b.HasIndex(new[] { "CorrelationId" }, "IX_WorkflowInboxMessage_CorrelationId");
 1478
 1479                    b.HasIndex(new[] { "CreatedAt" }, "IX_WorkflowInboxMessage_CreatedAt");
 1480
 1481                    b.HasIndex(new[] { "ExpiresAt" }, "IX_WorkflowInboxMessage_ExpiresAt");
 1482
 1483                    b.HasIndex(new[] { "Hash" }, "IX_WorkflowInboxMessage_Hash");
 1484
 1485                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_WorkflowInboxMessage_WorkflowInstanceId");
 1486
 1487                    b.ToTable("WorkflowInboxMessages", "Elsa");
 2488                });
 489#pragma warning restore 612, 618
 1490        }
 491    }
 492}