I\'m trying to deploy my Django application to Heroku. The migrations are in my local Git. When I try:
git push heroku master heroku run python manage.py syncdb
You can use postgresql:
In settings.py add(at the end of file):
settings.py
# ie if Heroku server if 'DATABASE_URL' in os.environ: import dj_database_url DATABASES = {'default': dj_database_url.config()}
In requirements.txt add:
requirements.txt
dj-database-url psycopg2
Now you can run: heroku run python manage.py migrate
heroku run python manage.py migrate