Opened 6 years ago

Last modified 6 years ago

#30186 closed New feature

Show applied datetime in showmigrations — at Version 4

Reported by: Timothy Schilling Owned by: Timothy Schilling
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: migrations showmigrations
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Timothy Schilling)

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.

There was some brief discussion here.

I've initially implemented this so that it would only apply to the --list option with a --verbosity of 2 and above. Here's what I have so far. I wasn't sure how to handle backporting.

PR

Edited to strikeout old PR and reference the one to origin.

Change History (4)

comment:1 by Tim Graham, 6 years ago

Has patch: unset
Triage Stage: UnreviewedAccepted

We're past the feature freeze for 2.2, so please target the patch for 3.0 and send the pull request to django/django rather than to your fork.

comment:2 by Ryan Siemens, 6 years ago

Has patch: set
Patch needs improvement: set

comment:3 by Ryan Siemens, 6 years ago

Has patch: unset
Patch needs improvement: unset

Whoops, didn't realize the link was a PR to a fork and not to origin!

Last edited 6 years ago by Ryan Siemens (previous) (diff)

comment:4 by Timothy Schilling, 6 years ago

Description: modified (diff)
Has patch: set
Owner: changed from nobody to Timothy Schilling
Status: newassigned
Last edited 6 years ago by Tim Graham (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top