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

Change relation delete rule to NO ACTION for non-nullable fields #11597

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

Oreilles
Copy link
Contributor

Fixes #9089

The problem was that the default onDelete rule when creating relational fields were SET NULL. When making the relational field not nullable, that constraint would be incompatible, leading to an error message (see #9089), and the field being created without the relation.

@rijkvanzanten rijkvanzanten added this to the v9-next milestone Feb 16, 2022
@rijkvanzanten rijkvanzanten self-assigned this Feb 16, 2022
@rijkvanzanten rijkvanzanten merged commit 7c35f3b into main Feb 16, 2022
@rijkvanzanten rijkvanzanten deleted the fix/nullable-relation-10924 branch February 16, 2022 15:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with M2O and NOT Allowing NULL
2 participants