Skip to content

Commit

Permalink
Undo Migrations reset, fixes #6103 (#6105)
Browse files Browse the repository at this point in the history
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
  • Loading branch information
Suchiman and sfmskywalker authored Nov 8, 2024
1 parent 7ddb26a commit aeedf9d
Show file tree
Hide file tree
Showing 178 changed files with 15,995 additions and 1,145 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Elsa.EntityFrameworkCore.MySql.Migrations.Alterations
{
/// <inheritdoc />
public partial class V3_3 : Migration
public partial class Initial : Migration
{
private readonly Elsa.EntityFrameworkCore.IElsaDbContextSchema _schema;

/// <inheritdoc />
public V3_3(Elsa.EntityFrameworkCore.IElsaDbContextSchema schema)
private readonly IElsaDbContextSchema _schema;
public Initial(IElsaDbContextSchema schema)
{
_schema = schema;
_schema = schema ?? throw new ArgumentNullException(nameof(schema));
}

/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "Elsa");
name: _schema.Schema);

migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
Expand All @@ -36,14 +32,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
.Annotation("MySql:CharSet", "utf8mb4"),
WorkflowInstanceId = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<int>(type: "int", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: false),
StartedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true),
CompletedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true),
SerializedLog = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<string>(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
Expand All @@ -59,16 +52,13 @@ protected override void Up(MigrationBuilder migrationBuilder)
{
Id = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<int>(type: "int", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: false),
StartedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true),
CompletedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true),
SerializedAlterations = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SerializedWorkflowInstanceFilter = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<string>(type: "varchar(255)", nullable: true)
SerializedWorkflowInstanceIds = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
Expand Down Expand Up @@ -107,12 +97,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
table: "AlterationJobs",
column: "Status");

migrationBuilder.CreateIndex(
name: "IX_AlterationJob_TenantId",
schema: _schema.Schema,
table: "AlterationJobs",
column: "TenantId");

migrationBuilder.CreateIndex(
name: "IX_AlterationJob_WorkflowInstanceId",
schema: _schema.Schema,
Expand Down Expand Up @@ -142,12 +126,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
schema: _schema.Schema,
table: "AlterationPlans",
column: "Status");

migrationBuilder.CreateIndex(
name: "IX_AlterationPlan_TenantId",
schema: _schema.Schema,
table: "AlterationPlans",
column: "TenantId");
}

/// <inheritdoc />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aeedf9d

Please sign in to comment.