mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #25604 -- Added makemigrations --check option.
Command exits with non-zero status if changes without migrations exist.
This commit is contained in:
parent
a7bb5af50b
commit
3c7d2ee881
5 changed files with 54 additions and 8 deletions
|
@ -104,6 +104,11 @@ details on these changes.
|
|||
``django.template.base.StringOrigin`` aliases for
|
||||
``django.template.base.Origin`` will be removed.
|
||||
|
||||
See the :ref:`Django 1.10 release notes <deprecated-features-1.10>` for more
|
||||
details on these changes.
|
||||
|
||||
* The ``makemigrations --exit`` option will be removed.
|
||||
|
||||
.. _deprecation-removed-in-1.10:
|
||||
|
||||
1.10
|
||||
|
|
|
@ -699,10 +699,21 @@ of a generated one.
|
|||
|
||||
.. django-admin-option:: --exit, -e
|
||||
|
||||
.. deprecated:: 1.10
|
||||
|
||||
Use the :djadminopt:`--check` option instead.
|
||||
|
||||
The ``--exit`` option will cause ``makemigrations`` to exit with error code 1
|
||||
when no migrations are created (or would have been created, if combined with
|
||||
``--dry-run``).
|
||||
|
||||
.. django-admin-option:: --check
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``--check`` option makes ``makemigrations`` exit with a non-zero status
|
||||
when model changes without migrations are detected.
|
||||
|
||||
migrate [<app_label> [<migrationname>]]
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
@ -157,6 +157,10 @@ Management Commands
|
|||
allows specifying the message level that will cause the command to exit with
|
||||
a non-zero status.
|
||||
|
||||
* The new :djadminopt:`makemigrations --check <--check>` option makes the
|
||||
command exit with a non-zero status when model changes without migrations are
|
||||
detected.
|
||||
|
||||
Migrations
|
||||
^^^^^^^^^^
|
||||
|
||||
|
@ -268,7 +272,8 @@ Features deprecated in 1.10
|
|||
Miscellaneous
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
* ...
|
||||
* The ``makemigrations --exit`` option is deprecated in favor of the
|
||||
:djadminopt:`--check` option.
|
||||
|
||||
.. _removed-features-1.10:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue