0

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?

0

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.