diff options
| author | Markus Holtermann <info@markusholtermann.eu> | 2014-09-03 10:51:07 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-12-31 14:14:28 -0500 |
| commit | a1487deebff7bf27a4946a9f5ddd68154fa4834d (patch) | |
| tree | 709d13643a09ef0064ae8130483ac970ec5bcf08 /docs | |
| parent | 89527576980ff14309990c152e5904ddd5ca3df7 (diff) | |
Fixed #23359 -- Added showmigrations command to list migrations and plan.
Thanks to Collin Anderson, Tim Graham, Gabe Jackson, and Marc Tamlyn
for their input, ideas, and review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/ref/django-admin.txt | 37 | ||||
| -rw-r--r-- | docs/releases/1.8.txt | 10 |
3 files changed, 41 insertions, 8 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 8aa2c09c4d..70db0c0497 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -123,6 +123,8 @@ details on these changes. * Private attribute ``django.db.models.Field.related`` will be removed. +* The ``--list`` option of the ``migrate`` management command will be removed. + .. _deprecation-removed-in-1.9: 1.9 diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 08ca142a14..de556b28b7 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -770,15 +770,10 @@ be warned that using ``--fake`` runs the risk of putting the migration state table into a state where manual recovery will be needed to make migrations run correctly. -.. django-admin-option:: --list, -l - -The ``--list`` option will list all of the apps Django knows about, the -migrations available for each app and if they are applied or not (marked by -an ``[X]`` next to the migration name). - -Apps without migrations are also included in the list, but will have -``(no migrations)`` printed under them. +.. deprecated:: 1.8 + The ``--list`` option has been moved to the :djadmin:`showmigrations` + command. runfcgi [options] ----------------- @@ -1088,6 +1083,32 @@ behavior you can use the ``--no-startup`` option. e.g.:: django-admin shell --plain --no-startup +showmigrations [<app_label> [<app_label>]] +------------------------------------------ + +.. django-admin:: showmigrations + +.. versionadded:: 1.8 + +Shows all migrations in a project. + +.. django-admin-option:: --list, -l + +The ``--list`` option lists all of the apps Django knows about, the +migrations available for each app, and whether or not each migrations is +applied (marked by an ``[X]`` next to the migration name). + +Apps without migrations are also listed, but have ``(no migrations)`` printed +under them. + +.. django-admin-option:: --plan, -p + +The ``--plan`` option shows the migration plan Django will follow to apply +migrations. Any supplied app labels are ignored because the plan might go +beyond those apps. Same as ``--list``, applied migrations are marked by an +``[X]``. For a verbosity of 2 and above, all dependencies of a migration will +also be shown. + sql <app_label app_label ...> ----------------------------- diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index f1e8eceee6..c869cbc5b7 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -394,6 +394,9 @@ Management Commands * :djadmin:`makemigrations` now supports an :djadminopt:`--exit` option to exit with an error code if no migrations are created. +* The new :djadmin:`showmigrations` command allows listing all migrations and + their dependencies in a project. + Middleware ^^^^^^^^^^ @@ -1134,6 +1137,13 @@ The class :class:`~django.core.management.NoArgsCommand` is now deprecated and will be removed in Django 2.0. Use :class:`~django.core.management.BaseCommand` instead, which takes no arguments by default. +Listing all migrations in a project +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``--list`` option of the :djadmin:`migrate` management command is +deprecated and will be removed in Django 2.0. Use :djadmin:`showmigrations` +instead. + ``cache_choices`` option of ``ModelChoiceField`` and ``ModelMultipleChoiceField`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
