< Summary

Line coverage
97%
Covered lines: 699
Uncovered lines: 16
Coverable lines: 715
Total lines: 820
Line coverage: 97.7%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: .ctor(...)50%22100%
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/20231024160952_Initial.cs

#LineLine coverage
 1using Elsa.Persistence.EFCore;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3
 4#nullable disable
 5
 6namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Runtime
 7{
 8    /// <inheritdoc />
 9    public partial class Initial : Migration
 10    {
 11        private readonly IElsaDbContextSchema _schema;
 212        public Initial(IElsaDbContextSchema schema)
 13        {
 214            _schema = schema ?? throw new ArgumentNullException(nameof(schema));
 215        }
 16        /// <inheritdoc />
 17        protected override void Up(MigrationBuilder migrationBuilder)
 18        {
 219            migrationBuilder.EnsureSchema(
 220                name: _schema.Schema);
 21
 222            migrationBuilder.CreateTable(
 223                name: "ActivityExecutionRecords",
 224                schema: _schema.Schema,
 225                columns: table => new
 226                {
 227                    Id = table.Column<string>(type: "text", nullable: false),
 228                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 229                    ActivityId = table.Column<string>(type: "text", nullable: false),
 230                    ActivityNodeId = table.Column<string>(type: "text", nullable: false),
 231                    ActivityType = table.Column<string>(type: "text", nullable: false),
 232                    ActivityTypeVersion = table.Column<int>(type: "integer", nullable: false),
 233                    ActivityName = table.Column<string>(type: "text", nullable: true),
 234                    StartedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 235                    HasBookmarks = table.Column<bool>(type: "boolean", nullable: false),
 236                    Status = table.Column<string>(type: "text", nullable: false),
 237                    CompletedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
 238                    SerializedActivityState = table.Column<string>(type: "text", nullable: true),
 239                    SerializedException = table.Column<string>(type: "text", nullable: true),
 240                    SerializedOutputs = table.Column<string>(type: "text", nullable: true),
 241                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 242                },
 243                constraints: table =>
 244                {
 245                    table.PrimaryKey("PK_ActivityExecutionRecords", x => x.Id);
 446                });
 47
 248            migrationBuilder.CreateTable(
 249                name: "Bookmarks",
 250                schema: _schema.Schema,
 251                columns: table => new
 252                {
 253                    BookmarkId = table.Column<string>(type: "text", nullable: false),
 254                    ActivityTypeName = table.Column<string>(type: "text", nullable: false),
 255                    Hash = table.Column<string>(type: "text", nullable: false),
 256                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 257                    ActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 258                    CorrelationId = table.Column<string>(type: "text", nullable: true),
 259                    CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 260                    SerializedMetadata = table.Column<string>(type: "text", nullable: true),
 261                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 262                },
 263                constraints: table =>
 264                {
 265                    table.PrimaryKey("PK_Bookmarks", x => x.BookmarkId);
 466                });
 67
 268            migrationBuilder.CreateTable(
 269                name: "Triggers",
 270                schema: _schema.Schema,
 271                columns: table => new
 272                {
 273                    Id = table.Column<string>(type: "text", nullable: false),
 274                    WorkflowDefinitionId = table.Column<string>(type: "text", nullable: false),
 275                    WorkflowDefinitionVersionId = table.Column<string>(type: "text", nullable: false),
 276                    Name = table.Column<string>(type: "text", nullable: false),
 277                    ActivityId = table.Column<string>(type: "text", nullable: false),
 278                    Hash = table.Column<string>(type: "text", nullable: true),
 279                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 280                },
 281                constraints: table =>
 282                {
 283                    table.PrimaryKey("PK_Triggers", x => x.Id);
 484                });
 85
 286            migrationBuilder.CreateTable(
 287                name: "WorkflowExecutionLogRecords",
 288                schema: _schema.Schema,
 289                columns: table => new
 290                {
 291                    Id = table.Column<string>(type: "text", nullable: false),
 292                    WorkflowDefinitionId = table.Column<string>(type: "text", nullable: false),
 293                    WorkflowDefinitionVersionId = table.Column<string>(type: "text", nullable: false),
 294                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 295                    WorkflowVersion = table.Column<int>(type: "integer", nullable: false),
 296                    ActivityInstanceId = table.Column<string>(type: "text", nullable: false),
 297                    ParentActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 298                    ActivityId = table.Column<string>(type: "text", nullable: false),
 299                    ActivityType = table.Column<string>(type: "text", nullable: false),
 2100                    ActivityTypeVersion = table.Column<int>(type: "integer", nullable: false),
 2101                    ActivityName = table.Column<string>(type: "text", nullable: true),
 2102                    ActivityNodeId = table.Column<string>(type: "text", nullable: false),
 2103                    Timestamp = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 2104                    Sequence = table.Column<long>(type: "bigint", nullable: false),
 2105                    EventName = table.Column<string>(type: "text", nullable: true),
 2106                    Message = table.Column<string>(type: "text", nullable: true),
 2107                    Source = table.Column<string>(type: "text", nullable: true),
 2108                    SerializedActivityState = table.Column<string>(type: "text", nullable: true),
 2109                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 2110                },
 2111                constraints: table =>
 2112                {
 2113                    table.PrimaryKey("PK_WorkflowExecutionLogRecords", x => x.Id);
 4114                });
 115
 2116            migrationBuilder.CreateTable(
 2117                name: "WorkflowInboxMessages",
 2118                schema: _schema.Schema,
 2119                columns: table => new
 2120                {
 2121                    Id = table.Column<string>(type: "text", nullable: false),
 2122                    ActivityTypeName = table.Column<string>(type: "text", nullable: false),
 2123                    Hash = table.Column<string>(type: "text", nullable: false),
 2124                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: true),
 2125                    CorrelationId = table.Column<string>(type: "text", nullable: true),
 2126                    ActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 2127                    CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 2128                    ExpiresAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 2129                    SerializedBookmarkPayload = table.Column<string>(type: "text", nullable: true),
 2130                    SerializedInput = table.Column<string>(type: "text", nullable: true)
 2131                },
 2132                constraints: table =>
 2133                {
 2134                    table.PrimaryKey("PK_WorkflowInboxMessages", x => x.Id);
 4135                });
 136
 2137            migrationBuilder.CreateIndex(
 2138                name: "IX_ActivityExecutionRecord_ActivityId",
 2139                schema: _schema.Schema,
 2140                table: "ActivityExecutionRecords",
 2141                column: "ActivityId");
 142
 2143            migrationBuilder.CreateIndex(
 2144                name: "IX_ActivityExecutionRecord_ActivityName",
 2145                schema: _schema.Schema,
 2146                table: "ActivityExecutionRecords",
 2147                column: "ActivityName");
 148
 2149            migrationBuilder.CreateIndex(
 2150                name: "IX_ActivityExecutionRecord_ActivityNodeId",
 2151                schema: _schema.Schema,
 2152                table: "ActivityExecutionRecords",
 2153                column: "ActivityNodeId");
 154
 2155            migrationBuilder.CreateIndex(
 2156                name: "IX_ActivityExecutionRecord_ActivityType",
 2157                schema: _schema.Schema,
 2158                table: "ActivityExecutionRecords",
 2159                column: "ActivityType");
 160
 2161            migrationBuilder.CreateIndex(
 2162                name: "IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion",
 2163                schema: _schema.Schema,
 2164                table: "ActivityExecutionRecords",
 2165                columns: new[] { "ActivityType", "ActivityTypeVersion" });
 166
 2167            migrationBuilder.CreateIndex(
 2168                name: "IX_ActivityExecutionRecord_ActivityTypeVersion",
 2169                schema: _schema.Schema,
 2170                table: "ActivityExecutionRecords",
 2171                column: "ActivityTypeVersion");
 172
 2173            migrationBuilder.CreateIndex(
 2174                name: "IX_ActivityExecutionRecord_CompletedAt",
 2175                schema: _schema.Schema,
 2176                table: "ActivityExecutionRecords",
 2177                column: "CompletedAt");
 178
 2179            migrationBuilder.CreateIndex(
 2180                name: "IX_ActivityExecutionRecord_HasBookmarks",
 2181                schema: _schema.Schema,
 2182                table: "ActivityExecutionRecords",
 2183                column: "HasBookmarks");
 184
 2185            migrationBuilder.CreateIndex(
 2186                name: "IX_ActivityExecutionRecord_StartedAt",
 2187                schema: _schema.Schema,
 2188                table: "ActivityExecutionRecords",
 2189                column: "StartedAt");
 190
 2191            migrationBuilder.CreateIndex(
 2192                name: "IX_ActivityExecutionRecord_Status",
 2193                schema: _schema.Schema,
 2194                table: "ActivityExecutionRecords",
 2195                column: "Status");
 196
 2197            migrationBuilder.CreateIndex(
 2198                name: "IX_ActivityExecutionRecord_WorkflowInstanceId",
 2199                schema: _schema.Schema,
 2200                table: "ActivityExecutionRecords",
 2201                column: "WorkflowInstanceId");
 202
 2203            migrationBuilder.CreateIndex(
 2204                name: "IX_StoredBookmark_ActivityInstanceId",
 2205                schema: _schema.Schema,
 2206                table: "Bookmarks",
 2207                column: "ActivityInstanceId");
 208
 2209            migrationBuilder.CreateIndex(
 2210                name: "IX_StoredBookmark_ActivityTypeName",
 2211                schema: _schema.Schema,
 2212                table: "Bookmarks",
 2213                column: "ActivityTypeName");
 214
 2215            migrationBuilder.CreateIndex(
 2216                name: "IX_StoredBookmark_ActivityTypeName_Hash",
 2217                schema: _schema.Schema,
 2218                table: "Bookmarks",
 2219                columns: new[] { "ActivityTypeName", "Hash" });
 220
 2221            migrationBuilder.CreateIndex(
 2222                name: "IX_StoredBookmark_ActivityTypeName_Hash_WorkflowInstanceId",
 2223                schema: _schema.Schema,
 2224                table: "Bookmarks",
 2225                columns: new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" });
 226
 2227            migrationBuilder.CreateIndex(
 2228                name: "IX_StoredBookmark_CreatedAt",
 2229                schema: _schema.Schema,
 2230                table: "Bookmarks",
 2231                column: "CreatedAt");
 232
 2233            migrationBuilder.CreateIndex(
 2234                name: "IX_StoredBookmark_Hash",
 2235                schema: _schema.Schema,
 2236                table: "Bookmarks",
 2237                column: "Hash");
 238
 2239            migrationBuilder.CreateIndex(
 2240                name: "IX_StoredBookmark_WorkflowInstanceId",
 2241                schema: _schema.Schema,
 2242                table: "Bookmarks",
 2243                column: "WorkflowInstanceId");
 244
 2245            migrationBuilder.CreateIndex(
 2246                name: "IX_StoredTrigger_Hash",
 2247                schema: _schema.Schema,
 2248                table: "Triggers",
 2249                column: "Hash");
 250
 2251            migrationBuilder.CreateIndex(
 2252                name: "IX_StoredTrigger_Name",
 2253                schema: _schema.Schema,
 2254                table: "Triggers",
 2255                column: "Name");
 256
 2257            migrationBuilder.CreateIndex(
 2258                name: "IX_StoredTrigger_WorkflowDefinitionId",
 2259                schema: _schema.Schema,
 2260                table: "Triggers",
 2261                column: "WorkflowDefinitionId");
 262
 2263            migrationBuilder.CreateIndex(
 2264                name: "IX_StoredTrigger_WorkflowDefinitionVersionId",
 2265                schema: _schema.Schema,
 2266                table: "Triggers",
 2267                column: "WorkflowDefinitionVersionId");
 268
 2269            migrationBuilder.CreateIndex(
 2270                name: "IX_WorkflowExecutionLogRecord_ActivityId",
 2271                schema: _schema.Schema,
 2272                table: "WorkflowExecutionLogRecords",
 2273                column: "ActivityId");
 274
 2275            migrationBuilder.CreateIndex(
 2276                name: "IX_WorkflowExecutionLogRecord_ActivityInstanceId",
 2277                schema: _schema.Schema,
 2278                table: "WorkflowExecutionLogRecords",
 2279                column: "ActivityInstanceId");
 280
 2281            migrationBuilder.CreateIndex(
 2282                name: "IX_WorkflowExecutionLogRecord_ActivityName",
 2283                schema: _schema.Schema,
 2284                table: "WorkflowExecutionLogRecords",
 2285                column: "ActivityName");
 286
 2287            migrationBuilder.CreateIndex(
 2288                name: "IX_WorkflowExecutionLogRecord_ActivityNodeId",
 2289                schema: _schema.Schema,
 2290                table: "WorkflowExecutionLogRecords",
 2291                column: "ActivityNodeId");
 292
 2293            migrationBuilder.CreateIndex(
 2294                name: "IX_WorkflowExecutionLogRecord_ActivityType",
 2295                schema: _schema.Schema,
 2296                table: "WorkflowExecutionLogRecords",
 2297                column: "ActivityType");
 298
 2299            migrationBuilder.CreateIndex(
 2300                name: "IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion",
 2301                schema: _schema.Schema,
 2302                table: "WorkflowExecutionLogRecords",
 2303                columns: new[] { "ActivityType", "ActivityTypeVersion" });
 304
 2305            migrationBuilder.CreateIndex(
 2306                name: "IX_WorkflowExecutionLogRecord_ActivityTypeVersion",
 2307                schema: _schema.Schema,
 2308                table: "WorkflowExecutionLogRecords",
 2309                column: "ActivityTypeVersion");
 310
 2311            migrationBuilder.CreateIndex(
 2312                name: "IX_WorkflowExecutionLogRecord_EventName",
 2313                schema: _schema.Schema,
 2314                table: "WorkflowExecutionLogRecords",
 2315                column: "EventName");
 316
 2317            migrationBuilder.CreateIndex(
 2318                name: "IX_WorkflowExecutionLogRecord_ParentActivityInstanceId",
 2319                schema: _schema.Schema,
 2320                table: "WorkflowExecutionLogRecords",
 2321                column: "ParentActivityInstanceId");
 322
 2323            migrationBuilder.CreateIndex(
 2324                name: "IX_WorkflowExecutionLogRecord_Sequence",
 2325                schema: _schema.Schema,
 2326                table: "WorkflowExecutionLogRecords",
 2327                column: "Sequence");
 328
 2329            migrationBuilder.CreateIndex(
 2330                name: "IX_WorkflowExecutionLogRecord_Timestamp",
 2331                schema: _schema.Schema,
 2332                table: "WorkflowExecutionLogRecords",
 2333                column: "Timestamp");
 334
 2335            migrationBuilder.CreateIndex(
 2336                name: "IX_WorkflowExecutionLogRecord_Timestamp_Sequence",
 2337                schema: _schema.Schema,
 2338                table: "WorkflowExecutionLogRecords",
 2339                columns: new[] { "Timestamp", "Sequence" });
 340
 2341            migrationBuilder.CreateIndex(
 2342                name: "IX_WorkflowExecutionLogRecord_WorkflowDefinitionId",
 2343                schema: _schema.Schema,
 2344                table: "WorkflowExecutionLogRecords",
 2345                column: "WorkflowDefinitionId");
 346
 2347            migrationBuilder.CreateIndex(
 2348                name: "IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId",
 2349                schema: _schema.Schema,
 2350                table: "WorkflowExecutionLogRecords",
 2351                column: "WorkflowDefinitionVersionId");
 352
 2353            migrationBuilder.CreateIndex(
 2354                name: "IX_WorkflowExecutionLogRecord_WorkflowInstanceId",
 2355                schema: _schema.Schema,
 2356                table: "WorkflowExecutionLogRecords",
 2357                column: "WorkflowInstanceId");
 358
 2359            migrationBuilder.CreateIndex(
 2360                name: "IX_WorkflowExecutionLogRecord_WorkflowVersion",
 2361                schema: _schema.Schema,
 2362                table: "WorkflowExecutionLogRecords",
 2363                column: "WorkflowVersion");
 364
 2365            migrationBuilder.CreateIndex(
 2366                name: "IX_WorkflowInboxMessage_ActivityInstanceId",
 2367                schema: _schema.Schema,
 2368                table: "WorkflowInboxMessages",
 2369                column: "ActivityInstanceId");
 370
 2371            migrationBuilder.CreateIndex(
 2372                name: "IX_WorkflowInboxMessage_ActivityTypeName",
 2373                schema: _schema.Schema,
 2374                table: "WorkflowInboxMessages",
 2375                column: "ActivityTypeName");
 376
 2377            migrationBuilder.CreateIndex(
 2378                name: "IX_WorkflowInboxMessage_CorrelationId",
 2379                schema: _schema.Schema,
 2380                table: "WorkflowInboxMessages",
 2381                column: "CorrelationId");
 382
 2383            migrationBuilder.CreateIndex(
 2384                name: "IX_WorkflowInboxMessage_CreatedAt",
 2385                schema: _schema.Schema,
 2386                table: "WorkflowInboxMessages",
 2387                column: "CreatedAt");
 388
 2389            migrationBuilder.CreateIndex(
 2390                name: "IX_WorkflowInboxMessage_ExpiresAt",
 2391                schema: _schema.Schema,
 2392                table: "WorkflowInboxMessages",
 2393                column: "ExpiresAt");
 394
 2395            migrationBuilder.CreateIndex(
 2396                name: "IX_WorkflowInboxMessage_Hash",
 2397                schema: _schema.Schema,
 2398                table: "WorkflowInboxMessages",
 2399                column: "Hash");
 400
 2401            migrationBuilder.CreateIndex(
 2402                name: "IX_WorkflowInboxMessage_WorkflowInstanceId",
 2403                schema: _schema.Schema,
 2404                table: "WorkflowInboxMessages",
 2405                column: "WorkflowInstanceId");
 2406        }
 407
 408        /// <inheritdoc />
 409        protected override void Down(MigrationBuilder migrationBuilder)
 410        {
 0411            migrationBuilder.DropTable(
 0412                name: "ActivityExecutionRecords",
 0413                schema: _schema.Schema);
 414
 0415            migrationBuilder.DropTable(
 0416                name: "Bookmarks",
 0417                schema: _schema.Schema);
 418
 0419            migrationBuilder.DropTable(
 0420                name: "Triggers",
 0421                schema: _schema.Schema);
 422
 0423            migrationBuilder.DropTable(
 0424                name: "WorkflowExecutionLogRecords",
 0425                schema: _schema.Schema);
 426
 0427            migrationBuilder.DropTable(
 0428                name: "WorkflowInboxMessages",
 0429                schema: _schema.Schema);
 0430        }
 431    }
 432}

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