From d71e6698f43cf1c74d441e958fbf3d64b9ac7c1f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 6 Dec 2019 12:42:59 -0500 Subject: [PATCH] Extend git commit hook to check for missing schema migrations --- scripts/git-hooks/pre-commit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/git-hooks/pre-commit b/scripts/git-hooks/pre-commit index 5974f91d8..e6074ef9f 100755 --- a/scripts/git-hooks/pre-commit +++ b/scripts/git-hooks/pre-commit @@ -12,3 +12,5 @@ exec 1>&2 echo "Validating PEP8 compliance..." pycodestyle --ignore=W504,E501 netbox/ +echo "Checking for missing migrations..." +python netbox/manage.py makemigrations --dry-run --check