#36800: Issue with ManyToManyField renaming
-------------------------------------+-------------------------------------
Reporter: Josik | Owner: Clifford
| Gama
Type: Bug | Status: closed
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"6cc1231285a20b11058143f8cb0a6b4b3999b23a" 6cc1231]:
{{{#!CommitTicketReference repository=""
revision="6cc1231285a20b11058143f8cb0a6b4b3999b23a"
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 <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36800#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019b295730d6-3909479d-5bb8-49e6-91a4-78bdae097d25-000000%40eu-central-1.amazonses.com.