2016-01-10 05:15:19 +01:00
|
|
|
#!/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
|
2016-01-10 05:15:19 +01:00
|
|
|
echo
|
2017-04-05 11:49:21 +02:00
|
|
|
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.'
|
2016-01-10 05:15:19 +01:00
|
|
|
echo
|
2016-06-15 18:19:54 +02:00
|
|
|
exit 1
|
2016-01-10 05:15:19 +01:00
|
|
|
else
|
|
|
|
echo "Success! Migrations are consistent with models."
|
|
|
|
fi
|