Django - Relation "relation" does not exist. Cannot run python manage.py migrate? Django - Relation "relation" does not exist. Cannot run python manage.py migrate? postgresql postgresql

Django - Relation "relation" does not exist. Cannot run python manage.py migrate?


As per my comment, in your situation you might run:

python manage.py migrate yourapp --fake

to "fake" applying the migration but not actually alter your database.

You can read more HERE

Hope this helps.


I deleted a table from postgres and then django was unable to detect the change. I tried everything but django didn't created a new table. Finally I fixed this with some alternate way.

login to your database create table manually.- Get the create command from django itself.

python manage.py sqlmigrate 'yourapp' 001

this will give you the initial command django used to create the table.

one by one get all the migrations and execute commands on database by command line.