summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2015-08-27 09:49:35 +1000
committerMarkus Holtermann <info@markusholtermann.eu>2015-09-19 14:54:53 +1000
commit5aa55038ca9ac44b440b56d1fc4e79c876e51393 (patch)
tree1f6a8fd00c0d796135daee79124fe6e520937332 /docs
parent186eb21dc159807dba83148f7c9c50d470745708 (diff)
Fixed #24743, #24745 -- Optimized migration plan handling
The change partly goes back to the old behavior for forwards migrations which should reduce the amount of memory consumption (#24745). However, by the way the current state computation is done (there is no `state_backwards` on a migration class) this change cannot be applied to backwards migrations. Hence rolling back migrations still requires the precomputation and storage of the intermediate migration states. This improvement also implies that Django does not handle mixed migration plans anymore. Mixed plans consist of a list of migrations where some are being applied and others are being unapplied. Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well as everybody involved on the ticket that kept me looking into the issue.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.9.txt19
-rw-r--r--docs/spelling_wordlist1
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index 3f101a5f94..58522e75fa 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -458,6 +458,21 @@ Migrations
* When supplying ``None`` as a value in :setting:`MIGRATION_MODULES`, Django
will consider the app an app without migrations.
+* When applying migrations, the "Rendering model states" step that's displayed
+ when running migrate with verbosity 2 or higher now computes only the states
+ for the migrations that have already been applied. The model states for
+ migrations being applied are generated on demand, drastically reducing the
+ amount of required memory.
+
+ However, this improvement is not available when unapplying migrations and
+ therefore still requires the precomputation and storage of the intermediate
+ migration states.
+
+ This improvement also requires that Django no longer supports mixed migration
+ plans. Mixed plans consist of a list of migrations where some are being
+ applied and others are being unapplied. This was never officially supported
+ and never had a public API that supports this behavior.
+
Models
^^^^^^
@@ -1094,6 +1109,10 @@ Miscellaneous
* The system checks for :class:`~django.contrib.admin.ModelAdmin` now check
instances rather than classes.
+* The private API to apply mixed migration plans has been dropped for
+ performance reasons. Mixed plans consist of a list of migrations where some
+ are being applied and others are being unapplied.
+
.. _deprecated-features-1.9:
Features deprecated in 1.9
diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist
index 0aba338d18..b128ef873f 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -580,6 +580,7 @@ postgresql
pq
pre
precisions
+precomputation
preconfigured
prefetch
prefetched