Originally published on Djangix .
Your Django app says relation 'blog_post' does not exist, but the model is right there in models.py. This post shows how to find out whether the migration was never applied, never created, faked, or run against the wrong database β and the exact command that fixes each case.
Short answer
Short answer: the error means Django asked PostgreSQL for a table that is not in the database it is connected to. The table name in the message is the one Django expects β usually the app label plus the lowercase model name, such as blog_post. In almost every case the cause is one of four things: the migration was never applied, the migration file was never created or committed, the migration was recorded as applied without ever running, or the app is connected to a different database or schema than the one you migrated.β¦