#23630: AlterModelTable doesn't rename auto-created tables
---------------------------------+-------------------------------------
Reporter: Naddiseo | Owner: timgraham
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):
* cc: andrewgodwin (added)
Comment:
My thinking is to add a check in the
[https://github.com/django/django/blob/3a34e45fdbecc1f1ead0a3c2f1c01111a865710e/django/db/migrations/autodetector.py#L923-L929
generate_altered_db_table()] method and add an `AlterModelTable` operation
for the implicit M2M model to fix this, but `m2m_field.rel.through` is
returning `None` there instead of behaving the way it does in a normal
shell: `Eggs._meta.get_field('m2m').rel.through._meta.db_table` ->
`'hello_eggs_m2m'`. Andrew, do you have any guidance?
--
Ticket URL: <https://code.djangoproject.com/ticket/23630#comment:7>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.f50fa55fc5457e9a1493ba6a2eb45599%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.