| | | 1 | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | 2 | | |
| | | 3 | | #nullable disable |
| | | 4 | | |
| | | 5 | | namespace Elsa.Persistence.EFCore.Sqlite.Migrations.Alterations |
| | | 6 | | { |
| | | 7 | | /// <inheritdoc /> |
| | | 8 | | public partial class Initial : Migration |
| | | 9 | | { |
| | | 10 | | /// <inheritdoc /> |
| | | 11 | | protected override void Up(MigrationBuilder migrationBuilder) |
| | | 12 | | { |
| | 0 | 13 | | migrationBuilder.CreateTable( |
| | 0 | 14 | | name: "AlterationJobs", |
| | 0 | 15 | | columns: table => new |
| | 0 | 16 | | { |
| | 0 | 17 | | Id = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 18 | | PlanId = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 19 | | WorkflowInstanceId = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 20 | | Status = table.Column<int>(type: "INTEGER", nullable: false), |
| | 0 | 21 | | CreatedAt = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 22 | | StartedAt = table.Column<string>(type: "TEXT", nullable: true), |
| | 0 | 23 | | CompletedAt = table.Column<string>(type: "TEXT", nullable: true), |
| | 0 | 24 | | SerializedLog = table.Column<string>(type: "TEXT", nullable: true) |
| | 0 | 25 | | }, |
| | 0 | 26 | | constraints: table => |
| | 0 | 27 | | { |
| | 0 | 28 | | table.PrimaryKey("PK_AlterationJobs", x => x.Id); |
| | 0 | 29 | | }); |
| | | 30 | | |
| | 0 | 31 | | migrationBuilder.CreateTable( |
| | 0 | 32 | | name: "AlterationPlans", |
| | 0 | 33 | | columns: table => new |
| | 0 | 34 | | { |
| | 0 | 35 | | Id = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 36 | | Status = table.Column<int>(type: "INTEGER", nullable: false), |
| | 0 | 37 | | CreatedAt = table.Column<string>(type: "TEXT", nullable: false), |
| | 0 | 38 | | StartedAt = table.Column<string>(type: "TEXT", nullable: true), |
| | 0 | 39 | | CompletedAt = table.Column<string>(type: "TEXT", nullable: true), |
| | 0 | 40 | | SerializedAlterations = table.Column<string>(type: "TEXT", nullable: true), |
| | 0 | 41 | | SerializedWorkflowInstanceIds = table.Column<string>(type: "TEXT", nullable: true) |
| | 0 | 42 | | }, |
| | 0 | 43 | | constraints: table => |
| | 0 | 44 | | { |
| | 0 | 45 | | table.PrimaryKey("PK_AlterationPlans", x => x.Id); |
| | 0 | 46 | | }); |
| | | 47 | | |
| | 0 | 48 | | migrationBuilder.CreateIndex( |
| | 0 | 49 | | name: "IX_AlterationJob_CompletedAt", |
| | 0 | 50 | | table: "AlterationJobs", |
| | 0 | 51 | | column: "CompletedAt"); |
| | | 52 | | |
| | 0 | 53 | | migrationBuilder.CreateIndex( |
| | 0 | 54 | | name: "IX_AlterationJob_CreatedAt", |
| | 0 | 55 | | table: "AlterationJobs", |
| | 0 | 56 | | column: "CreatedAt"); |
| | | 57 | | |
| | 0 | 58 | | migrationBuilder.CreateIndex( |
| | 0 | 59 | | name: "IX_AlterationJob_PlanId", |
| | 0 | 60 | | table: "AlterationJobs", |
| | 0 | 61 | | column: "PlanId"); |
| | | 62 | | |
| | 0 | 63 | | migrationBuilder.CreateIndex( |
| | 0 | 64 | | name: "IX_AlterationJob_StartedAt", |
| | 0 | 65 | | table: "AlterationJobs", |
| | 0 | 66 | | column: "StartedAt"); |
| | | 67 | | |
| | 0 | 68 | | migrationBuilder.CreateIndex( |
| | 0 | 69 | | name: "IX_AlterationJob_Status", |
| | 0 | 70 | | table: "AlterationJobs", |
| | 0 | 71 | | column: "Status"); |
| | | 72 | | |
| | 0 | 73 | | migrationBuilder.CreateIndex( |
| | 0 | 74 | | name: "IX_AlterationJob_WorkflowInstanceId", |
| | 0 | 75 | | table: "AlterationJobs", |
| | 0 | 76 | | column: "WorkflowInstanceId"); |
| | | 77 | | |
| | 0 | 78 | | migrationBuilder.CreateIndex( |
| | 0 | 79 | | name: "IX_AlterationPlan_CompletedAt", |
| | 0 | 80 | | table: "AlterationPlans", |
| | 0 | 81 | | column: "CompletedAt"); |
| | | 82 | | |
| | 0 | 83 | | migrationBuilder.CreateIndex( |
| | 0 | 84 | | name: "IX_AlterationPlan_CreatedAt", |
| | 0 | 85 | | table: "AlterationPlans", |
| | 0 | 86 | | column: "CreatedAt"); |
| | | 87 | | |
| | 0 | 88 | | migrationBuilder.CreateIndex( |
| | 0 | 89 | | name: "IX_AlterationPlan_StartedAt", |
| | 0 | 90 | | table: "AlterationPlans", |
| | 0 | 91 | | column: "StartedAt"); |
| | | 92 | | |
| | 0 | 93 | | migrationBuilder.CreateIndex( |
| | 0 | 94 | | name: "IX_AlterationPlan_Status", |
| | 0 | 95 | | table: "AlterationPlans", |
| | 0 | 96 | | column: "Status"); |
| | 0 | 97 | | } |
| | | 98 | | |
| | | 99 | | /// <inheritdoc /> |
| | | 100 | | protected override void Down(MigrationBuilder migrationBuilder) |
| | | 101 | | { |
| | 0 | 102 | | migrationBuilder.DropTable( |
| | 0 | 103 | | name: "AlterationJobs"); |
| | | 104 | | |
| | 0 | 105 | | migrationBuilder.DropTable( |
| | 0 | 106 | | name: "AlterationPlans"); |
| | 0 | 107 | | } |
| | | 108 | | } |
| | | 109 | | } |