1

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 3

1

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>
Sign up to request clarification or add additional context in comments.

Comments

0

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

0

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.

1 Comment

No, it's definitely been added. I did some finagling with --fake; maybe I skipped it somehow and need to backtrack?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.