Reputation: 954
I had my Django app running on Heroku, but now I want to migrate it to my own web server. Everything went fine except the PostgreSQL database: I exported the database from Heroku and imported the dump file into my own PostgreSQL. When I run python manage.py syncdb
i get the following error:
django.db.utils.ProgrammingError: no schema has been selected to create in
When I open any page in my browser I get this error:
relation "django_session" does not exist
LINE 1: ...ession_data", "django_session"."expire_date" FROM "django_se...
What is the best way to migrate the app (and the database)?
Upvotes: 1
Views: 534
Reputation: 6733
You probably don't have a public schema in your database. Run this in your database to create it:
CREATE SCHEMA public;
After that you don't need to run syncdb, just run:
./manage.py migrate
Upvotes: 1