-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow some named inline column constraints
Allow some named inline column constraints in `CREATE TABLE` statements. SQL like this can be converted to a pgroll `Column`: ```sql CREATE TABLE foo(a int CONSTRAINT my_check CHECK (a > 0)) CREATE TABLE foo(a int CONSTRAINT my_fk REFERENCES bar(b)) ``` The previous behaviour was to allow only the unamed forms of these: ```sql CREATE TABLE foo(a int CHECK (a > 0)) CREATE TABLE foo(a int REFERENCES bar(b)) ``` Named inline column constraints remain unsupported for `DEFAULT`, `NULL`, `NOT NULL`, `UNIQUE` and `PRIMARY KEY` constraints.
- Loading branch information
1 parent
20962cc
commit 904fbce
Showing
3 changed files
with
80 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters