1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28363 -- Allowed naming the migration generated by squashmigrations.

This commit is contained in:
Melvyn Sopacua
2017-02-20 15:45:20 +01:00
committed by Tim Graham
parent 5ccbcc5bf6
commit 5bb9b9a388
5 changed files with 49 additions and 3 deletions

View File

@@ -1132,6 +1132,13 @@ behavior, as optimization is meant to be safe.
Suppresses all user prompts.
.. django-admin-option:: --squashed-name SQUASHED_NAME
.. versionadded:: 2.0
Sets the name of the squashed migration. When omitted, the name is based on the
first and last migration, with ``_squashed_`` in between.
``startapp``
------------

View File

@@ -219,7 +219,8 @@ Management Commands
Migrations
~~~~~~~~~~
* ...
* The new :option:`squashmigrations --squashed-name` option allows naming
the squashed migration.
Models
~~~~~~

View File

@@ -605,6 +605,9 @@ work::
all instances of the codebase have applied the migrations you squashed,
you can delete them.
Use the :option:`squashmigrations --squashed-name` option if you want to set
the name of the squashed migration rather than use an autogenerated one.
Note that model interdependencies in Django can get very complex, and squashing
may result in migrations that do not run; either mis-optimized (in which case
you can try again with ``--no-optimize``, though you should also report an issue),