Skip to content

[pull] main from django:main - #534

Merged
pull[bot] merged 3 commits into
threatcode:mainfrom
django:main
Aug 15, 2026
Merged

[pull] main from django:main#534
pull[bot] merged 3 commits into
threatcode:mainfrom
django:main

Conversation

@pull

@pull pull Bot commented Aug 15, 2026

Copy link
Copy Markdown

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 : )

jacobtylerwalls and others added 3 commits August 14, 2026 15:11
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>
@pull pull Bot locked and limited conversation to collaborators Aug 15, 2026
@pull pull Bot added the ⤵️ pull label Aug 15, 2026
@pull
pull Bot merged commit 3436cf9 into threatcode:main Aug 15, 2026
12 of 13 checks passed
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.

2 participants