summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/migration-operations.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt
index 46b87f44c4..dcac7f26a6 100644
--- a/docs/ref/migration-operations.txt
+++ b/docs/ref/migration-operations.txt
@@ -245,6 +245,14 @@ operation that adds that field and so will try to run it again).
The ability to pass parameters to the ``sql`` and ``reverse_sql`` queries
was added.
+.. attribute:: RunSQL.noop
+
+ .. versionadded:: 1.8
+
+ Pass the ``RunSQL.noop`` attribute to ``sql`` or ``reverse_sql`` when you
+ want the operation not to do anything in the given direction. This is
+ especially useful in making the operation reversible.
+
.. _sqlparse: https://pypi.python.org/pypi/sqlparse
RunPython
@@ -321,6 +329,14 @@ set ``atomic=False``.
``schema_editor.connection.alias``, where ``schema_editor`` is the second
argument to your function).
+.. staticmethod:: RunPython.noop
+
+ .. versionadded:: 1.8
+
+ Pass the ``RunPython.noop`` method to ``code`` or ``reverse_code`` when
+ you want the operation not to do anything in the given direction. This is
+ especially useful in making the operation reversible.
+
SeparateDatabaseAndState
------------------------