Add V3_1 migrations for various Elsa DB contexts
This commit includes the creation of migration files for MySql, SqlServer, Sqlite, and PostgreSql contexts in the Elsa project. The files for version V3_1 were automatically generated and are to be implemented with the necessary changes in the Up and Down methods as per the requirements.
This commit is contained in:
parent
0bfebccadb
commit
22f72080f3
|
|
@ -29,7 +29,12 @@ for module in "${mods[@]}"; do
|
|||
echo "Migrations path: $migrationsPath"
|
||||
echo "Connection string: ${connStrings[$provider]}"
|
||||
|
||||
# 1. Run the migrations command
|
||||
dotnet ef migrations add 3_1 -c "$module"ElsaDbContext -p "$providerPath" -o "$migrationsPath" -- --connectionString "${connStrings[$provider]}"
|
||||
# 1. Delete the existing migration
|
||||
echo "Deleting existing migrations: ${providerPath:?}/${migrationsPath}/*V3_1.cs"
|
||||
find "${providerPath:?}/${migrationsPath}/" -type f -name "*V3_1*" -exec rm -f {} \;
|
||||
# rm -rf "${providerPath:?}/${migrationsPath}/*V3_1.cs"
|
||||
|
||||
# 2. Run the migrations command
|
||||
dotnet ef migrations add V3_1 -c "$module"ElsaDbContext -p "$providerPath" -o "$migrationsPath" -- --connectionString "${connStrings[$provider]}"
|
||||
done
|
||||
done
|
||||
|
|
|
|||
199
src/modules/Elsa.EntityFrameworkCore.MySql/Migrations/Management/20240203213856_V3_1.Designer.cs
generated
Normal file
199
src/modules/Elsa.EntityFrameworkCore.MySql/Migrations/Management/20240203213856_V3_1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Elsa.EntityFrameworkCore.Modules.Management;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.MySql.Migrations.Management
|
||||
{
|
||||
[DbContext(typeof(ManagementElsaDbContext))]
|
||||
[Migration("20240203213856_V3_1")]
|
||||
partial class V31
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<byte[]>("BinaryData")
|
||||
.HasColumnType("longblob");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsLatest")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsReadonly")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("MaterializerContext")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("MaterializerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ProviderName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("StringData")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ToolVersion")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool?>("UsableAsActivity")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsLatest")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsLatest");
|
||||
|
||||
b.HasIndex("IsPublished")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsPublished");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Name");
|
||||
|
||||
b.HasIndex("UsableAsActivity")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
|
||||
|
||||
b.HasIndex("Version")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Version");
|
||||
|
||||
b.HasIndex("DefinitionId", "Version")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowDefinitions", "Elsa");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("CorrelationId")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("DefinitionVersionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTimeOffset?>("FinishedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IncidentCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("SubStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CorrelationId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CorrelationId");
|
||||
|
||||
b.HasIndex("CreatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CreatedAt");
|
||||
|
||||
b.HasIndex("DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_DefinitionId");
|
||||
|
||||
b.HasIndex("FinishedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_FinishedAt");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Name");
|
||||
|
||||
b.HasIndex("Status")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status");
|
||||
|
||||
b.HasIndex("SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus");
|
||||
|
||||
b.HasIndex("UpdatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
|
||||
|
||||
b.HasIndex("Status", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
|
||||
|
||||
b.HasIndex("SubStatus", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowInstances", "Elsa");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.MySql.Migrations.Management
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class V31 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Management
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.11")
|
||||
.HasAnnotation("ProductVersion", "7.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
|
|
@ -34,6 +34,12 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Management
|
|||
b.Property<string>("Data")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
|
|
|||
202
src/modules/Elsa.EntityFrameworkCore.PostgreSql/Migrations/Management/20240203213917_V3_1.Designer.cs
generated
Normal file
202
src/modules/Elsa.EntityFrameworkCore.PostgreSql/Migrations/Management/20240203213917_V3_1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Elsa.EntityFrameworkCore.Modules.Management;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Management
|
||||
{
|
||||
[DbContext(typeof(ManagementElsaDbContext))]
|
||||
[Migration("20240203213917_V3_1")]
|
||||
partial class V3_1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<byte[]>("BinaryData")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsLatest")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsReadonly")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("MaterializerContext")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("MaterializerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("StringData")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ToolVersion")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool?>("UsableAsActivity")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsLatest")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsLatest");
|
||||
|
||||
b.HasIndex("IsPublished")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsPublished");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Name");
|
||||
|
||||
b.HasIndex("UsableAsActivity")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
|
||||
|
||||
b.HasIndex("Version")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Version");
|
||||
|
||||
b.HasIndex("DefinitionId", "Version")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowDefinitions", "Elsa");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("CorrelationId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DefinitionVersionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset?>("FinishedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("IncidentCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SubStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CorrelationId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CorrelationId");
|
||||
|
||||
b.HasIndex("CreatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CreatedAt");
|
||||
|
||||
b.HasIndex("DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_DefinitionId");
|
||||
|
||||
b.HasIndex("FinishedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_FinishedAt");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Name");
|
||||
|
||||
b.HasIndex("Status")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status");
|
||||
|
||||
b.HasIndex("SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus");
|
||||
|
||||
b.HasIndex("UpdatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
|
||||
|
||||
b.HasIndex("Status", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
|
||||
|
||||
b.HasIndex("SubStatus", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowInstances", "Elsa");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Management
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class V3_1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Management
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.11")
|
||||
.HasAnnotation("ProductVersion", "7.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
|
@ -37,6 +37,12 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Management
|
|||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
|
|
|||
202
src/modules/Elsa.EntityFrameworkCore.SqlServer/Migrations/Management/20240203213902_V3_1.Designer.cs
generated
Normal file
202
src/modules/Elsa.EntityFrameworkCore.SqlServer/Migrations/Management/20240203213902_V3_1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Elsa.EntityFrameworkCore.Modules.Management;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Management
|
||||
{
|
||||
[DbContext(typeof(ManagementElsaDbContext))]
|
||||
[Migration("20240203213902_V3_1")]
|
||||
partial class V3_1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<byte[]>("BinaryData")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsLatest")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsReadonly")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("MaterializerContext")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MaterializerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ProviderName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StringData")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ToolVersion")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool?>("UsableAsActivity")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsLatest")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsLatest");
|
||||
|
||||
b.HasIndex("IsPublished")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsPublished");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Name");
|
||||
|
||||
b.HasIndex("UsableAsActivity")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
|
||||
|
||||
b.HasIndex("Version")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Version");
|
||||
|
||||
b.HasIndex("DefinitionId", "Version")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowDefinitions", "Elsa");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CorrelationId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("DefinitionVersionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTimeOffset?>("FinishedAt")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<int>("IncidentCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("SubStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CorrelationId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CorrelationId");
|
||||
|
||||
b.HasIndex("CreatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CreatedAt");
|
||||
|
||||
b.HasIndex("DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_DefinitionId");
|
||||
|
||||
b.HasIndex("FinishedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_FinishedAt");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Name");
|
||||
|
||||
b.HasIndex("Status")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status");
|
||||
|
||||
b.HasIndex("SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus");
|
||||
|
||||
b.HasIndex("UpdatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
|
||||
|
||||
b.HasIndex("Status", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
|
||||
|
||||
b.HasIndex("SubStatus", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowInstances", "Elsa");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Management
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class V3_1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Management
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "7.0.11")
|
||||
.HasAnnotation("ProductVersion", "7.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
|
@ -37,6 +37,12 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Management
|
|||
b.Property<string>("Data")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
|
|
|||
199
src/modules/Elsa.EntityFrameworkCore.Sqlite/Migrations/Management/20240203213909_V3_1.Designer.cs
generated
Normal file
199
src/modules/Elsa.EntityFrameworkCore.Sqlite/Migrations/Management/20240203213909_V3_1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Elsa.EntityFrameworkCore.Modules.Management;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Management
|
||||
{
|
||||
[DbContext(typeof(ManagementElsaDbContext))]
|
||||
[Migration("20240203213909_V3_1")]
|
||||
partial class V3_1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<byte[]>("BinaryData")
|
||||
.HasColumnType("BLOB");
|
||||
|
||||
b.Property<string>("CreatedAt")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsLatest")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsReadonly")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("MaterializerContext")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("MaterializerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ProviderName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StringData")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ToolVersion")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool?>("UsableAsActivity")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsLatest")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsLatest");
|
||||
|
||||
b.HasIndex("IsPublished")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_IsPublished");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Name");
|
||||
|
||||
b.HasIndex("UsableAsActivity")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_UsableAsActivity");
|
||||
|
||||
b.HasIndex("Version")
|
||||
.HasDatabaseName("IX_WorkflowDefinition_Version");
|
||||
|
||||
b.HasIndex("DefinitionId", "Version")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_WorkflowDefinition_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowInstance", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("CorrelationId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("CreatedAt")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DefinitionVersionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FinishedAt")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("IncidentCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SubStatus")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UpdatedAt")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Version")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CorrelationId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CorrelationId");
|
||||
|
||||
b.HasIndex("CreatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_CreatedAt");
|
||||
|
||||
b.HasIndex("DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_DefinitionId");
|
||||
|
||||
b.HasIndex("FinishedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_FinishedAt");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Name");
|
||||
|
||||
b.HasIndex("Status")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status");
|
||||
|
||||
b.HasIndex("SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus");
|
||||
|
||||
b.HasIndex("UpdatedAt")
|
||||
.HasDatabaseName("IX_WorkflowInstance_UpdatedAt");
|
||||
|
||||
b.HasIndex("Status", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus");
|
||||
|
||||
b.HasIndex("SubStatus", "DefinitionId")
|
||||
.HasDatabaseName("IX_WorkflowInstance_SubStatus_DefinitionId");
|
||||
|
||||
b.HasIndex("Status", "SubStatus", "DefinitionId", "Version")
|
||||
.HasDatabaseName("IX_WorkflowInstance_Status_SubStatus_DefinitionId_Version");
|
||||
|
||||
b.ToTable("WorkflowInstances");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Management
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class V3_1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Management
|
|||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.11");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("Elsa.Workflows.Management.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
|
|
@ -32,6 +32,12 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Management
|
|||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DataCompressionAlgorithm")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DataFormat")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
|
|||
Loading…
Reference in a new issue