DerekStride / tree-sitter-sql

SQL grammar for tree-sitter
http://derek.stride.host/tree-sitter-sql/
MIT License
160 stars 54 forks source link

Fix ALTER TABLE ... ADD CONSTRAINT ... UNIQUE #205

Closed antoineB closed 1 year ago

antoineB commented 1 year ago

Make the statement work with postgres syntax while keeping the previous mariadb syntax (which seems to be used in create table only).

Why does ALTER TABLE "Role" ADD CONSTRAINT "pkRole" PRIMARY KEY ("roleId"); CST has ordered_columns while ALTER TABLE table_name ADD CONSTRAINT constraint_name UNIQUE (col1, col2, col3); does not ?