INNER CODE UNIT · Python
show_revision
litestar-org/advanced-alchemy · advanced_alchemy/cli.py:401
def show_revision(bind_key: Optional[str], revision: str) -> None: # pyright: ignore[reportUnusedFunction]
"""Show details of a specific revision."""
from advanced_alchemy.alembic.commands import AlembicCommands
ctx = cast("click.Context", click.get_current_context())
console.rule(f"[yellow]Showing revision {revision}[/]", align="left")
sqlalchemy_config = get_config_by_bind_key(ctx, bind_key)
alembic_commands = AlembicCommands(sqlalchemy_config=sqlalchemy_config)
alembic_commands.show(rev=revision)
@database_group.command(
name="branches",
help="Show current branch points in the migration history",
)
@bind_key_option
@verbose_option
def show_branches(bind_key: Optional[str], verbose: bool) -> None: # pyright: ignore[reportUnusedFunction]
"""Show branch points."""