weixin_39890652 2020-11-30 11:37
浏览 0

Indicating which is the current version in history

Migrated issue, originally created by Kazutaka Mise ()

Overview

Now, the history command does not tell us which the current version is. So, we have to execute the current command and look for the same version hash from output of history command. I think it's useful if output of history command indicates which current version is.

Proposal

  • Get current version from alembic_version table.
  • Display (current) at right side of current version's hash.
  • This feature needs DB access. How about to implement as an option. (like alembic history --current)

该提问来源于开源项目:sqlalchemy/alembic

  • 写回答

7条回答 默认 最新

  • weixin_39890652 2020-11-30 11:37
    关注

    Michael Bayer () wrote:

    history does DB access when part of the range you specify is in fact the word "current" to show how the history relates to the current tree.

    note that "current" is a list of values, not a single value, as a tree can have any number of heads.

    Feel free to provide a PR including a test in tests/test_command.py -> HistoryTest , call the command option --indicate-current / -i.

    评论

报告相同问题?