Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#23359 closed New feature (fixed)

Add ability to show the migration plan

Reported by: Markus Holtermann Owned by: Markus Holtermann
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Markus Holtermann 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

The migrate command already allows one to list all the migrations and their status (applied / not applied) grouped and sorted by app name. Similar to this it would be nice to show the migration plan, i.e. which migration is applied when.

Change History (15)

comment:1 by Markus Holtermann, 10 years ago

Owner: changed from nobody to Markus Holtermann
Status: newassigned

comment:2 by Markus Holtermann, 10 years ago

Has patch: set

comment:3 by Tim Graham, 10 years ago

Easy pickings: unset
Triage Stage: UnreviewedAccepted

comment:4 by Markus Holtermann, 10 years ago

As shortly discussed with jax on IRC, having the --list output as part of migrate is somewhat inconsistent. I'd rather add another command showmigrations that offers --list (what manage.py migrate --list is doing right now) as a default and --plan with the this output (dependencies are only shown for --verbose 2). We could add a --graph option too that outputs the content for a dotfile, as shown in the pull request.

comment:5 by Markus Holtermann, 10 years ago

Cc: Markus Holtermann added

comment:6 by Markus Holtermann, 10 years ago

Needs documentation: set

I added another PR (https://github.com/django/django/pull/3153) that adds a dedicated showmigrations command which then also takes care of --list from the migrate command.

comment:7 by Markus Holtermann, 10 years ago

Owner: changed from Markus Holtermann to Markus Holtermann

comment:8 by Markus Holtermann, 10 years ago

Needs documentation: unset

comment:9 by Tim Graham, 10 years ago

Patch needs improvement: set

comment:10 by Markus Holtermann, 10 years ago

Patch needs improvement: unset

comment:11 by Tim Graham, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:12 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In a1487deebff7bf27a4946a9f5ddd68154fa4834d:

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.

comment:13 by Tim Graham <timograham@…>, 10 years ago

In e08318b4ef25cfe7d1cfbc5ae7d134ee477506ba:

Refs #23359 -- Removed double newline from output of migrate --list

Thanks Berker Peksag for the review.

comment:14 by Tim Graham <timograham@…>, 9 years ago

In b6e6fcf3:

Refs #23359 -- Removed the migrate --list option per deprecation timeline.

comment:15 by GitHub <noreply@…>, 3 years ago

In bbf93ef:

Refs #23359 -- Corrected showmigrations help text for the --database option.

Note: See TracTickets for help on using tickets.
Back to Top