summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGeorgi Yanchev <georgi.yanchev@gmail.com>2025-01-20 09:12:09 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-22 10:56:30 +0100
commit64b1ac7292c72d3551b2ad70b2a78c8fe4af3249 (patch)
tree2d450bab4fef8e37e1466b4478ecad7a94396f23 /docs
parent322785b08cf21f2b7a627caf459e73e6170dd602 (diff)
Fixed #24529 -- Allowed double squashing of migrations.
Co-authored-by: Raphael Gaschignard <raphael@rtpg.co>
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/6.0.txt3
-rw-r--r--docs/topics/migrations.txt13
2 files changed, 12 insertions, 4 deletions
diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt
index 1496b1ef0e..9dabf7f666 100644
--- a/docs/releases/6.0.txt
+++ b/docs/releases/6.0.txt
@@ -169,7 +169,8 @@ Management Commands
Migrations
~~~~~~~~~~
-* ...
+* Squashed migrations can now themselves be squashed before being transitioned
+ to normal migrations.
Models
~~~~~~
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index f9748f0d9d..646b8d5116 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -733,7 +733,7 @@ migrations it replaces and distribute this change to all running instances
of your application, making sure that they run ``migrate`` to store the change
in their database.
-You must then transition the squashed migration to a normal migration by:
+You can then transition the squashed migration to a normal migration by:
- Deleting all the migration files it replaces.
- Updating all migrations that depend on the deleted migrations to depend on
@@ -742,8 +742,11 @@ You must then transition the squashed migration to a normal migration by:
squashed migration (this is how Django tells that it is a squashed migration).
.. note::
- Once you've squashed a migration, you should not then re-squash that squashed
- migration until you have fully transitioned it to a normal migration.
+ You can squash squashed migrations themselves without transitioning to
+ normal migrations, which might be useful for situations where every
+ environment has not yet run the original squashed migration set. But in
+ general it is better to transition squashed migrations to normal migrations
+ to be able to clean up older migration files.
.. admonition:: Pruning references to deleted migrations
@@ -751,6 +754,10 @@ You must then transition the squashed migration to a normal migration by:
future, you should remove references to it from Django’s migrations table
with the :option:`migrate --prune` option.
+.. versionchanged:: 6.0
+
+ Support for squashing squashed migrations was added.
+
.. _migration-serializing:
Serializing values