Reputation: 565
I made many changes in my django app and when working locally i reset the database, deleted the migration and reseted south, recreated everything all over and it worked fine. when trying to do the same in Heroku, after droping the database using:
heroku pg:reset DATABASE
and also reseting south using:
heroku run ./manage.py reset south
and then pushing the Django app when looking at the heroku migration list using:
heroku run ./manage.py migrate --list
i can still see all of the old imgration, though they are empty-- no * in the () so even after doing
heroku run python ./manage.py migrate accounts --fake
i still get migration errors:
DatabaseError at /admin/accounts/userprofile/
****relation "accounts_userprofile" does not exist
LINE 1: SELECT COUNT(*) FROM "accounts_userprofile"****
what can i do to solve it? is there a wayy to remove old migrations in heroku and just do it simple like when working locally by starting all over again? or is their any other solution?
Upvotes: 0
Views: 643
Reputation: 14939
--fake
is used when the database tables already exists and you no longer need to actually migrate the real database. As the tables don't exist, you should just run migrate
without --fake
.
Upvotes: 1