Fixed #23728 -- Added the --exit option to makemigrations.

If no changes that need migrations are found, `makemigrations --exit`
exits with error code 1.
This commit is contained in:
Tim Heap 2014-11-11 15:41:55 +11:00 committed by Tim Graham
parent ab89414f40
commit deb607648e
5 changed files with 40 additions and 8 deletions

View file

@ -719,6 +719,14 @@ a merge.
The ``--name`` option allows you to give the migration(s) a custom name instead
of a generated one.
.. django-admin-option:: --exit, -e
.. versionadded:: 1.8
The ``--exit`` option will cause ``makemigrations`` to exit with error code 1
when no migration are created (or would have been created, if combined with
``--dry-run``).
migrate [<app_label> [<migrationname>]]
---------------------------------------