diff options
| author | Clifford Gama <cliffygamy@gmail.com> | 2025-12-15 23:36:24 +0200 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-16 17:47:10 -0500 |
| commit | ba7f49c32118ecbe03c53414c71caafd2d5d2bd2 (patch) | |
| tree | 7795acf0a3e1ccb03b643e3c34e7790d70d1092c /docs | |
| parent | be26ac85fdf06a7a8a655f6e7000b1263890717d (diff) | |
[6.0.x] Fixed #36800 -- Restored ManyToManyField renaming in BaseDatabaseSchemaEditor.alter_field().
Regression in f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2.
Now that ManyToManyField is no longer concrete the decision of whether or not
it should be altered, which is also relied on by field renaming, should take
into consideration name changes even if it doesn't have a column associated
with it, as auto-created many-to-many relationship table names are a base of it.
Note that there is room for optimization here where a rename can be entirely
avoided if ManyToManyField.db_table remains stable between .name changes, just
like we do with Field.db_column remaining stable, but since this is a
regression and meant to be backported the current patch focuses on correctness
over further improvements.
Thanks Josik for the report.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Backport of 6cc1231285a20b11058143f8cb0a6b4b3999b23a from main.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/6.0.1.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/releases/6.0.1.txt b/docs/releases/6.0.1.txt index 72c35b3e69..a84d49b07a 100644 --- a/docs/releases/6.0.1.txt +++ b/docs/releases/6.0.1.txt @@ -12,3 +12,7 @@ Bugfixes * Fixed a regression in Django 6.0 where :ttag:`querystring` mishandled multi-value :class:`~django.http.QueryDict` keys, both by only preserving the last value and by incorrectly handling ``None`` values (:ticket:`36783`). + +* Fixed a regression in Django 6.0 that prevented changing the name of a + :class:`~django.db.models.ManyToManyField` from taking effect when applying + migrations (:ticket:`36800`). |
