I had a similar problem.
ssh into heroku dyno with:
heroku run bash ( from your heroku application folder ofc )
Than run all the migration and makemigration commands with createsuperuser if needed.
Works with sqlite and postgre for me.
- Run these commands locally:
python manage.py makemigrations
python manage.py migrate
Commit your code
Push it to Heroku master
heroku run python manage.py makemigrations
heroku run python manage.py migrate
Your issue should be resolved now.
I struggled recently with a similar error and ended discovering that i mistakenly have been git ignoring init.py files. Without these files in the migrations folder, the migrate command cannot find the migration files and execute them.
migrate, then pushed to remote repo.
- Best way to denormalize data in Django?
- Django how to reconnect after DatabaseError: query timeout
- Django 1.7 upgrade error: AppRegistryNotReady: Models aren't loaded yet
- 'WSGIRequest' object has no attribute 'get'
- Return image url in Django Rest Framework
I ran into the same error two times while deploying to Heroku. While listing the files under the app directory, I found out db.sqlite3 file was missing which is necessary for django to create the sql tables. While it automatically creates the file in local, it wasn’t getting created on the heroku while running migrate command.
There are two options from here:
- create db.sqlite3 file on heroku under your app directory
- run "python manage.py migrate" locally to create the db.sqlite3 and push it to the