summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-23 17:35:42 -0400
committerTim Graham <timograham@gmail.com>2016-08-23 17:35:55 -0400
commit6be255a22a32a58a96b8d1c67485e92b49817b9f (patch)
tree9c4cffe07351cecb9f9bf2eabfba6ae76e503abe
parent4073780219258eec2d3c5f7b84f4f0a3c3cc6515 (diff)
[1.10.x] Fixed #24650 -- Documented how to change an unmanaged model to managed.
Backport of 80c03b06ad1461c1a07091806dc0414a4e98905e from master
-rw-r--r--docs/howto/writing-migrations.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/howto/writing-migrations.txt b/docs/howto/writing-migrations.txt
index c205a1add5..f850e927eb 100644
--- a/docs/howto/writing-migrations.txt
+++ b/docs/howto/writing-migrations.txt
@@ -322,3 +322,12 @@ Also consider what you want to happen when the migration is unapplied. You
could either do nothing (as in the example above) or remove some or all of the
data from the new application. Adjust the second argument of the
:mod:`~django.db.migrations.operations.RunPython` operation accordingly.
+
+Changing an unmanaged model to managed
+======================================
+
+If you want to change an unmanaged model (:attr:`managed=False
+<django.db.models.Options.managed>`) to managed, you must remove
+``managed=False`` and generate a migration before making other schema-related
+changes to the model, since schema changes that appear in the migration that
+contains the operation to change ``Meta.managed`` may not be applied.