Skip to content

Commit fc64d88

Browse files
authored
Fix migration validation issue (#6154)
Resolves #6151.
1 parent 06128ab commit fc64d88

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

airbyte-db/lib/src/main/java/io/airbyte/db/instance/jobs/migrations/V0_29_15_001__Add_temporalWorkflowId_col_to_Attempts.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public void migrate(Context context) throws Exception {
3838
// As database schema changes, the generated jOOQ code can be deprecated. So
3939
// old migration may not compile if there is any generated code.
4040
DSLContext ctx = DSL.using(context.getConnection());
41-
ctx.alterTable("attempts").addColumn(DSL.field("temporal_workflow_id", SQLDataType.VARCHAR(256).nullable(true)))
41+
ctx.alterTable("attempts")
42+
.addColumnIfNotExists(DSL.field("temporal_workflow_id", SQLDataType.VARCHAR(256).nullable(true)))
4243
.execute();
4344
}
4445

airbyte-db/lib/src/main/resources/jobs_database/Attempts.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ required:
1111
- status
1212
- created_at
1313
- updated_at
14-
additionalProperties: false
14+
additionalProperties: true
1515
properties:
1616
id:
1717
type: number
@@ -25,8 +25,6 @@ properties:
2525
type: ["null", object]
2626
status:
2727
type: string
28-
temporal_workflow_id:
29-
type: ["null", string]
3028
created_at:
3129
# todo should be datetime.
3230
type: string

airbyte-migration/src/main/resources/migrations/migrationV0_14_0/airbyte_db/Attempts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ required:
1111
- status
1212
- created_at
1313
- updated_at
14-
additionalProperties: false
14+
additionalProperties: true
1515
properties:
1616
id:
1717
type: number

0 commit comments

Comments
 (0)