Skip to content

Commit

Permalink
Merge pull request #352 from dolthub/fulghum/dev-2
Browse files Browse the repository at this point in the history
Add support for the `CONSTRAINT` keyword when adding a foreign key without a constraint name
  • Loading branch information
fulghum authored Jun 12, 2024
2 parents 467efd8 + 3bd4905 commit 20e3b37
Show file tree
Hide file tree
Showing 3 changed files with 5,677 additions and 5,656 deletions.
3 changes: 3 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,9 @@ var (
}, {
input: "alter table a add foreign key (x) references y(z)",
output: "alter table a add foreign key (x) references y (z)",
}, {
input: "alter table a add constraint foreign key (x) references y(z)",
output: "alter table a add foreign key (x) references y (z)",
}, {
input: "alter table a add constraint abc foreign key country_code (country_code) REFERENCES premium_country (country_code)",
output: "alter table a add constraint abc foreign key country_code (country_code) references premium_country (country_code)",
Expand Down
Loading

0 comments on commit 20e3b37

Please sign in to comment.