You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add multi-line pretty formatting for ALTER TABLE statements
- 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]>
Copy file name to clipboardExpand all lines: packages/deparser/__tests__/pretty/__snapshots__/alter-table-column.test.ts.snap
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,14 @@
2
2
3
3
exports[`non-pretty: original/alter/alter-table-column-1.sql 1`] =`"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)"`;
4
4
5
-
exports[`pretty: original/alter/alter-table-column-1.sql 1`] =`"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)"`;
0 commit comments