Last active
October 23, 2020 08:42
-
-
Save kylefox/7044491259b6b2586ca1 to your computer and use it in GitHub Desktop.
Run Django database migrations after deploy to Heroku. This file must live at `bin/post_compile` within your root project directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/usr/bin/env bash | |
# File path should be ./bin/post_compile | |
# (.sh extension added in Gist just to enable shell syntax highlighting. | |
# https://discussion.heroku.com/t/django-automaticlly-run-syncdb-and-migrations-after-heroku-deploy-with-a-buildpack-or-otherwise/466/7 | |
echo "=> Performing database migrations..." | |
python manage.py migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just do:
and you will be fine.