# !/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 lackawanna/manage.py migrate

Add script to automatically run database migrations.
Add script to automatically run database migrations.

This was leading to the database becoming out of sync on local
environments and in deployment, leading to inconsistencies. There
was a bug from a migration that hadn't been applied that was causing
issues in the file upload of .docx files as the extension was too long for
the original limit of 5 chars.
