summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-09-02 08:12:49 -0400
committerTim Graham <timograham@gmail.com>2014-09-02 08:12:49 -0400
commit52eadbf5c0bad53ca46eea3bb96a17c3320b55b2 (patch)
tree252bdc12f2579777f71d4c4c54e35a2b9d56ab72
parent7eabd22217dcf2a67173b055ace63ca3fce8eb48 (diff)
Revert "[1.7.x] Undocumented SeparateDatabaseAndState so crash is not RB. Refs #22918"
This reverts commit a7ac5f018726694e3a79180ef97f2813c715fac0.
-rw-r--r--docs/ref/migration-operations.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt
index 057fcc781c..171ddd8ee7 100644
--- a/docs/ref/migration-operations.txt
+++ b/docs/ref/migration-operations.txt
@@ -248,9 +248,9 @@ rest of the code unchanged for data migrations.
Much like :class:`RunSQL`, ensure that if you change schema inside here you're
either doing it outside the scope of the Django model system (e.g. triggers)
-or that you use a custom Operation to reflect your changes to the model
-state - otherwise, the versioned ORM and the autodetector will stop
-working correctly.
+or that you use :class:`SeparateDatabaseAndState` to add in operations that will
+reflect your changes to the model state - otherwise, the versioned ORM and
+the autodetector will stop working correctly.
By default, ``RunPython`` will run its contents inside a transaction even
on databases that do not support DDL transactions (for example, MySQL and
@@ -266,6 +266,18 @@ set ``atomic=False``.
``schema_editor.connection.alias``, where ``schema_editor`` is the second
argument to your function).
+SeparateDatabaseAndState
+------------------------
+
+.. class:: SeparateDatabaseAndState(database_operations=None, state_operations=None)
+
+A highly specialized operation that let you mix and match the database
+(schema-changing) and state (autodetector-powering) aspects of operations.
+
+It accepts two list of operations, and when asked to apply state will use the
+state list, and when asked to apply changes to the database will use the database
+list. Do not use this operation unless you're very sure you know what you're doing.
+
Writing your own
================