Running ./manage.py migrate during Heroku deployment

后端 未结 4 979
遥遥无期
遥遥无期 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 13:58

    Procfile

    release: python manage.py migrate --noinput
    web: gunicorn mysite.wsgi
    

    documented at https://devcenter.heroku.com/articles/release-phase#specifying-release-phase-tasks

提交回复
热议问题