Skip to content

Commit ca12fc4

Browse files
fix: add COLLATE clause support to ALTER TABLE ADD COLUMN
- Add collClause handling to AT_AddColumn case in AlterTableCmd function - Follows same pattern as ColumnDef function for consistency - Fixes parse/deparse cycle for ALTER TABLE statements with COLLATE clauses Co-Authored-By: Dan Lynch <[email protected]>
1 parent 44df580 commit ca12fc4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/deparser/src/deparser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4735,6 +4735,10 @@ export class Deparser implements DeparserVisitor {
47354735
parts.push(this.TypeName(colDefData.typeName, context));
47364736
}
47374737

4738+
if (colDefData.collClause) {
4739+
parts.push(this.CollateClause(colDefData.collClause, context));
4740+
}
4741+
47384742
if (colDefData.fdwoptions && colDefData.fdwoptions.length > 0) {
47394743
parts.push('OPTIONS');
47404744
const columnContext = context.spawn('ColumnDef');

0 commit comments

Comments
 (0)