Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

South - Not detecting changes to Django model

I have Django model that I already have initialized with south using ./manage.py schemamigration (appname) --initial. All was going well through this point, until I decided I needed another field. I added another field and tried to to migrate the change with ./manage.py schemamigration (appname) --auto, but it says:

- Nothing to migrate.

I made sure to migrate the initial changes. Seems to be similar to the problem here, but the solution got me nowhere.

like image 827
Joker Avatar asked Nov 13 '22 04:11

Joker


1 Answers

It's probably because between the --initial migration and the next schemamigration you have to persist the actual migration to the db issuing the command python manage.py migrate my_app.

After doing that first migration then you may add another field, do and schemamigration --auto and commit it to the db again by doing python manage.py migrate my_app

Hope this helps!

like image 83
Paulo Bu Avatar answered Nov 15 '22 06:11

Paulo Bu