Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChannyClaus opened this issue Apr 19, 2023 · 1 comment
Labels
command interface use case not quite a feature and not quite a bug, something we just didn't think of

Comments

@ChannyClaus
Copy link

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!

@ChannyClaus ChannyClaus added requires triage New issue that requires categorization use case not quite a feature and not quite a bug, something we just didn't think of labels Apr 19, 2023
@ChannyClaus ChannyClaus changed the title add a flag to display the history in reverse better way to look at the more recent revision from alembic history output Apr 19, 2023
@CaselIT
Copy link
Member

CaselIT commented Apr 20, 2023

Hi,

I think this could be useful.
The first option seems easier to implement, unless the python stdlib has a way of emulating a less like interface.

Regarding the name of the flag I think something like --chronological would be clearer

@CaselIT CaselIT added command interface and removed requires triage New issue that requires categorization labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command interface use case not quite a feature and not quite a bug, something we just didn't think of
Projects
None yet
Development

No branches or pull requests

2 participants