Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter table add constraint check #4120

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Apr 28, 2023

Support for basic MySql and Postgres alter table constraint check.

Reuse of the inherited check_constraint in base sql-psi as current grammer expr doesn't work.

Add test fixtures for dialects

ALTER TABLE t1 
 ADD CONSTRAINT chk_c1 
 CHECK (c1 > 0);

Note: SQLite only supports a limited subset of ALTER TABLE, this excludes adding constraints.

Update mysql grammer support for table add constraint check

uses inherited check_constraint expression
Update postgressql grammer support for table add constraint check

uses inherited check_constraint expression
@AlecKazakova AlecKazakova merged commit c8784ac into cashapp:master Apr 28, 2023
@griffio griffio deleted the alter-table-add-constraint-check branch May 31, 2023 12:08
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.

None yet

2 participants