I have changed the Django models, and I use the Django schemamigration
to update the database. But, when I do python manager.py migrate app
, it throws this error message:
_mysql_exceptions.OperationalError: (1050, "Table 'forum_user' already exists")
Then the table that django south is trying to create already exists and doesn't match the state of your database.
If this is the first time you're migrating, remember that before you make schemamigration changes, you must set the initial state via schemamigration myapp --initial
and migrate app --fake
to match the database to the south database state.
manage.py convert_to_south myapp
also does the above as a convenience method.
Note django 1.7+ ships with migrations and south is no longer in use.
There are only two commands worth noting..
Written by the same author as South, crowd funded. Go django.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With