Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an `update migration` (ala South) option for django.db.migrations?

In South there was a nice command:

schemamigration frontend --auto --update

Which would take the most recent (unapplied) migration and update it to match whatever change was in the model. It was really handy during dev.

Does the new django migrations module that was introduced in 1.7 have an option like that? Looking at the docs I suspect not: https://docs.djangoproject.com/en/1.7/ref/django-admin/#django-admin-makemigrations

like image 866
Civilian Avatar asked Dec 14 '25 02:12

Civilian


1 Answers

in django >=1.7 there is nothing like this, but you also dont need it actually.

if you make changes in your models, you can either edit the latest migration file if the changes are only defaul values, choices etc, and thats it or just makemigrations and migrate again.

I personally find this way much more clear and easy to work with.

like image 154
doniyor Avatar answered Dec 16 '25 16:12

doniyor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!