Skip to content

Commit

Permalink
Fix migration validation issue (#6154)
Browse files Browse the repository at this point in the history
Resolves #6151.
  • Loading branch information
tuliren authored Sep 16, 2021
1 parent 06128ab commit fc64d88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public void migrate(Context context) throws Exception {
// As database schema changes, the generated jOOQ code can be deprecated. So
// old migration may not compile if there is any generated code.
DSLContext ctx = DSL.using(context.getConnection());
ctx.alterTable("attempts").addColumn(DSL.field("temporal_workflow_id", SQLDataType.VARCHAR(256).nullable(true)))
ctx.alterTable("attempts")
.addColumnIfNotExists(DSL.field("temporal_workflow_id", SQLDataType.VARCHAR(256).nullable(true)))
.execute();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ required:
- status
- created_at
- updated_at
additionalProperties: false
additionalProperties: true
properties:
id:
type: number
Expand All @@ -25,8 +25,6 @@ properties:
type: ["null", object]
status:
type: string
temporal_workflow_id:
type: ["null", string]
created_at:
# todo should be datetime.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ required:
- status
- created_at
- updated_at
additionalProperties: false
additionalProperties: true
properties:
id:
type: number
Expand Down

0 comments on commit fc64d88

Please sign in to comment.