#33197: Renaming field and providing prior field name to db_column should be an
SQL
noop
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Simon Charette):
You'll want to adjust `AlterField.name` accordingly if you swap the order
of operations; change `name='core_renamed'` to `name='core'`.
{{{#!python
operations = [
migrations.AlterField(
model_name='apple',
name='core',
field=models.BooleanField(db_column='core'),
),
migrations.RenameField(
model_name='apple',
old_name='core',
new_name='core_renamed',
),
]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33197#comment:3>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/073.22946d58f15364855056c3b98de4a882%40djangoproject.com.