Update migrations
This commit is contained in:
parent
6b7caddca8
commit
92b7d2f78b
|
|
@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
||||
{
|
||||
[DbContext(typeof(ElsaDbContext))]
|
||||
[Migration("20220117205849_Initial")]
|
||||
[Migration("20220307110612_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
|
|
@ -19,6 +19,24 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("Elsa.Models.Variable", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("WorkflowDefinitionId");
|
||||
|
||||
b.ToTable("Variable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Persistence.Entities.WorkflowBookmark", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
|
|
@ -39,6 +57,9 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Hash")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
|
@ -46,9 +67,6 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -267,6 +285,9 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Hash")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
|
@ -274,9 +295,6 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -294,6 +312,18 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
|
||||
b.ToTable("WorkflowTriggers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Models.Variable", b =>
|
||||
{
|
||||
b.HasOne("Elsa.Persistence.Entities.WorkflowDefinition", null)
|
||||
.WithMany("Variables")
|
||||
.HasForeignKey("WorkflowDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Persistence.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Navigation("Variables");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Payload = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Data = table.Column<string>(type: "TEXT", nullable: true),
|
||||
WorkflowDefinitionId = table.Column<string>(type: "TEXT", nullable: false),
|
||||
WorkflowInstanceId = table.Column<string>(type: "TEXT", nullable: false),
|
||||
CorrelationId = table.Column<string>(type: "TEXT", nullable: false),
|
||||
|
|
@ -98,13 +98,36 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
WorkflowDefinitionId = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Payload = table.Column<string>(type: "TEXT", nullable: true)
|
||||
Data = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WorkflowTriggers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Variable",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: true),
|
||||
WorkflowDefinitionId = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Variable", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Variable_WorkflowDefinitions_WorkflowDefinitionId",
|
||||
column: x => x.WorkflowDefinitionId,
|
||||
principalTable: "WorkflowDefinitions",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Variable_WorkflowDefinitionId",
|
||||
table: "Variable",
|
||||
column: "WorkflowDefinitionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkflowBookmark_ActivityId",
|
||||
table: "WorkflowBookmarks",
|
||||
|
|
@ -255,10 +278,10 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkflowBookmarks");
|
||||
name: "Variable");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkflowDefinitions");
|
||||
name: "WorkflowBookmarks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkflowExecutionLogRecords");
|
||||
|
|
@ -268,6 +291,9 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkflowTriggers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkflowDefinitions");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,24 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("Elsa.Models.Variable", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("WorkflowDefinitionId");
|
||||
|
||||
b.ToTable("Variable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Persistence.Entities.WorkflowBookmark", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
|
|
@ -37,6 +55,9 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Hash")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
|
@ -44,9 +65,6 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -265,6 +283,9 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Hash")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
|
@ -272,9 +293,6 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("WorkflowDefinitionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
|
@ -292,6 +310,18 @@ namespace Elsa.Persistence.EntityFrameworkCore.Sqlite.Migrations
|
|||
|
||||
b.ToTable("WorkflowTriggers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Models.Variable", b =>
|
||||
{
|
||||
b.HasOne("Elsa.Persistence.Entities.WorkflowDefinition", null)
|
||||
.WithMany("Variables")
|
||||
.HasForeignKey("WorkflowDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Elsa.Persistence.Entities.WorkflowDefinition", b =>
|
||||
{
|
||||
b.Navigation("Variables");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue