[pull] main from django:main - #534
Merged
Merged
Conversation
This avoids the need to add `@skipUnlessGISLookup("contained")` while
modeling equally realistic usage.
Support for database-level delete options removed "on_delete" from `Field.non_db_attrs` because changes to or from the new `DB_CASCADE`, `DB_SET_DEFAULT`, and `DB_SET_NULL` options require schema changes. As a consequence, an `AlterField` changing only a Python-level `on_delete` option (such as `CASCADE` to `PROTECT`) performs unnecessary schema changes when it was previously a no-op at the database level. This commit makes `ForeignObject.non_db_attrs` a property that includes `"on_delete"`only when the option is not a database-level one, so that: - Python-level to Python-level changes skip DDL again, - changes to, from, or between database-level options still alter the field. Regression in 0c487aa.
co-authored-by: David Smith <smithdc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )