Show applied datetime in showmigrations

79 views
Skip to first unread message

Tim Schilling

unread,
Feb 3, 2019, 12:30:34 PM2/3/19
to Django developers (Contributions to Django itself)
My idea is to add the applied datetime value to the showmigrations command.

I've run into the case where I'm working on a branch that involves a number of migrations across various apps, but then have to switch to a different branch which has different migrations. It can be troublesome to determine which migrations are new and need to be rolled back. I've recently started looking at the django_migrations table sorted on the applied column to determine which I've run recently. This would make switching between branches involving conflicting migrations easier.

Thanks,
Tim

Aymeric Augustin

unread,
Feb 3, 2019, 12:47:35 PM2/3/19
to django-d...@googlegroups.com
Hello,

This sounds interesting.

You should think a bit about backwards compatibility because there's a good chance that some users are calling django-admin showmigrations in scripts or tools. I don't think this is a blocker for changing the output format. However you should plan to minimize disruption, perhaps by showing this information only a verbosity level higher than the default.

Best regards,

-- 
Aymeric.



--
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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/77e70de0-6418-4294-9135-a30a8a6b4b33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Schilling

unread,
Feb 3, 2019, 1:45:10 PM2/3/19
to Django developers (Contributions to Django itself)
Not changing the default output makes a lot of sense. I initially was wondering if it should have its own option. Making it an addition to a higher verbosity level will work too.

Ryan Hiebert

unread,
Feb 3, 2019, 8:38:46 PM2/3/19
to django-d...@googlegroups.com
I personally like the option better. This seems like a different use-case than I'd normally expect from a verbosity level.

On Sun, Feb 3, 2019 at 12:45 PM Tim Schilling <schill...@gmail.com> wrote:
Not changing the default output makes a lot of sense. I initially was wondering if it should have its own option. Making it an addition to a higher verbosity level will work too.

--
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 https://groups.google.com/group/django-developers.

Tim Schilling

unread,
Feb 9, 2019, 1:36:46 PM2/9/19
to Django developers (Contributions to Django itself)
I've worked up a solution for feedback. https://github.com/tim-schilling/django/pull/1
Reply all
Reply to author
Forward
0 new messages