Add ability to show the migration plan (#23359)

96 views
Skip to first unread message

Markus Holtermann

unread,
Oct 29, 2014, 7:44:56 PM10/29/14
to django-d...@googlegroups.com
Hey folks,

A few weeks ago I opened a ticket (https://code.djangoproject.com/ticket/23359) to add the ability to show a migration plan similar as listing all migrations within a project (manage.py migrate --list). After some discussions on IRC and on the first pull request (https://github.com/django/django/pull/3116) we realized that there might even be more use cases, e.g. to output all migration files as a dot file to generate a graph (https://github.com/django/django/pull/3116#issuecomment-53565075). That's when I opened a second pull request that moves the existing "--list" and the new "--plan" option from the "migrate" command to a "showmigrations" command.

Any suggestions on which way I should follow, integrate in "manage.py migrate" (pull request 3116: https://github.com/django/django/pull/3116) or add a new dedicated command "manage.py showmigrations" (pull request 3153: https://github.com/django/django/pull/3153)?

/Markus

Andrew Godwin

unread,
Oct 29, 2014, 9:28:51 PM10/29/14
to django-d...@googlegroups.com
This used to be called "graphmigrations" in South, so I'm +0 on moving it to showmigrations; I don't want migrate to gain any extra functionality. That said, I tried moving --list to something separate during the 1.7 phase but there were objections to people who liked it on migrate.

I don't really mind which way you go, to be honest; both seem like sensible places. Other people might have stronger opinions.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f8bdabfc-f005-4e8e-b1d9-0b69dfdedd82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Graham

unread,
Nov 3, 2014, 2:41:28 PM11/3/14
to django-d...@googlegroups.com
If we went with a separate command, would there be any problem having --list on both migrate and showmigrations. I feel like deprecating it off of migrate will cause more complaints about needless deprecations.

Markus Holtermann

unread,
Nov 3, 2014, 2:49:25 PM11/3/14
to django-d...@googlegroups.com
I don't see any problem having them coexist. After all it's just a "call_command()" that I already implemented. I'd only need to remove the deprecation warning.
Reply all
Reply to author
Forward
0 new messages