Skip to content

Conversation

@pyramation
Copy link
Collaborator

No description provided.

- Remove duplicate 'GENERATED' and 'AS IDENTITY' text in AT_AddIdentity case
- Fix sequence name formatting to use 'SEQUENCE NAME schema.table' format
- Handle NO MINVALUE/NO MAXVALUE cases when arg is null in CONSTR_IDENTITY
- Fixes __tests__/kitchen-sink/original-alter-alter-table-column.test.ts

Co-Authored-By: Dan Lynch <[email protected]>
- Format each ALTER TABLE clause on its own line when pretty: true
- Enhanced CONSTR_IDENTITY formatting with proper indentation for sequence options
- Each sequence option appears on its own line with consistent indentation
- Follows existing pretty formatting patterns used throughout the deparser

Example output:
ALTER TABLE public.table1
  ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
    SEQUENCE NAME public.table1
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
  )

Co-Authored-By: Dan Lynch <[email protected]>
- 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]>
@pyramation pyramation closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants