So, locally I've changed my models a few times and used South to get everything working. I have a postgres database to power my live site, and one model keeps triggering a column mainsite_message.spam does not exist error. But when I run heroku run python manage.py migrate mainsite from the terminal, I get Nothing to migrate. All my migrations have been pushed.
3 Answers
Get the list of migrations available for your apps (it will mark what are pending and what others are migrated).
heroku run python manage.py migrate <your app name> --list
if you have migrated with --fake, then identify the number of migration is pending (0003, for example) then do a revert of migrations to get the the previous state:
heroku run python manage.py migrate <your_app_name> 0002 --fake
now try again to migrate.
heroku run python manage.py migrate <your app name>
Comments
Did you run schemamigration before? If yes, go to your database and take a look at your table "south_migrationhistory" there you can see what happened.
If you already did the steps above you should try to open your migration file and take a look as well, there you can find if the creation column is specified or not!
Comments
I presume that you have created a migration to add mainsite_message.spam to the schema. Have you made sure that this migration is in your git repository?
If you type git status you should see untracked files. If the migration is untracked you need to git add path_to_migration and then push it to Heroku before you can run it there.