Merge pull request #6309 from elsa-workflows/bug/migrations-runtime
Regenerate 3_3 Runtime module migrations
This commit is contained in:
commit
7e06feffc2
|
|
@ -14,12 +14,12 @@ public class V3_3 : Migration
|
|||
/// <inheritdoc />
|
||||
public override void Up()
|
||||
{
|
||||
Delete.Table("WorkflowInboxMessages");
|
||||
Alter.Table("Triggers").AddColumn("TenantId").AsString().Nullable();
|
||||
Alter.Table("Bookmarks").AddColumn("TenantId").AsString().Nullable();
|
||||
Alter.Table("WorkflowExecutionLogRecords").AddColumn("TenantId").AsString().Nullable();
|
||||
Alter.Table("ActivityExecutionRecords").AddColumn("TenantId").AsString().Nullable();
|
||||
Alter.Table("KeyValuePairs").AddColumn("TenantId").AsString().Nullable();
|
||||
Rename.Column("Key").OnTable("KeyValuePairs").To("Id");
|
||||
|
||||
IfDatabase("SqlServer", "Oracle", "MySql", "Postgres")
|
||||
.Create
|
||||
|
|
@ -56,37 +56,7 @@ public class V3_3 : Migration
|
|||
Delete.Column("TenantId").FromTable("WorkflowExecutionLogRecords");
|
||||
Delete.Column("TenantId").FromTable("ActivityExecutionRecords");
|
||||
Delete.Column("TenantId").FromTable("KeyValuePairs");
|
||||
|
||||
IfDatabase("SqlServer", "Oracle", "MySql", "Postgres")
|
||||
.Create
|
||||
.Table("WorkflowInboxMessages")
|
||||
.WithColumn("Id").AsString().PrimaryKey()
|
||||
.WithColumn("ActivityTypeName").AsString().NotNullable().Indexed()
|
||||
.WithColumn("WorkflowInstanceId").AsString().Nullable().Indexed()
|
||||
.WithColumn("ActivityInstanceId").AsString().Nullable().Indexed()
|
||||
.WithColumn("CorrelationId").AsString().Nullable().Indexed()
|
||||
.WithColumn("Hash").AsString().NotNullable().Indexed()
|
||||
.WithColumn("SerializedBookmarkPayload").AsString(MaxValue)
|
||||
.WithColumn("SerializedInput").AsString(MaxValue).Nullable()
|
||||
.WithColumn("CreatedAt").AsDateTimeOffset().Indexed()
|
||||
.WithColumn("ExpiresAt").AsDateTimeOffset().Indexed()
|
||||
;
|
||||
|
||||
IfDatabase("Sqlite")
|
||||
.Create
|
||||
.Table("WorkflowInboxMessages")
|
||||
.WithColumn("Id").AsString().PrimaryKey()
|
||||
.WithColumn("ActivityTypeName").AsString().NotNullable().Indexed()
|
||||
.WithColumn("WorkflowInstanceId").AsString().Nullable().Indexed()
|
||||
.WithColumn("ActivityInstanceId").AsString().Nullable().Indexed()
|
||||
.WithColumn("CorrelationId").AsString().Nullable().Indexed()
|
||||
.WithColumn("Hash").AsString().NotNullable().Indexed()
|
||||
.WithColumn("SerializedBookmarkPayload").AsString(MaxValue)
|
||||
.WithColumn("SerializedInput").AsString(MaxValue).Nullable()
|
||||
.WithColumn("CreatedAt").AsDateTime2().Indexed()
|
||||
.WithColumn("ExpiresAt").AsDateTime2().Indexed()
|
||||
;
|
||||
|
||||
Rename.Column("Id").OnTable("KeyValuePairs").To("Key");
|
||||
Delete.Table("BookmarkQueueItems");
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
||||
{
|
||||
[DbContext(typeof(RuntimeElsaDbContext))]
|
||||
[Migration("20241231124504_V3_3")]
|
||||
[Migration("20250116192733_V3_3")]
|
||||
partial class V3_3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -21,7 +21,7 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
|
@ -31,10 +31,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
|
@ -19,10 +19,11 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
table: "KeyValuePairs",
|
||||
newName: "Id");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "BookmarkId",
|
||||
|
|
@ -54,26 +55,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -98,12 +79,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BookmarkQueueItems",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -231,11 +206,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SerializedKeyValuePair_TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -266,11 +236,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -286,28 +251,17 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "ActivityExecutionRecords");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
newName: "Key");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "Bookmarks",
|
||||
newName: "BookmarkId");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
|
@ -28,10 +28,6 @@ namespace Elsa.EntityFrameworkCore.MySql.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using Oracle.EntityFrameworkCore.Metadata;
|
|||
namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
||||
{
|
||||
[DbContext(typeof(RuntimeElsaDbContext))]
|
||||
[Migration("20241231124811_V3_3")]
|
||||
[Migration("20250116193207_V3_3")]
|
||||
partial class V3_3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -21,7 +21,7 @@ namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
|
@ -31,10 +31,6 @@ namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("NVARCHAR2(450)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("NVARCHAR2(2000)");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("NVARCHAR2(2000)");
|
||||
|
|
@ -99,7 +99,6 @@ namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
|||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "NVARCHAR2(450)", nullable: false),
|
||||
Key = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false),
|
||||
SerializedValue = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false),
|
||||
TenantId = table.Column<string>(type: "NVARCHAR2(450)", nullable: true)
|
||||
},
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
|
@ -28,10 +28,6 @@ namespace Elsa.EntityFrameworkCore.Oracle.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("NVARCHAR2(450)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("NVARCHAR2(2000)");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("NVARCHAR2(2000)");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
||||
{
|
||||
[DbContext(typeof(RuntimeElsaDbContext))]
|
||||
[Migration("20241231124728_V3_3")]
|
||||
[Migration("20250116192950_V3_3")]
|
||||
partial class V3_3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -21,7 +21,7 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
|
@ -31,10 +31,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
|
@ -19,10 +19,11 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
table: "KeyValuePairs",
|
||||
newName: "Id");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "BookmarkId",
|
||||
|
|
@ -51,14 +52,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -80,12 +73,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BookmarkQueueItems",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -203,11 +190,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SerializedKeyValuePair_TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -238,11 +220,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -258,17 +235,17 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "ActivityExecutionRecords");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
newName: "Key");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "Bookmarks",
|
||||
newName: "BookmarkId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
|
@ -28,10 +28,6 @@ namespace Elsa.EntityFrameworkCore.PostgreSql.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
||||
{
|
||||
[DbContext(typeof(RuntimeElsaDbContext))]
|
||||
[Migration("20241231124643_V3_3")]
|
||||
[Migration("20250116192837_V3_3")]
|
||||
partial class V3_3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -21,7 +21,7 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
|
@ -31,10 +31,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
|
@ -19,10 +19,11 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
table: "KeyValuePairs",
|
||||
newName: "Id");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "BookmarkId",
|
||||
|
|
@ -51,23 +52,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
type: "nvarchar(450)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(450)");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "nvarchar(450)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -89,12 +73,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
type: "nvarchar(450)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BookmarkQueueItems",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -212,11 +190,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SerializedKeyValuePair_TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -247,11 +220,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TenantId",
|
||||
schema: _schema.Schema,
|
||||
|
|
@ -267,26 +235,17 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
schema: _schema.Schema,
|
||||
table: "ActivityExecutionRecords");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
newName: "Key");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
schema: _schema.Schema,
|
||||
table: "Bookmarks",
|
||||
newName: "BookmarkId");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Key",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
type: "nvarchar(450)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
schema: _schema.Schema,
|
||||
table: "KeyValuePairs",
|
||||
column: "Key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("Elsa")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("ProductVersion", "8.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
|
@ -28,10 +28,6 @@ namespace Elsa.EntityFrameworkCore.SqlServer.Migrations.Runtime
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
|
|
|||
|
|
@ -11,24 +11,20 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
||||
{
|
||||
[DbContext(typeof(RuntimeElsaDbContext))]
|
||||
[Migration("20241231122946_V3_3")]
|
||||
[Migration("20250116192907_V3_3")]
|
||||
partial class V3_3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.0");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
||||
|
||||
modelBuilder.Entity("Elsa.KeyValues.Entities.SerializedKeyValuePair", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -19,9 +19,10 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
table: "KeyValuePairs");
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Key",
|
||||
table: "KeyValuePairs",
|
||||
newName: "Id");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "BookmarkId",
|
||||
|
|
@ -46,13 +47,6 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Id",
|
||||
table: "KeyValuePairs",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TenantId",
|
||||
table: "KeyValuePairs",
|
||||
|
|
@ -71,11 +65,6 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
table: "KeyValuePairs",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BookmarkQueueItems",
|
||||
columns: table => new
|
||||
|
|
@ -176,10 +165,6 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
name: "IX_StoredTrigger_TenantId",
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SerializedKeyValuePair_TenantId",
|
||||
table: "KeyValuePairs");
|
||||
|
|
@ -204,10 +189,6 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
name: "TenantId",
|
||||
table: "Triggers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Id",
|
||||
table: "KeyValuePairs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TenantId",
|
||||
table: "KeyValuePairs");
|
||||
|
|
@ -220,15 +201,15 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
name: "TenantId",
|
||||
table: "ActivityExecutionRecords");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
table: "KeyValuePairs",
|
||||
newName: "Key");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
table: "Bookmarks",
|
||||
newName: "BookmarkId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_KeyValuePairs",
|
||||
table: "KeyValuePairs",
|
||||
column: "Key");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,17 +15,13 @@ namespace Elsa.EntityFrameworkCore.Sqlite.Migrations.Runtime
|
|||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.0");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
||||
|
||||
modelBuilder.Entity("Elsa.KeyValues.Entities.SerializedKeyValuePair", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SerializedValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public class Configurations :
|
|||
public void Configure(EntityTypeBuilder<SerializedKeyValuePair> builder)
|
||||
{
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Ignore(x => x.Key);
|
||||
builder.HasIndex(x => x.TenantId, $"IX_{nameof(SerializedKeyValuePair)}_{nameof(SerializedKeyValuePair.TenantId)}");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue