-
Notifications
You must be signed in to change notification settings - Fork 421
Recognize referential actions as keywords in ON UPDATE/DELETE #849
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
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Thanks. |
Released in 15.5.2 |
Thanks for the review, merge and release! I can confirm that CREATE TABLE orders (
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
customer_id integer REFERENCES customers (id) ON DELETE CASCADE
); |
Hey, I added you as a member of the sql-formatter-org "team". |
Oh wow, that's an honor, thank you! I will look to make more time to contribute here in the next months! |
That's great to hear ❤️ You should now have push access to the repository. Feel free to push directly any trivial changes. For larger changes and things you're not certain of, a pull request would be nice. Or you can also do a pull request that you then immediately merge by yourself, as a sort of "I'm letting you know I'm doing this". Use your own best judgement. If you're missing some permissions, ping me. |
Yes, I think I'll probably do PRs for everything anyway, just as a way of communication to everyone 👍 Thanks! |
Hi @nene, hope you're good! 👋
Currently,
[email protected]
does not recognize the PostgreSQLCASCADE
,NO ACTION
orRESTRICT
referential actions as keywords.This means that if identifiers are configured to be lowercased, the referential actions will be lower cased, eg.
ON DELETE cascade
:This PR adjusts the
reservedPhrases
for PostgreSQL to add theCASCADE
,NO ACTION
andRESTRICT
keywords as suffixes forON UPDATE
andON DELETE
.