Reputation: 223
Running a Django app on Heroku. Locally, I'm using the db.sqlite3 db
, while on Heroku, it's the PostgreSQL.
I have one migration, reflecting locally, but not in Heroku, where it keeps giving me an error that "it can't find a field". I haven't configured PostgreSQL in any special way, so far I just ran
heroku run python manage.py migrate
and that seemed to do the trick.
How can I make the field change update in Heroku's db?
Upvotes: 0
Views: 149
Reputation: 1299
Heroku won't run migrations for you automatically - that is why it worked when you ran heroku run python manage.py migrate
If you want automatic migrations the easiest way to do this is by adding this at the end of your Procfile
release: python manage.py migrate
Any new migration you add to your django app will be automatically applied
Upvotes: 1