Files
zulip/tools/test-migrations
Tim Abbott 24fd3bbf55 travis: Test whether migrations are consistent with models.
This should automatically catch mistakes where someone updates the
database models but forgets to generate migrations afterwards.
2016-01-26 20:38:46 -08:00

11 lines
316 B
Bash
Executable File

#!/bin/bash
set -e
echo 'Testing whether migrations are consistent with models'
if ./manage.py makemigrations -e --dry-run; then
echo
echo 'ERROR: Migrations are not consistent with models! Fix with `./manage.py makemigrations`.'
echo
else
echo "Success! Migrations are consistent with models."
fi