| | | 1 | | // <auto-generated /> |
| | | 2 | | using System; |
| | | 3 | | using Elsa.Persistence.EFCore.Modules.Management; |
| | | 4 | | using Microsoft.EntityFrameworkCore; |
| | | 5 | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | | 6 | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | 7 | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | | 8 | | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; |
| | | 9 | | |
| | | 10 | | #nullable disable |
| | | 11 | | |
| | | 12 | | namespace Elsa.Persistence.EFCore.PostgreSql.Migrations.Management |
| | | 13 | | { |
| | | 14 | | [DbContext(typeof(ManagementElsaDbContext))] |
| | | 15 | | [Migration("20240329200740_V3_1")] |
| | | 16 | | partial class V3_1 |
| | | 17 | | { |
| | | 18 | | /// <inheritdoc /> |
| | | 19 | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | | 20 | | { |
| | | 21 | | #pragma warning disable 612, 618 |
| | 1 | 22 | | modelBuilder |
| | 1 | 23 | | .HasDefaultSchema("Elsa") |
| | 1 | 24 | | .HasAnnotation("ProductVersion", "7.0.14") |
| | 1 | 25 | | .HasAnnotation("Relational:MaxIdentifierLength", 63); |
| | | 26 | | |
| | 1 | 27 | | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); |
| | | 28 | | |
| | 1 | 29 | | modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b => |
| | 1 | 30 | | { |
| | 1 | 31 | | b.Property<string>("Id") |
| | 1 | 32 | | .HasColumnType("text"); |
| | 1 | 33 | | |
| | 1 | 34 | | b.Property<byte[]>("BinaryData") |
| | 1 | 35 | | .HasColumnType("bytea"); |
| | 1 | 36 | | |
| | 1 | 37 | | b.Property<DateTimeOffset>("CreatedAt") |
| | 1 | 38 | | .HasColumnType("timestamp with time zone"); |
| | 1 | 39 | | |
| | 1 | 40 | | b.Property<string>("Data") |
| | 1 | 41 | | .HasColumnType("text"); |
| | 1 | 42 | | |
| | 1 | 43 | | b.Property<string>("DefinitionId") |
| | 1 | 44 | | .IsRequired() |
| | 1 | 45 | | .HasColumnType("text"); |
| | 1 | 46 | | |
| | 1 | 47 | | b.Property<string>("Description") |
| | 1 | 48 | | .HasColumnType("text"); |
| | 1 | 49 | | |
| | 1 | 50 | | b.Property<bool>("IsLatest") |
| | 1 | 51 | | .HasColumnType("boolean"); |
| | 1 | 52 | | |
| | 1 | 53 | | b.Property<bool>("IsPublished") |
| | 1 | 54 | | .HasColumnType("boolean"); |
| | 1 | 55 | | |
| | 1 | 56 | | b.Property<bool>("IsReadonly") |
| | 1 | 57 | | .HasColumnType("boolean"); |
| | 1 | 58 | | |
| | 1 | 59 | | b.Property<bool>("IsSystem") |
| | 1 | 60 | | .HasColumnType("boolean"); |
| | 1 | 61 | | |
| | 1 | 62 | | b.Property<string>("MaterializerContext") |
| | 1 | 63 | | .HasColumnType("text"); |
| | 1 | 64 | | |
| | 1 | 65 | | b.Property<string>("MaterializerName") |
| | 1 | 66 | | .IsRequired() |
| | 1 | 67 | | .HasColumnType("text"); |
| | 1 | 68 | | |
| | 1 | 69 | | b.Property<string>("Name") |
| | 1 | 70 | | .HasColumnType("text"); |
| | 1 | 71 | | |
| | 1 | 72 | | b.Property<string>("ProviderName") |
| | 1 | 73 | | .HasColumnType("text"); |
| | 1 | 74 | | |
| | 1 | 75 | | b.Property<string>("StringData") |
| | 1 | 76 | | .HasColumnType("text"); |
| | 1 | 77 | | |
| | 1 | 78 | | b.Property<string>("ToolVersion") |
| | 1 | 79 | | .HasColumnType("text"); |
| | 1 | 80 | | |
| | 1 | 81 | | b.Property<bool?>("UsableAsActivity") |
| | 1 | 82 | | .HasColumnType("boolean"); |
| | 1 | 83 | | |
| | 1 | 84 | | b.Property<int>("Version") |
| | 1 | 85 | | .HasColumnType("integer"); |
| | 1 | 86 | | |
| | 1 | 87 | | b.HasKey("Id"); |
| | 1 | 88 | | |
| | 1 | 89 | | b.HasIndex("IsLatest") |
| | 1 | 90 | | .HasDatabaseName("IX_WorkflowDefinition_IsLatest"); |
| | 1 | 91 | | |
| | 1 | 92 | | b.HasIndex("IsPublished") |
| | 1 | 93 | | .HasDatabaseName("IX_WorkflowDefinition_IsPublished"); |
| | 1 | 94 | | |
| | 1 | 95 | | b.HasIndex("IsSystem") |
| | 1 | 96 | | .HasDatabaseName("IX_WorkflowDefinition_IsSystem"); |
| | 1 | 97 | | |
| | 1 | 98 | | b.HasIndex("Name") |
| | 1 | 99 | | .HasDatabaseName("IX_WorkflowDefinition_Name"); |
| | 1 | 100 | | |
| | 1 | 101 | | b.HasIndex("UsableAsActivity") |
| | 1 | 102 | | .HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity"); |
| | 1 | 103 | | |
| | 1 | 104 | | b.HasIndex("Version") |
| | 1 | 105 | | .HasDatabaseName("IX_WorkflowDefinition_Version"); |
| | 1 | 106 | | |
| | 1 | 107 | | b.HasIndex("DefinitionId", "Version") |
| | 1 | 108 | | .IsUnique() |
| | 1 | 109 | | .HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version"); |
| | 1 | 110 | | |
| | 1 | 111 | | b.ToTable("WorkflowDefinitions", "Elsa"); |
| | 2 | 112 | | }); |
| | | 113 | | |
| | 1 | 114 | | modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b => |
| | 1 | 115 | | { |
| | 1 | 116 | | b.Property<string>("Id") |
| | 1 | 117 | | .HasColumnType("text"); |
| | 1 | 118 | | |
| | 1 | 119 | | b.Property<string>("CorrelationId") |
| | 1 | 120 | | .HasColumnType("text"); |
| | 1 | 121 | | |
| | 1 | 122 | | b.Property<DateTimeOffset>("CreatedAt") |
| | 1 | 123 | | .HasColumnType("timestamp with time zone"); |
| | 1 | 124 | | |
| | 1 | 125 | | b.Property<string>("Data") |
| | 1 | 126 | | .HasColumnType("text"); |
| | 1 | 127 | | |
| | 1 | 128 | | b.Property<string>("DataCompressionAlgorithm") |
| | 1 | 129 | | .HasColumnType("text"); |
| | 1 | 130 | | |
| | 1 | 131 | | b.Property<string>("DefinitionId") |
| | 1 | 132 | | .IsRequired() |
| | 1 | 133 | | .HasColumnType("text"); |
| | 1 | 134 | | |
| | 1 | 135 | | b.Property<string>("DefinitionVersionId") |
| | 1 | 136 | | .IsRequired() |
| | 1 | 137 | | .HasColumnType("text"); |
| | 1 | 138 | | |
| | 1 | 139 | | b.Property<DateTimeOffset?>("FinishedAt") |
| | 1 | 140 | | .HasColumnType("timestamp with time zone"); |
| | 1 | 141 | | |
| | 1 | 142 | | b.Property<int>("IncidentCount") |
| | 1 | 143 | | .HasColumnType("integer"); |
| | 1 | 144 | | |
| | 1 | 145 | | b.Property<bool>("IsSystem") |
| | 1 | 146 | | .HasColumnType("boolean"); |
| | 1 | 147 | | |
| | 1 | 148 | | b.Property<string>("Name") |
| | 1 | 149 | | .HasColumnType("text"); |
| | 1 | 150 | | |
| | 1 | 151 | | b.Property<string>("ParentWorkflowInstanceId") |
| | 1 | 152 | | .HasColumnType("text"); |
| | 1 | 153 | | |
| | 1 | 154 | | b.Property<string>("Status") |
| | 1 | 155 | | .IsRequired() |
| | 1 | 156 | | .HasColumnType("text"); |
| | 1 | 157 | | |
| | 1 | 158 | | b.Property<string>("SubStatus") |
| | 1 | 159 | | .IsRequired() |
| | 1 | 160 | | .HasColumnType("text"); |
| | 1 | 161 | | |
| | 1 | 162 | | b.Property<DateTimeOffset>("UpdatedAt") |
| | 1 | 163 | | .HasColumnType("timestamp with time zone"); |
| | 1 | 164 | | |
| | 1 | 165 | | b.Property<int>("Version") |
| | 1 | 166 | | .HasColumnType("integer"); |
| | 1 | 167 | | |
| | 1 | 168 | | b.HasKey("Id"); |
| | 1 | 169 | | |
| | 1 | 170 | | b.HasIndex("CorrelationId") |
| | 1 | 171 | | .HasDatabaseName("IX_WorkflowInstance_CorrelationId"); |
| | 1 | 172 | | |
| | 1 | 173 | | b.HasIndex("CreatedAt") |
| | 1 | 174 | | .HasDatabaseName("IX_WorkflowInstance_CreatedAt"); |
| | 1 | 175 | | |
| | 1 | 176 | | b.HasIndex("DefinitionId") |
| | 1 | 177 | | .HasDatabaseName("IX_WorkflowInstance_DefinitionId"); |
| | 1 | 178 | | |
| | 1 | 179 | | b.HasIndex("FinishedAt") |
| | 1 | 180 | | .HasDatabaseName("IX_WorkflowInstance_FinishedAt"); |
| | 1 | 181 | | |
| | 1 | 182 | | b.HasIndex("IsSystem") |
| | 1 | 183 | | .HasDatabaseName("IX_WorkflowInstance_IsSystem"); |
| | 1 | 184 | | |
| | 1 | 185 | | b.HasIndex("Name") |
| | 1 | 186 | | .HasDatabaseName("IX_WorkflowInstance_Name"); |
| | 1 | 187 | | |
| | 1 | 188 | | b.HasIndex("Status") |
| | 1 | 189 | | .HasDatabaseName("IX_WorkflowInstance_Status"); |
| | 1 | 190 | | |
| | 1 | 191 | | b.HasIndex("SubStatus") |
| | 1 | 192 | | .HasDatabaseName("IX_WorkflowInstance_SubStatus"); |
| | 1 | 193 | | |
| | 1 | 194 | | b.HasIndex("UpdatedAt") |
| | 1 | 195 | | .HasDatabaseName("IX_WorkflowInstance_UpdatedAt"); |
| | 1 | 196 | | |
| | 1 | 197 | | b.HasIndex("Status", "DefinitionId") |
| | 1 | 198 | | .HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId"); |
| | 1 | 199 | | |
| | 1 | 200 | | b.HasIndex("Status", "SubStatus") |
| | 1 | 201 | | .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus"); |
| | 1 | 202 | | |
| | 1 | 203 | | b.HasIndex("SubStatus", "DefinitionId") |
| | 1 | 204 | | .HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId"); |
| | 1 | 205 | | |
| | 1 | 206 | | b.HasIndex("Status", "SubStatus", "DefinitionId", "Version") |
| | 1 | 207 | | .HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version"); |
| | 1 | 208 | | |
| | 1 | 209 | | b.ToTable("WorkflowInstances", "Elsa"); |
| | 2 | 210 | | }); |
| | | 211 | | #pragma warning restore 612, 618 |
| | 1 | 212 | | } |
| | | 213 | | } |
| | | 214 | | } |