#23101: Changing name of M2MField while db_table keeps table name unchanged
leads
to spurious migration that changes table name
-------------------------------------+-------------------------------------
Reporter: maney@… | Owner:
Type: Bug | abraham.martin
Component: Migrations | Status: new
Severity: Release blocker | Version: 1.7-rc-2
Keywords: | Resolution:
Has patch: 0 | Triage Stage: Accepted
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mattias Linnap <mattias@…>):
On both 1.7 RC2 and master, makemigrations and migrate run without errors.
For models One and Two it asks you if you renamed the models. But for
models Three and Four, the old fields are removed and new fields are added
instead of being detected as renames:
{{{
Did you rename the foo.One model to Onesie? [y/N] y
Did you rename the foo.Two model to Twosies? [y/N] y
Migrations for 'foo':
0002_auto_20140728_1821.py:
- Rename model One to Onesie
- Rename model Two to Twosies
- Add field ring to four
- Add field ringsies to three
- Remove field ringsie from four
- Remove field ring from three
}}}
This may or may not be correct, depending on how clever the rename
detector is supposed to be?
--
Ticket URL: <https://code.djangoproject.com/ticket/23101#comment:8>
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/073.d98d40ccb0b7ea6eb3b884a2991aa9ec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.