Applying Django migrations in a non-interactive environment Applying Django migrations in a non-interactive environment heroku heroku

Applying Django migrations in a non-interactive environment


You can use the --noinput command line argument of migrate command:

./manage.py migrate --noinput

This would suppress the prompt, but will not delete stale content types (ie. it works as if you answered No at the prompt). See Django ticket #25036 .

Another alternative would be to use the Unix command yes (I am not sure if it is enabled on Heroku by default though):

yes "yes" | ./manage.py migrate