sqlalchemy / sqlalchemy/alembic

better way to look at the more recent revision from `alembic history` output

Open
#1,222 9 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

command interface open for pull requests use case
Dominant language
Python
Stars
4.4k
Forks
375
PR merge metrics
No merged PRs in 30d

Description

Describe the use case

alembic history currently prints out the history of revisions to STDOUT in reverse-chronological order. personally as a user, i am a lot more interested in the recent revisions than the initial one and it can be not particularly ergonomic to have to scroll up to look at the recent commits.

Databases / Backends / Drivers targeted
all of them?

Example Use

included in the use case.

Additional context

i think there can be two different ways to go about implementing this:

  • we could add a flag --reverse to reverse the output, although this might be of relatively small value since tail -r on macos or tac on linux would achieve exactly the same via piping (unless alembic history output decides to add a header or something)
  • the better way, i think, is to make it scrollable via less-like interface like git log does by default. since the output stays exactly the same, this should be backwards-compatible while achieving the goal of allowing the users to look at the most recent revision with no extra effort beyond just typing alembic revision.

Have a nice day!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the implementation of the alembic history CLI command and review the unresolved choice between a --reverse option and a pager; done requires an agreed behavior for viewing recent revisions and corresponding coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.