4👍
✅
You need to actually run the migrations on Heroku once you have pushed the code generated by makemigrations
. You do this via heroku run manage.py migrate
.
2👍
run the following command from your terminal
heroku run python manage.py migrate
or you can also do:
in your local settings.py
, change your DATABASES
variable to use the heroku one then run from the terminal
python manage.py makemigrations
python manage.py migrate
but you should not normally locally make changes to the heroku production database (as in option 2) except if you are really desperate or don’t care
- [Django]-Heroku Django app not loading static files (404 Not Found)
- [Django]-Retrieve HTTP Header in Django RestFrameWork
- [Django]-What should be the default value for a not Null Unique field
Source:stackexchange.com