summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-04-27 15:19:54 -0400
committerTim Graham <timograham@gmail.com>2014-04-27 15:19:54 -0400
commit1ce759b69f641fd780790630c79559fc68a2d923 (patch)
tree80ec284d235f69f2d3e337c564c127df6915b506 /docs
parentab8d8e00c9d34a48a640434f454d98c02cfaeb54 (diff)
Fixed #22445 -- Added how to perform a reverse data migration to topic guide.
Thanks Karen Tracey for the report.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/migrations.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index c78e395305..5afdaf2d72 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -389,6 +389,11 @@ need to do is use the historical model and iterate over the rows::
Once that's done, we can just run ``python manage.py migrate`` as normal and
the data migration will run in place alongside other migrations.
+You can pass a second callable to
+:class:`~django.db.migrations.operations.RunPython` to run whatever logic you
+want executed when migrating backwards. If this callable is omitted, migrating
+backwards will raise an exception.
+
If you're interested in the more advanced migration operations, or want
to be able to write your own, see the :doc:`migration operations reference
</ref/migration-operations>`.