Currently there no way to do this using migrations. I've checked''
RunSQL''**** but I don't whether this is the way of doing it.
--
Ticket URL: <https://code.djangoproject.com/ticket/33466>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> MySQL Specific: Let's say I've a table with columns **first_name,
> last_name, address**'''' later on I may need to add column
> ''middle_name'' **** AFTER ''first_name''****
>
> Currently there no way to do this using migrations. I've checked''
> RunSQL''**** but I don't whether this is the way of doing it.
New description:
MySQL Specific: Let's say I've a table with columns **first_name,
last_name, address**'''' later on I may need to add column **middle_name**
''''AFTER **first_name**''''
Currently there no way to do this using migrations. I've checked''
RunSQL''**** but I don't whether this is the way of doing it.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33466#comment:1>
Old description:
> MySQL Specific: Let's say I've a table with columns **first_name,
> last_name, address**'''' later on I may need to add column
> **middle_name** ''''AFTER **first_name**''''
>
> Currently there no way to do this using migrations. I've checked''
> RunSQL''**** but I don't whether this is the way of doing it.
New description:
MySQL Specific: Let's say I've a table with columns **first_name,
last_name, address** later on I may need to add column **middle_name**
AFTER **first_name**
Currently there no way to do this using migrations. I've checked''
RunSQL''**** but I don't whether this is the way of doing it.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33466#comment:2>
* status: new => closed
* resolution: => invalid
Comment:
Does the order in which the columns are added to the table really matter
to you? I cannot image any scenario where this could be an issue. You can
always do this in 4 steps:
- create a new model with a temporary name,
- copy data between models,
- drop old model,
- rename new model to the target name.
--
Ticket URL: <https://code.djangoproject.com/ticket/33466#comment:3>
--
Ticket URL: <https://code.djangoproject.com/ticket/33466#comment:4>