< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 715
Coverable lines: 715
Total lines: 820
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: .ctor(...)0%620%
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.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;
 012        public Initial(IElsaDbContextSchema schema)
 13        {
 014            _schema = schema ?? throw new ArgumentNullException(nameof(schema));
 015        }
 16        /// <inheritdoc />
 17        protected override void Up(MigrationBuilder migrationBuilder)
 18        {
 019            migrationBuilder.EnsureSchema(
 020                name: _schema.Schema);
 21
 022            migrationBuilder.CreateTable(
 023                name: "ActivityExecutionRecords",
 024                schema: _schema.Schema,
 025                columns: table => new
 026                {
 027                    Id = table.Column<string>(type: "text", nullable: false),
 028                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 029                    ActivityId = table.Column<string>(type: "text", nullable: false),
 030                    ActivityNodeId = table.Column<string>(type: "text", nullable: false),
 031                    ActivityType = table.Column<string>(type: "text", nullable: false),
 032                    ActivityTypeVersion = table.Column<int>(type: "integer", nullable: false),
 033                    ActivityName = table.Column<string>(type: "text", nullable: true),
 034                    StartedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 035                    HasBookmarks = table.Column<bool>(type: "boolean", nullable: false),
 036                    Status = table.Column<string>(type: "text", nullable: false),
 037                    CompletedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
 038                    SerializedActivityState = table.Column<string>(type: "text", nullable: true),
 039                    SerializedException = table.Column<string>(type: "text", nullable: true),
 040                    SerializedOutputs = table.Column<string>(type: "text", nullable: true),
 041                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 042                },
 043                constraints: table =>
 044                {
 045                    table.PrimaryKey("PK_ActivityExecutionRecords", x => x.Id);
 046                });
 47
 048            migrationBuilder.CreateTable(
 049                name: "Bookmarks",
 050                schema: _schema.Schema,
 051                columns: table => new
 052                {
 053                    BookmarkId = table.Column<string>(type: "text", nullable: false),
 054                    ActivityTypeName = table.Column<string>(type: "text", nullable: false),
 055                    Hash = table.Column<string>(type: "text", nullable: false),
 056                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 057                    ActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 058                    CorrelationId = table.Column<string>(type: "text", nullable: true),
 059                    CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 060                    SerializedMetadata = table.Column<string>(type: "text", nullable: true),
 061                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 062                },
 063                constraints: table =>
 064                {
 065                    table.PrimaryKey("PK_Bookmarks", x => x.BookmarkId);
 066                });
 67
 068            migrationBuilder.CreateTable(
 069                name: "Triggers",
 070                schema: _schema.Schema,
 071                columns: table => new
 072                {
 073                    Id = table.Column<string>(type: "text", nullable: false),
 074                    WorkflowDefinitionId = table.Column<string>(type: "text", nullable: false),
 075                    WorkflowDefinitionVersionId = table.Column<string>(type: "text", nullable: false),
 076                    Name = table.Column<string>(type: "text", nullable: false),
 077                    ActivityId = table.Column<string>(type: "text", nullable: false),
 078                    Hash = table.Column<string>(type: "text", nullable: true),
 079                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 080                },
 081                constraints: table =>
 082                {
 083                    table.PrimaryKey("PK_Triggers", x => x.Id);
 084                });
 85
 086            migrationBuilder.CreateTable(
 087                name: "WorkflowExecutionLogRecords",
 088                schema: _schema.Schema,
 089                columns: table => new
 090                {
 091                    Id = table.Column<string>(type: "text", nullable: false),
 092                    WorkflowDefinitionId = table.Column<string>(type: "text", nullable: false),
 093                    WorkflowDefinitionVersionId = table.Column<string>(type: "text", nullable: false),
 094                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: false),
 095                    WorkflowVersion = table.Column<int>(type: "integer", nullable: false),
 096                    ActivityInstanceId = table.Column<string>(type: "text", nullable: false),
 097                    ParentActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 098                    ActivityId = table.Column<string>(type: "text", nullable: false),
 099                    ActivityType = table.Column<string>(type: "text", nullable: false),
 0100                    ActivityTypeVersion = table.Column<int>(type: "integer", nullable: false),
 0101                    ActivityName = table.Column<string>(type: "text", nullable: true),
 0102                    ActivityNodeId = table.Column<string>(type: "text", nullable: false),
 0103                    Timestamp = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 0104                    Sequence = table.Column<long>(type: "bigint", nullable: false),
 0105                    EventName = table.Column<string>(type: "text", nullable: true),
 0106                    Message = table.Column<string>(type: "text", nullable: true),
 0107                    Source = table.Column<string>(type: "text", nullable: true),
 0108                    SerializedActivityState = table.Column<string>(type: "text", nullable: true),
 0109                    SerializedPayload = table.Column<string>(type: "text", nullable: true)
 0110                },
 0111                constraints: table =>
 0112                {
 0113                    table.PrimaryKey("PK_WorkflowExecutionLogRecords", x => x.Id);
 0114                });
 115
 0116            migrationBuilder.CreateTable(
 0117                name: "WorkflowInboxMessages",
 0118                schema: _schema.Schema,
 0119                columns: table => new
 0120                {
 0121                    Id = table.Column<string>(type: "text", nullable: false),
 0122                    ActivityTypeName = table.Column<string>(type: "text", nullable: false),
 0123                    Hash = table.Column<string>(type: "text", nullable: false),
 0124                    WorkflowInstanceId = table.Column<string>(type: "text", nullable: true),
 0125                    CorrelationId = table.Column<string>(type: "text", nullable: true),
 0126                    ActivityInstanceId = table.Column<string>(type: "text", nullable: true),
 0127                    CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 0128                    ExpiresAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
 0129                    SerializedBookmarkPayload = table.Column<string>(type: "text", nullable: true),
 0130                    SerializedInput = table.Column<string>(type: "text", nullable: true)
 0131                },
 0132                constraints: table =>
 0133                {
 0134                    table.PrimaryKey("PK_WorkflowInboxMessages", x => x.Id);
 0135                });
 136
 0137            migrationBuilder.CreateIndex(
 0138                name: "IX_ActivityExecutionRecord_ActivityId",
 0139                schema: _schema.Schema,
 0140                table: "ActivityExecutionRecords",
 0141                column: "ActivityId");
 142
 0143            migrationBuilder.CreateIndex(
 0144                name: "IX_ActivityExecutionRecord_ActivityName",
 0145                schema: _schema.Schema,
 0146                table: "ActivityExecutionRecords",
 0147                column: "ActivityName");
 148
 0149            migrationBuilder.CreateIndex(
 0150                name: "IX_ActivityExecutionRecord_ActivityNodeId",
 0151                schema: _schema.Schema,
 0152                table: "ActivityExecutionRecords",
 0153                column: "ActivityNodeId");
 154
 0155            migrationBuilder.CreateIndex(
 0156                name: "IX_ActivityExecutionRecord_ActivityType",
 0157                schema: _schema.Schema,
 0158                table: "ActivityExecutionRecords",
 0159                column: "ActivityType");
 160
 0161            migrationBuilder.CreateIndex(
 0162                name: "IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion",
 0163                schema: _schema.Schema,
 0164                table: "ActivityExecutionRecords",
 0165                columns: new[] { "ActivityType", "ActivityTypeVersion" });
 166
 0167            migrationBuilder.CreateIndex(
 0168                name: "IX_ActivityExecutionRecord_ActivityTypeVersion",
 0169                schema: _schema.Schema,
 0170                table: "ActivityExecutionRecords",
 0171                column: "ActivityTypeVersion");
 172
 0173            migrationBuilder.CreateIndex(
 0174                name: "IX_ActivityExecutionRecord_CompletedAt",
 0175                schema: _schema.Schema,
 0176                table: "ActivityExecutionRecords",
 0177                column: "CompletedAt");
 178
 0179            migrationBuilder.CreateIndex(
 0180                name: "IX_ActivityExecutionRecord_HasBookmarks",
 0181                schema: _schema.Schema,
 0182                table: "ActivityExecutionRecords",
 0183                column: "HasBookmarks");
 184
 0185            migrationBuilder.CreateIndex(
 0186                name: "IX_ActivityExecutionRecord_StartedAt",
 0187                schema: _schema.Schema,
 0188                table: "ActivityExecutionRecords",
 0189                column: "StartedAt");
 190
 0191            migrationBuilder.CreateIndex(
 0192                name: "IX_ActivityExecutionRecord_Status",
 0193                schema: _schema.Schema,
 0194                table: "ActivityExecutionRecords",
 0195                column: "Status");
 196
 0197            migrationBuilder.CreateIndex(
 0198                name: "IX_ActivityExecutionRecord_WorkflowInstanceId",
 0199                schema: _schema.Schema,
 0200                table: "ActivityExecutionRecords",
 0201                column: "WorkflowInstanceId");
 202
 0203            migrationBuilder.CreateIndex(
 0204                name: "IX_StoredBookmark_ActivityInstanceId",
 0205                schema: _schema.Schema,
 0206                table: "Bookmarks",
 0207                column: "ActivityInstanceId");
 208
 0209            migrationBuilder.CreateIndex(
 0210                name: "IX_StoredBookmark_ActivityTypeName",
 0211                schema: _schema.Schema,
 0212                table: "Bookmarks",
 0213                column: "ActivityTypeName");
 214
 0215            migrationBuilder.CreateIndex(
 0216                name: "IX_StoredBookmark_ActivityTypeName_Hash",
 0217                schema: _schema.Schema,
 0218                table: "Bookmarks",
 0219                columns: new[] { "ActivityTypeName", "Hash" });
 220
 0221            migrationBuilder.CreateIndex(
 0222                name: "IX_StoredBookmark_ActivityTypeName_Hash_WorkflowInstanceId",
 0223                schema: _schema.Schema,
 0224                table: "Bookmarks",
 0225                columns: new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" });
 226
 0227            migrationBuilder.CreateIndex(
 0228                name: "IX_StoredBookmark_CreatedAt",
 0229                schema: _schema.Schema,
 0230                table: "Bookmarks",
 0231                column: "CreatedAt");
 232
 0233            migrationBuilder.CreateIndex(
 0234                name: "IX_StoredBookmark_Hash",
 0235                schema: _schema.Schema,
 0236                table: "Bookmarks",
 0237                column: "Hash");
 238
 0239            migrationBuilder.CreateIndex(
 0240                name: "IX_StoredBookmark_WorkflowInstanceId",
 0241                schema: _schema.Schema,
 0242                table: "Bookmarks",
 0243                column: "WorkflowInstanceId");
 244
 0245            migrationBuilder.CreateIndex(
 0246                name: "IX_StoredTrigger_Hash",
 0247                schema: _schema.Schema,
 0248                table: "Triggers",
 0249                column: "Hash");
 250
 0251            migrationBuilder.CreateIndex(
 0252                name: "IX_StoredTrigger_Name",
 0253                schema: _schema.Schema,
 0254                table: "Triggers",
 0255                column: "Name");
 256
 0257            migrationBuilder.CreateIndex(
 0258                name: "IX_StoredTrigger_WorkflowDefinitionId",
 0259                schema: _schema.Schema,
 0260                table: "Triggers",
 0261                column: "WorkflowDefinitionId");
 262
 0263            migrationBuilder.CreateIndex(
 0264                name: "IX_StoredTrigger_WorkflowDefinitionVersionId",
 0265                schema: _schema.Schema,
 0266                table: "Triggers",
 0267                column: "WorkflowDefinitionVersionId");
 268
 0269            migrationBuilder.CreateIndex(
 0270                name: "IX_WorkflowExecutionLogRecord_ActivityId",
 0271                schema: _schema.Schema,
 0272                table: "WorkflowExecutionLogRecords",
 0273                column: "ActivityId");
 274
 0275            migrationBuilder.CreateIndex(
 0276                name: "IX_WorkflowExecutionLogRecord_ActivityInstanceId",
 0277                schema: _schema.Schema,
 0278                table: "WorkflowExecutionLogRecords",
 0279                column: "ActivityInstanceId");
 280
 0281            migrationBuilder.CreateIndex(
 0282                name: "IX_WorkflowExecutionLogRecord_ActivityName",
 0283                schema: _schema.Schema,
 0284                table: "WorkflowExecutionLogRecords",
 0285                column: "ActivityName");
 286
 0287            migrationBuilder.CreateIndex(
 0288                name: "IX_WorkflowExecutionLogRecord_ActivityNodeId",
 0289                schema: _schema.Schema,
 0290                table: "WorkflowExecutionLogRecords",
 0291                column: "ActivityNodeId");
 292
 0293            migrationBuilder.CreateIndex(
 0294                name: "IX_WorkflowExecutionLogRecord_ActivityType",
 0295                schema: _schema.Schema,
 0296                table: "WorkflowExecutionLogRecords",
 0297                column: "ActivityType");
 298
 0299            migrationBuilder.CreateIndex(
 0300                name: "IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion",
 0301                schema: _schema.Schema,
 0302                table: "WorkflowExecutionLogRecords",
 0303                columns: new[] { "ActivityType", "ActivityTypeVersion" });
 304
 0305            migrationBuilder.CreateIndex(
 0306                name: "IX_WorkflowExecutionLogRecord_ActivityTypeVersion",
 0307                schema: _schema.Schema,
 0308                table: "WorkflowExecutionLogRecords",
 0309                column: "ActivityTypeVersion");
 310
 0311            migrationBuilder.CreateIndex(
 0312                name: "IX_WorkflowExecutionLogRecord_EventName",
 0313                schema: _schema.Schema,
 0314                table: "WorkflowExecutionLogRecords",
 0315                column: "EventName");
 316
 0317            migrationBuilder.CreateIndex(
 0318                name: "IX_WorkflowExecutionLogRecord_ParentActivityInstanceId",
 0319                schema: _schema.Schema,
 0320                table: "WorkflowExecutionLogRecords",
 0321                column: "ParentActivityInstanceId");
 322
 0323            migrationBuilder.CreateIndex(
 0324                name: "IX_WorkflowExecutionLogRecord_Sequence",
 0325                schema: _schema.Schema,
 0326                table: "WorkflowExecutionLogRecords",
 0327                column: "Sequence");
 328
 0329            migrationBuilder.CreateIndex(
 0330                name: "IX_WorkflowExecutionLogRecord_Timestamp",
 0331                schema: _schema.Schema,
 0332                table: "WorkflowExecutionLogRecords",
 0333                column: "Timestamp");
 334
 0335            migrationBuilder.CreateIndex(
 0336                name: "IX_WorkflowExecutionLogRecord_Timestamp_Sequence",
 0337                schema: _schema.Schema,
 0338                table: "WorkflowExecutionLogRecords",
 0339                columns: new[] { "Timestamp", "Sequence" });
 340
 0341            migrationBuilder.CreateIndex(
 0342                name: "IX_WorkflowExecutionLogRecord_WorkflowDefinitionId",
 0343                schema: _schema.Schema,
 0344                table: "WorkflowExecutionLogRecords",
 0345                column: "WorkflowDefinitionId");
 346
 0347            migrationBuilder.CreateIndex(
 0348                name: "IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId",
 0349                schema: _schema.Schema,
 0350                table: "WorkflowExecutionLogRecords",
 0351                column: "WorkflowDefinitionVersionId");
 352
 0353            migrationBuilder.CreateIndex(
 0354                name: "IX_WorkflowExecutionLogRecord_WorkflowInstanceId",
 0355                schema: _schema.Schema,
 0356                table: "WorkflowExecutionLogRecords",
 0357                column: "WorkflowInstanceId");
 358
 0359            migrationBuilder.CreateIndex(
 0360                name: "IX_WorkflowExecutionLogRecord_WorkflowVersion",
 0361                schema: _schema.Schema,
 0362                table: "WorkflowExecutionLogRecords",
 0363                column: "WorkflowVersion");
 364
 0365            migrationBuilder.CreateIndex(
 0366                name: "IX_WorkflowInboxMessage_ActivityInstanceId",
 0367                schema: _schema.Schema,
 0368                table: "WorkflowInboxMessages",
 0369                column: "ActivityInstanceId");
 370
 0371            migrationBuilder.CreateIndex(
 0372                name: "IX_WorkflowInboxMessage_ActivityTypeName",
 0373                schema: _schema.Schema,
 0374                table: "WorkflowInboxMessages",
 0375                column: "ActivityTypeName");
 376
 0377            migrationBuilder.CreateIndex(
 0378                name: "IX_WorkflowInboxMessage_CorrelationId",
 0379                schema: _schema.Schema,
 0380                table: "WorkflowInboxMessages",
 0381                column: "CorrelationId");
 382
 0383            migrationBuilder.CreateIndex(
 0384                name: "IX_WorkflowInboxMessage_CreatedAt",
 0385                schema: _schema.Schema,
 0386                table: "WorkflowInboxMessages",
 0387                column: "CreatedAt");
 388
 0389            migrationBuilder.CreateIndex(
 0390                name: "IX_WorkflowInboxMessage_ExpiresAt",
 0391                schema: _schema.Schema,
 0392                table: "WorkflowInboxMessages",
 0393                column: "ExpiresAt");
 394
 0395            migrationBuilder.CreateIndex(
 0396                name: "IX_WorkflowInboxMessage_Hash",
 0397                schema: _schema.Schema,
 0398                table: "WorkflowInboxMessages",
 0399                column: "Hash");
 400
 0401            migrationBuilder.CreateIndex(
 0402                name: "IX_WorkflowInboxMessage_WorkflowInstanceId",
 0403                schema: _schema.Schema,
 0404                table: "WorkflowInboxMessages",
 0405                column: "WorkflowInstanceId");
 0406        }
 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
 022            modelBuilder
 023                .HasDefaultSchema("Elsa")
 024                .HasAnnotation("ProductVersion", "7.0.11")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 26
 027            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 28
 029            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.ActivityExecutionRecord", b =>
 030                {
 031                    b.Property<string>("Id")
 032                        .HasColumnType("text");
 033
 034                    b.Property<string>("ActivityId")
 035                        .IsRequired()
 036                        .HasColumnType("text");
 037
 038                    b.Property<string>("ActivityName")
 039                        .HasColumnType("text");
 040
 041                    b.Property<string>("ActivityNodeId")
 042                        .IsRequired()
 043                        .HasColumnType("text");
 044
 045                    b.Property<string>("ActivityType")
 046                        .IsRequired()
 047                        .HasColumnType("text");
 048
 049                    b.Property<int>("ActivityTypeVersion")
 050                        .HasColumnType("integer");
 051
 052                    b.Property<DateTimeOffset?>("CompletedAt")
 053                        .HasColumnType("timestamp with time zone");
 054
 055                    b.Property<bool>("HasBookmarks")
 056                        .HasColumnType("boolean");
 057
 058                    b.Property<string>("SerializedActivityState")
 059                        .HasColumnType("text");
 060
 061                    b.Property<string>("SerializedException")
 062                        .HasColumnType("text");
 063
 064                    b.Property<string>("SerializedOutputs")
 065                        .HasColumnType("text");
 066
 067                    b.Property<string>("SerializedPayload")
 068                        .HasColumnType("text");
 069
 070                    b.Property<DateTimeOffset>("StartedAt")
 071                        .HasColumnType("timestamp with time zone");
 072
 073                    b.Property<string>("Status")
 074                        .IsRequired()
 075                        .HasColumnType("text");
 076
 077                    b.Property<string>("WorkflowInstanceId")
 078                        .IsRequired()
 079                        .HasColumnType("text");
 080
 081                    b.HasKey("Id");
 082
 083                    b.HasIndex("ActivityId")
 084                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityId");
 085
 086                    b.HasIndex("ActivityName")
 087                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityName");
 088
 089                    b.HasIndex("ActivityNodeId")
 090                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityNodeId");
 091
 092                    b.HasIndex("ActivityType")
 093                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType");
 094
 095                    b.HasIndex("ActivityTypeVersion")
 096                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityTypeVersion");
 097
 098                    b.HasIndex("CompletedAt")
 099                        .HasDatabaseName("IX_ActivityExecutionRecord_CompletedAt");
 0100
 0101                    b.HasIndex("HasBookmarks")
 0102                        .HasDatabaseName("IX_ActivityExecutionRecord_HasBookmarks");
 0103
 0104                    b.HasIndex("StartedAt")
 0105                        .HasDatabaseName("IX_ActivityExecutionRecord_StartedAt");
 0106
 0107                    b.HasIndex("Status")
 0108                        .HasDatabaseName("IX_ActivityExecutionRecord_Status");
 0109
 0110                    b.HasIndex("WorkflowInstanceId")
 0111                        .HasDatabaseName("IX_ActivityExecutionRecord_WorkflowInstanceId");
 0112
 0113                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 0114                        .HasDatabaseName("IX_ActivityExecutionRecord_ActivityType_ActivityTypeVersion");
 0115
 0116                    b.ToTable("ActivityExecutionRecords", "Elsa");
 0117                });
 118
 0119            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredBookmark", b =>
 0120                {
 0121                    b.Property<string>("BookmarkId")
 0122                        .HasColumnType("text");
 0123
 0124                    b.Property<string>("ActivityInstanceId")
 0125                        .HasColumnType("text");
 0126
 0127                    b.Property<string>("ActivityTypeName")
 0128                        .IsRequired()
 0129                        .HasColumnType("text");
 0130
 0131                    b.Property<string>("CorrelationId")
 0132                        .HasColumnType("text");
 0133
 0134                    b.Property<DateTimeOffset>("CreatedAt")
 0135                        .HasColumnType("timestamp with time zone");
 0136
 0137                    b.Property<string>("Hash")
 0138                        .IsRequired()
 0139                        .HasColumnType("text");
 0140
 0141                    b.Property<string>("SerializedMetadata")
 0142                        .HasColumnType("text");
 0143
 0144                    b.Property<string>("SerializedPayload")
 0145                        .HasColumnType("text");
 0146
 0147                    b.Property<string>("WorkflowInstanceId")
 0148                        .IsRequired()
 0149                        .HasColumnType("text");
 0150
 0151                    b.HasKey("BookmarkId");
 0152
 0153                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_StoredBookmark_ActivityInstanceId");
 0154
 0155                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_StoredBookmark_ActivityTypeName");
 0156
 0157                    b.HasIndex(new[] { "ActivityTypeName", "Hash" }, "IX_StoredBookmark_ActivityTypeName_Hash");
 0158
 0159                    b.HasIndex(new[] { "ActivityTypeName", "Hash", "WorkflowInstanceId" }, "IX_StoredBookmark_ActivityTy
 0160
 0161                    b.HasIndex(new[] { "CreatedAt" }, "IX_StoredBookmark_CreatedAt");
 0162
 0163                    b.HasIndex(new[] { "Hash" }, "IX_StoredBookmark_Hash");
 0164
 0165                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_StoredBookmark_WorkflowInstanceId");
 0166
 0167                    b.ToTable("Bookmarks", "Elsa");
 0168                });
 169
 0170            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.StoredTrigger", b =>
 0171                {
 0172                    b.Property<string>("Id")
 0173                        .HasColumnType("text");
 0174
 0175                    b.Property<string>("ActivityId")
 0176                        .IsRequired()
 0177                        .HasColumnType("text");
 0178
 0179                    b.Property<string>("Hash")
 0180                        .HasColumnType("text");
 0181
 0182                    b.Property<string>("Name")
 0183                        .IsRequired()
 0184                        .HasColumnType("text");
 0185
 0186                    b.Property<string>("SerializedPayload")
 0187                        .HasColumnType("text");
 0188
 0189                    b.Property<string>("WorkflowDefinitionId")
 0190                        .IsRequired()
 0191                        .HasColumnType("text");
 0192
 0193                    b.Property<string>("WorkflowDefinitionVersionId")
 0194                        .IsRequired()
 0195                        .HasColumnType("text");
 0196
 0197                    b.HasKey("Id");
 0198
 0199                    b.HasIndex("Hash")
 0200                        .HasDatabaseName("IX_StoredTrigger_Hash");
 0201
 0202                    b.HasIndex("Name")
 0203                        .HasDatabaseName("IX_StoredTrigger_Name");
 0204
 0205                    b.HasIndex("WorkflowDefinitionId")
 0206                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionId");
 0207
 0208                    b.HasIndex("WorkflowDefinitionVersionId")
 0209                        .HasDatabaseName("IX_StoredTrigger_WorkflowDefinitionVersionId");
 0210
 0211                    b.ToTable("Triggers", "Elsa");
 0212                });
 213
 0214            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowExecutionLogRecord", b =>
 0215                {
 0216                    b.Property<string>("Id")
 0217                        .HasColumnType("text");
 0218
 0219                    b.Property<string>("ActivityId")
 0220                        .IsRequired()
 0221                        .HasColumnType("text");
 0222
 0223                    b.Property<string>("ActivityInstanceId")
 0224                        .IsRequired()
 0225                        .HasColumnType("text");
 0226
 0227                    b.Property<string>("ActivityName")
 0228                        .HasColumnType("text");
 0229
 0230                    b.Property<string>("ActivityNodeId")
 0231                        .IsRequired()
 0232                        .HasColumnType("text");
 0233
 0234                    b.Property<string>("ActivityType")
 0235                        .IsRequired()
 0236                        .HasColumnType("text");
 0237
 0238                    b.Property<int>("ActivityTypeVersion")
 0239                        .HasColumnType("integer");
 0240
 0241                    b.Property<string>("EventName")
 0242                        .HasColumnType("text");
 0243
 0244                    b.Property<string>("Message")
 0245                        .HasColumnType("text");
 0246
 0247                    b.Property<string>("ParentActivityInstanceId")
 0248                        .HasColumnType("text");
 0249
 0250                    b.Property<long>("Sequence")
 0251                        .HasColumnType("bigint");
 0252
 0253                    b.Property<string>("SerializedActivityState")
 0254                        .HasColumnType("text");
 0255
 0256                    b.Property<string>("SerializedPayload")
 0257                        .HasColumnType("text");
 0258
 0259                    b.Property<string>("Source")
 0260                        .HasColumnType("text");
 0261
 0262                    b.Property<DateTimeOffset>("Timestamp")
 0263                        .HasColumnType("timestamp with time zone");
 0264
 0265                    b.Property<string>("WorkflowDefinitionId")
 0266                        .IsRequired()
 0267                        .HasColumnType("text");
 0268
 0269                    b.Property<string>("WorkflowDefinitionVersionId")
 0270                        .IsRequired()
 0271                        .HasColumnType("text");
 0272
 0273                    b.Property<string>("WorkflowInstanceId")
 0274                        .IsRequired()
 0275                        .HasColumnType("text");
 0276
 0277                    b.Property<int>("WorkflowVersion")
 0278                        .HasColumnType("integer");
 0279
 0280                    b.HasKey("Id");
 0281
 0282                    b.HasIndex("ActivityId")
 0283                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityId");
 0284
 0285                    b.HasIndex("ActivityInstanceId")
 0286                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityInstanceId");
 0287
 0288                    b.HasIndex("ActivityName")
 0289                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityName");
 0290
 0291                    b.HasIndex("ActivityNodeId")
 0292                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityNodeId");
 0293
 0294                    b.HasIndex("ActivityType")
 0295                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType");
 0296
 0297                    b.HasIndex("ActivityTypeVersion")
 0298                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityTypeVersion");
 0299
 0300                    b.HasIndex("EventName")
 0301                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_EventName");
 0302
 0303                    b.HasIndex("ParentActivityInstanceId")
 0304                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ParentActivityInstanceId");
 0305
 0306                    b.HasIndex("Sequence")
 0307                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Sequence");
 0308
 0309                    b.HasIndex("Timestamp")
 0310                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp");
 0311
 0312                    b.HasIndex("WorkflowDefinitionId")
 0313                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionId");
 0314
 0315                    b.HasIndex("WorkflowDefinitionVersionId")
 0316                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowDefinitionVersionId");
 0317
 0318                    b.HasIndex("WorkflowInstanceId")
 0319                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowInstanceId");
 0320
 0321                    b.HasIndex("WorkflowVersion")
 0322                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_WorkflowVersion");
 0323
 0324                    b.HasIndex("ActivityType", "ActivityTypeVersion")
 0325                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_ActivityType_ActivityTypeVersion");
 0326
 0327                    b.HasIndex("Timestamp", "Sequence")
 0328                        .HasDatabaseName("IX_WorkflowExecutionLogRecord_Timestamp_Sequence");
 0329
 0330                    b.ToTable("WorkflowExecutionLogRecords", "Elsa");
 0331                });
 332
 0333            modelBuilder.Entity("Elsa.Workflows.Runtime.Entities.WorkflowInboxMessage", b =>
 0334                {
 0335                    b.Property<string>("Id")
 0336                        .HasColumnType("text");
 0337
 0338                    b.Property<string>("ActivityInstanceId")
 0339                        .HasColumnType("text");
 0340
 0341                    b.Property<string>("ActivityTypeName")
 0342                        .IsRequired()
 0343                        .HasColumnType("text");
 0344
 0345                    b.Property<string>("CorrelationId")
 0346                        .HasColumnType("text");
 0347
 0348                    b.Property<DateTimeOffset>("CreatedAt")
 0349                        .HasColumnType("timestamp with time zone");
 0350
 0351                    b.Property<DateTimeOffset>("ExpiresAt")
 0352                        .HasColumnType("timestamp with time zone");
 0353
 0354                    b.Property<string>("Hash")
 0355                        .IsRequired()
 0356                        .HasColumnType("text");
 0357
 0358                    b.Property<string>("SerializedBookmarkPayload")
 0359                        .HasColumnType("text");
 0360
 0361                    b.Property<string>("SerializedInput")
 0362                        .HasColumnType("text");
 0363
 0364                    b.Property<string>("WorkflowInstanceId")
 0365                        .HasColumnType("text");
 0366
 0367                    b.HasKey("Id");
 0368
 0369                    b.HasIndex(new[] { "ActivityInstanceId" }, "IX_WorkflowInboxMessage_ActivityInstanceId");
 0370
 0371                    b.HasIndex(new[] { "ActivityTypeName" }, "IX_WorkflowInboxMessage_ActivityTypeName");
 0372
 0373                    b.HasIndex(new[] { "CorrelationId" }, "IX_WorkflowInboxMessage_CorrelationId");
 0374
 0375                    b.HasIndex(new[] { "CreatedAt" }, "IX_WorkflowInboxMessage_CreatedAt");
 0376
 0377                    b.HasIndex(new[] { "ExpiresAt" }, "IX_WorkflowInboxMessage_ExpiresAt");
 0378
 0379                    b.HasIndex(new[] { "Hash" }, "IX_WorkflowInboxMessage_Hash");
 0380
 0381                    b.HasIndex(new[] { "WorkflowInstanceId" }, "IX_WorkflowInboxMessage_WorkflowInstanceId");
 0382
 0383                    b.ToTable("WorkflowInboxMessages", "Elsa");
 0384                });
 385#pragma warning restore 612, 618
 0386        }
 387    }
 388}