Skip to content

Commit 96fc5e4

Browse files
authored
Merge pull request #200 from launchql/pg/create-index-345
fix: preserve num field in AlterTableCmd 14->15 transformation
2 parents 8521f2d + f52083c commit 96fc5e4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/transform/src/transformers/v14-to-v15.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,10 @@ export class V14ToV15Transformer {
786786
result.name = node.name;
787787
}
788788

789+
if (node.num !== undefined) {
790+
result.num = node.num;
791+
}
792+
789793
if (node.newowner !== undefined) {
790794
result.newowner = this.transform(node.newowner as any, context);
791795
}

packages/transform/test-utils/skip-tests/transformer-errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const transformerErrors: SkipTest[] = [
1616
[15, 16, "latest/postgres/create_index-326.sql", "15-16 transformer fails with syntax error at end of input"],
1717
// [15, 16, "latest/postgres/create_index-184.sql", "15-16 transformer fails with missing nulls_not_distinct property"],
1818

19-
[14, 15, "latest/postgres/create_index-345.sql", "AST transformation mismatch (extra \"num\": 1 field)"],
19+
// [14, 15, "latest/postgres/create_index-345.sql", "AST transformation mismatch (extra \"num\": 1 field)"],
2020

2121
[13, 14, "original/upstream/rangetypes-300.sql", "AST transformer bug - converts FUNC_PARAM_DEFAULT to FUNC_PARAM_IN for function parameters"],
2222
[13, 14, "original/upstream/rangetypes-294.sql", "AST transformer bug - converts FUNC_PARAM_DEFAULT to FUNC_PARAM_IN for function parameters"],

0 commit comments

Comments
 (0)