Opened 2 years ago

Closed 21 months ago

Last modified 12 months ago

#23359 closed New feature (fixed)

Add ability to show the migration plan

Reported by: Markus Holtermann Owned by: Markus Holtermann
Component: Migrations Version: master
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 (14)

comment:1 Changed 2 years ago by Markus Holtermann

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Markus Holtermann
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 2 years ago by Markus Holtermann

Has patch: set

comment:3 Changed 2 years ago by Tim Graham

Easy pickings: unset
Triage Stage: UnreviewedAccepted

comment:4 Changed 2 years ago by Markus Holtermann

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 Changed 2 years ago by Markus Holtermann

Cc: Markus Holtermann added

comment:6 Changed 2 years ago by Markus Holtermann

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 Changed 23 months ago by Markus Holtermann

Owner: changed from Markus Holtermann to Markus Holtermann

comment:8 Changed 22 months ago by Markus Holtermann

Needs documentation: unset

comment:9 Changed 22 months ago by Tim Graham

Patch needs improvement: set

comment:10 Changed 21 months ago by Markus Holtermann

Patch needs improvement: unset

comment:11 Changed 21 months ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:12 Changed 21 months ago by Tim Graham <timograham@…>

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 Changed 21 months ago by Tim Graham <timograham@…>

In e08318b4ef25cfe7d1cfbc5ae7d134ee477506ba:

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

Thanks Berker Peksag for the review.

comment:14 Changed 12 months ago by Tim Graham <timograham@…>

In b6e6fcf3:

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

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