mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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:
@@ -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>]]
|
||||
---------------------------------------
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@ Management Commands
|
||||
:setting:`FIXTURE_DIRS` contains duplicates or a default fixture directory
|
||||
path (``app_name/fixtures``), an exception is raised.
|
||||
|
||||
* :djadmin:`makemigrations` now supports an :djadminopt:`--exit` option to
|
||||
exit with an error code if no migrations are created.
|
||||
|
||||
Middleware
|
||||
^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user