-
Notifications
You must be signed in to change notification settings - Fork 326
Add {:nilify, columns}
to on_delete
reference option.
#474
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
Add {:nilify, columns}
to on_delete
reference option.
#474
Conversation
{:nilify, column_list}
to on_delete
reference option.{:nilify, columns}
to on_delete
reference option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, just a small comment
Sounds good to support it. At the same time nobody asked for it, so we are probably fine. :) Especially as nilifying likely covers the exact same cases. |
Sorry I should have put it in description, this person here asked for |
Postgres 15 allows the user to specify which columns should be set to null if the referenced record is deleted.
A side note: I noticed that one of the common on delete options from postgres/mysql is not present:
ON DELETE SET DEFAULT
. I was wondering if this was on purpose or I can submit a PR to add it? I wasn't sure if it was left out on purpose to avoid having to do the same thing for associations.