< Summary

Line coverage
99%
Covered lines: 381
Uncovered lines: 1
Coverable lines: 382
Total lines: 438
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/20240610184748_V3_2.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_2 : Migration
 9    {
 10        private readonly Elsa.Persistence.EFCore.IElsaDbContextSchema _schema;
 11
 12        /// <inheritdoc />
 213        public V3_2(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/20240610184748_V3_2.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("20240610184748_V3_2")]
 16    partial class V3_2
 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", "7.0.20")
 125                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 26
 127            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 28
 129            modelBuilder.Entity("Elsa.KeyValues.Entities.SerializedKeyValuePair", b =>
 130                {
 131                    b.Property<string>("Key")
 132                        .HasColumnType("text");
 133
 134                    b.Property<string>("SerializedValue")
 135                        .IsRequired()
 136                        .HasColumnType("text");
 137
 138                    b.HasKey("Key");
 139
 140                    b.ToTable("KeyValuePairs", "Elsa");
 241                });
 42
 143            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.ActivityExecutionRecord", b =>
 144                {
 145                    b.Property<string>("Id")
 146                        .HasColumnType("text");
 147
 148                    b.Property<string>("ActivityId")
 149                        .IsRequired()
 150                        .HasColumnType("text");
 151
 152                    b.Property<string>("ActivityName")
 153                        .HasColumnType("text");
 154
 155                    b.Property<string>("ActivityNodeId")
 156                        .IsRequired()
 157                        .HasColumnType("text");
 158
 159                    b.Property<string>("ActivityType")
 160                        .IsRequired()
 161                        .HasColumnType("text");
 162
 163                    b.Property<int>("ActivityTypeVersion")
 164                        .HasColumnType("integer");
 165
 166                    b.Property<DateTimeOffset?>("CompletedAt")
 167                        .HasColumnType("timestamp with time zone");
 168
 169                    b.Property<bool>("HasBookmarks")
 170                        .HasColumnType("boolean");
 171
 172                    b.Property<string>("SerializedActivityState")
 173                        .HasColumnType("text");
 174
 175                    b.Property<string>("SerializedActivityStateCompressionAlgorithm")
 176                        .HasColumnType("text");
 177
 178                    b.Property<string>("SerializedException")
 179                        .HasColumnType("text");
 180
 181                    b.Property<string>("SerializedOutputs")
 182                        .HasColumnType("text");
 183
 184                    b.Property<string>("SerializedPayload")
 185                        .HasColumnType("text");
 186
 187                    b.Property<string>("SerializedProperties")
 188                        .HasColumnType("text");
 189
 190                    b.Property<DateTimeOffset>("StartedAt")
 191                        .HasColumnType("timestamp with time zone");
 192
 193                    b.Property<string>("Status")
 194                        .IsRequired()
 195                        .HasColumnType("text");
 196
 197                    b.Property<string>("WorkflowInstanceId")
 198                        .IsRequired()
 199                        .HasColumnType("text");
 1100
 1101                    b.HasKey("Id");
 1102
 1103                    b.HasIndex("ActivityId")
 1104                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityId");
 1105
 1106                    b.HasIndex("ActivityName")
 1107                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityName");
 1108
 1109                    b.HasIndex("ActivityNodeId")
 1110                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityNodeId");
 1111
 1112                    b.HasIndex("ActivityType")
 1113                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType");
 1114
 1115                    b.HasIndex("ActivityTypeVersion")
 1116                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityTypeVersion");
 1117
 1118                    b.HasIndex("CompletedAt")
 1119                        .HasDatabaseName("IX_ActivityExecutionRecord_CompletedAt");
 1120
 1121                    b.HasIndex("HasBookmarks")
 1122                        .HasDatabaseName("IX_ActivityExecutionRecord_HasBookmarks");
 1123
 1124                    b.HasIndex("StartedAt")
 1125                        .HasDatabaseName("IX_ActivityExecutionRecord_StartedAt");
 1126
 1127                    b.HasIndex("Status")
 1128                        .HasDatabaseName("IX_ActivityExecutionRecord_Status");
 1129
 1130                    b.HasIndex("WorkflowInstanceId")
 1131                        .HasDatabaseName("IX_ActivityExecutionRecord_WorkflowInstanceId");
 1132
 1133                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 1134                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion");
 1135
 1136                    b.ToTable("ActivityExecutionRecords", "Elsa");
 2137                });
 138
 1139            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredBookmark", b =>
 1140                {
 1141                    b.Property<string>("BookmarkId")
 1142                        .HasColumnType("text");
 1143
 1144                    b.Property<string>("ActivityInstanceId")
 1145                        .HasColumnType("text");
 1146
 1147                    b.Property<string>("ActivityTypeName")
 1148                        .IsRequired()
 1149                        .HasColumnType("text");
 1150
 1151                    b.Property<string>("CorrelationId")
 1152                        .HasColumnType("text");
 1153
 1154                    b.Property<DateTimeOffset>("CreatedAt")
 1155                        .HasColumnType("timestamp with time zone");
 1156
 1157                    b.Property<string>("Hash")
 1158                        .IsRequired()
 1159                        .HasColumnType("text");
 1160
 1161                    b.Property<string>("SerializedMetadata")
 1162                        .HasColumnType("text");
 1163
 1164                    b.Property<string>("SerializedPayload")
 1165                        .HasColumnType("text");
 1166
 1167                    b.Property<string>("WorkflowInstanceId")
 1168                        .IsRequired()
 1169                        .HasColumnType("text");
 1170
 1171                    b.HasKey("BookmarkId");
 1172
 1173                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_StoredBookmark_ActivityInstanceId");
 1174
 1175                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_StoredBookmark_ActivityTypeName");
 1176
 1177                    b.HasIndex(new[] { "ActivityTypeName", "Hash" }, "IX_StoredBookmark_ActivityTypeName_Hash");
 1178
 1179                    b.HasIndex(new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" }, "IX_StoredBookmark_ActivityTy
 1180
 1181                    b.HasIndex(new[] { "CreatedAt" }, "IX_StoredBookmark_CreatedAt");
 1182
 1183                    b.HasIndex(new[] { "Hash" }, "IX_StoredBookmark_Hash");
 1184
 1185                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_StoredBookmark_WorkflowInstanceId");
 1186
 1187                    b.ToTable("Bookmarks", "Elsa");
 2188                });
 189
 1190            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredTrigger", b =>
 1191                {
 1192                    b.Property<string>("Id")
 1193                        .HasColumnType("text");
 1194
 1195                    b.Property<string>("ActivityId")
 1196                        .IsRequired()
 1197                        .HasColumnType("text");
 1198
 1199                    b.Property<string>("Hash")
 1200                        .HasColumnType("text");
 1201
 1202                    b.Property<string>("Name")
 1203                        .IsRequired()
 1204                        .HasColumnType("text");
 1205
 1206                    b.Property<string>("SerializedPayload")
 1207                        .HasColumnType("text");
 1208
 1209                    b.Property<string>("WorkflowDefinitionId")
 1210                        .IsRequired()
 1211                        .HasColumnType("text");
 1212
 1213                    b.Property<string>("WorkflowDefinitionVersionId")
 1214                        .IsRequired()
 1215                        .HasColumnType("text");
 1216
 1217                    b.HasKey("Id");
 1218
 1219                    b.HasIndex("Hash")
 1220                        .HasDatabaseName("IX_StoredTrigger_Hash");
 1221
 1222                    b.HasIndex("Name")
 1223                        .HasDatabaseName("IX_StoredTrigger_Name");
 1224
 1225                    b.HasIndex("WorkflowDefinitionId")
 1226                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionId");
 1227
 1228                    b.HasIndex("WorkflowDefinitionVersionId")
 1229                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionVersionId");
 1230
 1231                    b.ToTable("Triggers", "Elsa");
 2232                });
 233
 1234            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowExecutionLogRecord", b =>
 1235                {
 1236                    b.Property<string>("Id")
 1237                        .HasColumnType("text");
 1238
 1239                    b.Property<string>("ActivityId")
 1240                        .IsRequired()
 1241                        .HasColumnType("text");
 1242
 1243                    b.Property<string>("ActivityInstanceId")
 1244                        .IsRequired()
 1245                        .HasColumnType("text");
 1246
 1247                    b.Property<string>("ActivityName")
 1248                        .HasColumnType("text");
 1249
 1250                    b.Property<string>("ActivityNodeId")
 1251                        .IsRequired()
 1252                        .HasColumnType("text");
 1253
 1254                    b.Property<string>("ActivityType")
 1255                        .IsRequired()
 1256                        .HasColumnType("text");
 1257
 1258                    b.Property<int>("ActivityTypeVersion")
 1259                        .HasColumnType("integer");
 1260
 1261                    b.Property<string>("EventName")
 1262                        .HasColumnType("text");
 1263
 1264                    b.Property<string>("Message")
 1265                        .HasColumnType("text");
 1266
 1267                    b.Property<string>("ParentActivityInstanceId")
 1268                        .HasColumnType("text");
 1269
 1270                    b.Property<long>("Sequence")
 1271                        .HasColumnType("bigint");
 1272
 1273                    b.Property<string>("SerializedActivityState")
 1274                        .HasColumnType("text");
 1275
 1276                    b.Property<string>("SerializedPayload")
 1277                        .HasColumnType("text");
 1278
 1279                    b.Property<string>("Source")
 1280                        .HasColumnType("text");
 1281
 1282                    b.Property<DateTimeOffset>("Timestamp")
 1283                        .HasColumnType("timestamp with time zone");
 1284
 1285                    b.Property<string>("WorkflowDefinitionId")
 1286                        .IsRequired()
 1287                        .HasColumnType("text");
 1288
 1289                    b.Property<string>("WorkflowDefinitionVersionId")
 1290                        .IsRequired()
 1291                        .HasColumnType("text");
 1292
 1293                    b.Property<string>("WorkflowInstanceId")
 1294                        .IsRequired()
 1295                        .HasColumnType("text");
 1296
 1297                    b.Property<int>("WorkflowVersion")
 1298                        .HasColumnType("integer");
 1299
 1300                    b.HasKey("Id");
 1301
 1302                    b.HasIndex("ActivityId")
 1303                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityId");
 1304
 1305                    b.HasIndex("ActivityInstanceId")
 1306                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityInstanceId");
 1307
 1308                    b.HasIndex("ActivityName")
 1309                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityName");
 1310
 1311                    b.HasIndex("ActivityNodeId")
 1312                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityNodeId");
 1313
 1314                    b.HasIndex("ActivityType")
 1315                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType");
 1316
 1317                    b.HasIndex("ActivityTypeVersion")
 1318                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityTypeVersion");
 1319
 1320                    b.HasIndex("EventName")
 1321                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_EventName");
 1322
 1323                    b.HasIndex("ParentActivityInstanceId")
 1324                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ParentActivityInstanceId");
 1325
 1326                    b.HasIndex("Sequence")
 1327                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Sequence");
 1328
 1329                    b.HasIndex("Timestamp")
 1330                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp");
 1331
 1332                    b.HasIndex("WorkflowDefinitionId")
 1333                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionId");
 1334
 1335                    b.HasIndex("WorkflowDefinitionVersionId")
 1336                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId");
 1337
 1338                    b.HasIndex("WorkflowInstanceId")
 1339                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowInstanceId");
 1340
 1341                    b.HasIndex("WorkflowVersion")
 1342                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowVersion");
 1343
 1344                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 1345                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion");
 1346
 1347                    b.HasIndex("Timestamp", "Sequence")
 1348                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp_Sequence");
 1349
 1350                    b.ToTable("WorkflowExecutionLogRecords", "Elsa");
 2351                });
 352
 1353            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowInboxMessage", b =>
 1354                {
 1355                    b.Property<string>("Id")
 1356                        .HasColumnType("text");
 1357
 1358                    b.Property<string>("ActivityInstanceId")
 1359                        .HasColumnType("text");
 1360
 1361                    b.Property<string>("ActivityTypeName")
 1362                        .IsRequired()
 1363                        .HasColumnType("text");
 1364
 1365                    b.Property<string>("CorrelationId")
 1366                        .HasColumnType("text");
 1367
 1368                    b.Property<DateTimeOffset>("CreatedAt")
 1369                        .HasColumnType("timestamp with time zone");
 1370
 1371                    b.Property<DateTimeOffset>("ExpiresAt")
 1372                        .HasColumnType("timestamp with time zone");
 1373
 1374                    b.Property<string>("Hash")
 1375                        .IsRequired()
 1376                        .HasColumnType("text");
 1377
 1378                    b.Property<string>("SerializedBookmarkPayload")
 1379                        .HasColumnType("text");
 1380
 1381                    b.Property<string>("SerializedInput")
 1382                        .HasColumnType("text");
 1383
 1384                    b.Property<string>("WorkflowInstanceId")
 1385                        .HasColumnType("text");
 1386
 1387                    b.HasKey("Id");
 1388
 1389                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_WorkflowInboxMessage_ActivityInstanceId");
 1390
 1391                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_WorkflowInboxMessage_ActivityTypeName");
 1392
 1393                    b.HasIndex(new[] { "CorrelationId" }, "IX_WorkflowInboxMessage_CorrelationId");
 1394
 1395                    b.HasIndex(new[] { "CreatedAt" }, "IX_WorkflowInboxMessage_CreatedAt");
 1396
 1397                    b.HasIndex(new[] { "ExpiresAt" }, "IX_WorkflowInboxMessage_ExpiresAt");
 1398
 1399                    b.HasIndex(new[] { "Hash" }, "IX_WorkflowInboxMessage_Hash");
 1400
 1401                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_WorkflowInboxMessage_WorkflowInstanceId");
 1402
 1403                    b.ToTable("WorkflowInboxMessages", "Elsa");
 2404                });
 405#pragma warning restore 612, 618
 1406        }
 407    }
 408}