summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMounir Messelmeni <messelmeni.mounir@gmail.com>2016-02-12 11:02:36 +0100
committerTim Graham <timograham@gmail.com>2016-02-12 13:34:56 -0500
commit50931dfa5310d5ae1c6e2852d05bf1e86700827f (patch)
tree18350e95bf9dce60b35da528a898525b9155044e /docs
parent004ba0f99eb25c3f32aa3a41707534e955d1878e (diff)
Fixed #25304 -- Allowed management commands to check if migrations are applied.
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/custom-management-commands.txt8
-rw-r--r--docs/releases/1.10.txt6
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
index 36baa629ed..cf84b498ef 100644
--- a/docs/howto/custom-management-commands.txt
+++ b/docs/howto/custom-management-commands.txt
@@ -231,6 +231,14 @@ All attributes can be set in your derived class and can be used in
``True``, the output will automatically be wrapped with ``BEGIN;`` and
``COMMIT;``. Default value is ``False``.
+.. attribute:: BaseCommand.requires_migrations_checks
+
+ .. versionadded:: 1.10
+
+ A boolean; if ``True``, the command prints a warning if the set of
+ migrations on disk don't match the migrations in the database. A warning
+ doesn't prevent the command from executing. Default value is ``False``.
+
.. attribute:: BaseCommand.requires_system_checks
A boolean; if ``True``, the entire Django project will be checked for
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index c152c1dc78..db4f7d4632 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -248,6 +248,12 @@ Management Commands
* Added a warning to :djadmin:`dumpdata` if a proxy model is specified (which
results in no output) without its concrete parent.
+* The new :attr:`BaseCommand.requires_migrations_checks
+ <django.core.management.BaseCommand.requires_migrations_checks>` attribute
+ may be set to ``True`` if you want your command to print a warning, like
+ :djadmin:`runserver` does, if the set of migrations on disk don't match the
+ migrations in the database.
+
Migrations
~~~~~~~~~~