Running ./manage.py migrate during Heroku deployment

后端 未结 4 985
遥遥无期
遥遥无期 2020-12-23 13:47

I am working on a Django app, and I would like my Database migrations to be run when deploying on Heroku.

So far we have simply put the following command in the Proc

4条回答
  •  醉酒成梦
    2020-12-23 14:07

    The migrate does automatically runs on Heroku, but for now you can safely do it once your dyno is deployed with heroku run python manage.py migrate.

    If production, you can put your app in maintenance first with heroku maintenance:on --app=

提交回复
热议问题