[Django] #35109: Enhance `showmigrations` to only write leafs nodes (most recent migrations) to stdout, if desired

9 views
Skip to first unread message

Django

unread,
Jan 12, 2024, 11:46:35 AM1/12/24
to django-...@googlegroups.com
#35109: Enhance `showmigrations` to only write leafs nodes (most recent migrations)
to stdout, if desired
-------------------------------------+-------------------------------------
Reporter: breid1313 | Owner: breid1313
Type: New | Status: assigned
feature |
Component: Core | Version: 3.2
(Management commands) | Keywords: management
Severity: Normal | commands, migration, showmigrations
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
It would be nice to be able to have `showmigrations` only display the most
recent migration for a given app. Currently, the functionality is to list
all migrations, which can be a long list for more mature apps. I have
found at times that I am really only looking for the most recent migration
so that I can unapply it or find the number of the last migration so I can
squash through that point.

Proposed enhancement: add an argument to `showmigrations` that will only
show the leaf nodes for the given app(s) if provided.

--
Ticket URL: <https://code.djangoproject.com/ticket/35109>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 12, 2024, 11:59:13 AM1/12/24
to django-...@googlegroups.com
#35109: Enhance `showmigrations` to only write leafs nodes (most recent migrations)
to stdout, if desired
-------------------------------------+-------------------------------------
Reporter: brian | Owner: brian
Type: New feature | Status: assigned
Component: Core (Management | Version: 3.2
commands) |
Severity: Normal | Resolution:
Keywords: management | Triage Stage:
commands, migration, | Unreviewed
showmigrations |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by brian):

pull request: https://github.com/django/django/pull/17728

--
Ticket URL: <https://code.djangoproject.com/ticket/35109#comment:1>

Django

unread,
Jan 12, 2024, 3:42:45 PM1/12/24
to django-...@googlegroups.com
#35109: Enhance `showmigrations` to only write leafs nodes (most recent migrations)
to stdout, if desired
-------------------------------------+-------------------------------------
Reporter: brian | Owner: brian
Type: New feature | Status: closed

Component: Core (Management | Version: 3.2
commands) |
Severity: Normal | Resolution: wontfix

Keywords: management | Triage Stage:
commands, migration, | Unreviewed
showmigrations |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* has_patch: 1 => 0
* resolution: => wontfix


Comment:

Thanks for this ticket, however, I don't think it's especially useful for
most of programmers. Why only the last migrations for each should be
crucial, and not the last two or three? If you want to check the last
migrations in the last you can use: `showmigrations --plan | tail`.

You can raise the idea on the DevelopersMailingList to reach a wider
audience and see what other think, if you don't agree.

--
Ticket URL: <https://code.djangoproject.com/ticket/35109#comment:2>

Reply all
Reply to author
Forward
0 new messages