[Django]-Django Heroku and postgresql

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

Leave a comment