@@ -2,7 +2,7 @@ import { AllAlterActionNodes } from "sql-parser-cst";
2
2
import { CstToDocMap } from "../CstToDocMap" ;
3
3
import { group , join , line } from "../print_utils" ;
4
4
5
- export const alterActionMap : CstToDocMap < AllAlterActionNodes > = {
5
+ export const alterActionMap : Partial < CstToDocMap < AllAlterActionNodes > > = {
6
6
alter_action_rename : ( print ) => print . spaced ( [ "renameKw" , "newName" ] ) ,
7
7
alter_action_rename_column : ( print ) =>
8
8
print . spaced ( [ "renameKw" , "ifExistsKw" , "oldName" , "toKw" , "newName" ] ) ,
@@ -14,7 +14,10 @@ export const alterActionMap: CstToDocMap<AllAlterActionNodes> = {
14
14
print . spaced ( [ "setKw" , "options" ] ) ,
15
15
alter_action_set_default_collate : ( print ) =>
16
16
print . spaced ( [ "setDefaultCollateKw" , "collation" ] ) ,
17
- alter_action_add_constraint : ( print ) => print . spaced ( [ "addKw" , "constraint" ] ) ,
17
+ alter_action_add_constraint : ( print ) =>
18
+ print . spaced ( [ "addKw" , "name" , "constraint" , "modifiers" ] ) ,
19
+ alter_action_add_constraint_constraint_name : ( print ) =>
20
+ print . spaced ( [ "constraintKw" , "name" ] ) ,
18
21
alter_action_drop_constraint : ( print ) =>
19
22
print . spaced ( [
20
23
"dropConstraintKw" ,
0 commit comments