Has anyone written a unit test to verify if there are ungenerated migrations in their Django app? I think it should probably look something like:
python manage.py makemigrations"no migrations were found"If not, I am going to write one so that we fail our build.
Since Django 1.10 the makemigrations management command has included a --check option. The command will exit with a non-zero status if migrations are missing.
Usage example:
./manage.py makemigrations --check --dry-run
Documentation:
https://docs.djangoproject.com/en/2.0/ref/django-admin/#cmdoption-makemigrations-check
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With