Opened 9 years ago

Last modified 3 years ago

#26769 new New feature

Expose verbosity level in migrations

Reported by: Andrew Owned by:
Component: Migrations Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:How to create a pull request

Description

It would be especially helpful with data migrations if one could print status/progress information depending on the "verbosity" option specified with the management command. The management command already prints to console, so this would let custom migration operations do the same thing. For some data migrations, it's useful to log custom status information, but you don't always want this displayed every time (e.g. when setting up a test database).

Perhaps verbosity-level could be passed to RunPython callbacks as an optional argument? Or perhaps the Migration object could expose some sort of logging functionality?

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (3)

comment:1 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

I guess we could give this a try though passing verbosity all the way from the management command to the migration operations may be a bit ugly.

comment:2 by Jacob Walls, 3 years ago

Owner: changed from nobody to Jacob Walls
Status: newassigned

comment:3 by Jacob Walls, 3 years ago

Owner: Jacob Walls removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top