Unable to create the django_migrations table (no schema has been selected to create in)

I came across this error when I was doing

python manage.py migrate

Some background about the state of the PostgreSQL database I was using: I have initial deleted all the tables and recreated the recreate the PUBLIC schema. To solve this I had to do some revoke on public and do a grant. The SQL is follows:


REVOKE ALL ON SCHEMA public FROM PUBLIC;

GRANT ALL ON SCHEMA public to PUBLIC;

Thats it!

Leave a Reply

Your email address will not be published. Required fields are marked *