diff options
| author | Markus Holtermann <info@markusholtermann.eu> | 2015-01-08 18:00:04 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-09 10:31:32 -0500 |
| commit | c8bac4b556cf4716dc9003e5da48060cb72ba7cb (patch) | |
| tree | 8d75e220aa544e30a3b7582ff26fa701562437b4 /docs/ref | |
| parent | 67d6a8c4e66c379111d0acf4552e162356917dd7 (diff) | |
Fixed #24098 -- Added no-op attributes to RunPython and RunSQL
Thanks Loïc Bistuer and Tim Graham for the discussion and review.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/migration-operations.txt | 16 |
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 ------------------------ |
