From ec78d9ce97d44a088803a8ba96a73803365746b4 Mon Sep 17 00:00:00 2001 From: Marlon Date: Sat, 5 May 2018 09:28:30 +0000 Subject: [PATCH] Use Heroku's Release Phase for Migrations (#1615) Automatically run migrations on deployments to Heroku. Advantages include deployments are rolled-back if a migration fails, preventing broken applications due to failed migrations, no time between when application is released and database is migrated, and removes risk of forgetting to manually run migrations. --- {{cookiecutter.project_slug}}/Procfile | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/Procfile b/{{cookiecutter.project_slug}}/Procfile index c77d76d9..9441ca23 100644 --- a/{{cookiecutter.project_slug}}/Procfile +++ b/{{cookiecutter.project_slug}}/Procfile @@ -1,3 +1,4 @@ +release: ./manage.py migrate web: gunicorn config.wsgi:application {% if cookiecutter.use_celery == "y" -%} worker: celery worker --app={{cookiecutter.project_slug}}.taskapp --loglevel=info