From ab4686f519ac0a9d826b682297a708367263d3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Sat, 8 Oct 2016 21:43:12 -0300 Subject: [PATCH] check pending migration (#840) --- tests/test_docker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 30a27dad..ced9b182 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -16,3 +16,6 @@ cd project_name # run the project's tests docker-compose -f dev.yml run django python manage.py test + +# return non-zero status code if there are migrations that have not been created +docker-compose -f dev.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }