zulip/tools/test-migrations

13 lines
424 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
echo 'Testing whether migrations are consistent with models'
2017-02-11 01:40:55 +01:00
if ! ./manage.py makemigrations --check --dry-run; then
echo
echo 'ERROR: Migrations are not consistent with models! Fix with `./tools/renumber-migrations`.'
echo 'See http://zulip.readthedocs.io/en/latest/schema-migrations.html for details.'
echo
exit 1
else
echo "Success! Migrations are consistent with models."
fi