diff options
| author | Markus Holtermann <info@markusholtermann.eu> | 2015-09-12 17:18:24 +1000 |
|---|---|---|
| committer | Markus Holtermann <info@markusholtermann.eu> | 2015-09-19 14:55:34 +1000 |
| commit | 43f2eb7ef327126271a8c70d6fde5713947150a5 (patch) | |
| tree | 7ca77f515be7253a42cc952a2f9f4b57001988ca /docs | |
| parent | 5aa55038ca9ac44b440b56d1fc4e79c876e51393 (diff) | |
Fixed #25390 -- Allowed specifying a start migration in squashmigrations
Thanks Tim Graham for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/django-admin.txt | 11 | ||||
| -rw-r--r-- | docs/releases/1.9.txt | 3 | ||||
| -rw-r--r-- | docs/topics/migrations.txt | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 02ab4f0614..18e8ec1ca0 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1049,8 +1049,8 @@ of sync with its automatically incremented field data. The :djadminopt:`--database` option can be used to specify the database for which to print the SQL. -squashmigrations <app_label> <migration_name> ---------------------------------------------- +squashmigrations <app_label> [<start_migration_name>] <migration_name> +---------------------------------------------------------------------- .. django-admin:: squashmigrations @@ -1059,6 +1059,13 @@ down into fewer migrations, if possible. The resulting squashed migrations can live alongside the unsquashed ones safely. For more information, please read :ref:`migration-squashing`. +.. versionadded:: 1.9 + +When ``start_migration_name`` is given, Django will only include migrations +starting from and including this migration. This helps to mitigate the +squashing limitation of :class:`~django.db.migrations.operations.RunPython` and +:class:`django.db.migrations.operations.RunSQL` migration operations. + .. django-admin-option:: --no-optimize By default, Django will try to optimize the operations in your migrations diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index 58522e75fa..6bacdb1ae2 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -473,6 +473,9 @@ Migrations applied and others are being unapplied. This was never officially supported and never had a public API that supports this behavior. +* The :djadmin:`squashmigrations` command now supports specifying the starting + migration from which migrations will be squashed. + Models ^^^^^^ diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index 4fe3b5d329..57b6c3216a 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -572,7 +572,7 @@ possible depends on how closely intertwined your models are and if you have any :class:`~django.db.migrations.operations.RunSQL` or :class:`~django.db.migrations.operations.RunPython` operations (which can't be optimized through) - Django will then write it back out into a new set of -initial migration files. +migration files. These files are marked to say they replace the previously-squashed migrations, so they can coexist with the old migration files, and Django will intelligently |
