def show(config, revision, **kwargs): """ Show the revision(s) denoted by the given symbol. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.show(alembic_config, revision, **kwargs)
def revision(config, **kwargs): """ Create a new revision file. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.revision(alembic_config, **kwargs)
def branches(config, **kwargs): """ Show current branch points. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.branches(alembic_config, **kwargs)
def branches(config, **kwargs): """ Show current branch points. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.branches(alembic_config, **kwargs)
def current(config, **kwargs): """ Display the current revision for a database. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.current(alembic_config, **kwargs)
def stamp(config, revision, **kwargs): """ Stamp the revision table with the given revision. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.stamp(alembic_config, revision, **kwargs)
def heads(config, **kwargs): """ Show current available heads. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.heads(alembic_config, **kwargs)
def history(config, revision_range, **kwargs): """ List changeset scripts in chronological order. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.history(alembic_config, revision_range, **kwargs)
def show(config, revision, **kwargs): """ Show the revision(s) denoted by the given symbol. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.show(alembic_config, revision, **kwargs)
def stamp(config, revision, **kwargs): """ Stamp the revision table with the given revision. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.stamp(alembic_config, revision, **kwargs)
def downgrade(config, revision, **kwargs): """ Revert to a previous version. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.downgrade(alembic_config, revision, **kwargs)
def upgrade(config, revision, **kwargs): """ Upgrade database. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.upgrade(alembic_config, revision, **kwargs)
def revision(config, **kwargs): """ Create a new revision file. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.revision(alembic_config, **kwargs)
def upgrade(config, revision, **kwargs): """ Upgrade database. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.upgrade(alembic_config, revision, **kwargs)
def downgrade(config, revision, **kwargs): """ Revert to a previous version. """ with alembic_lock( config.registry["sqlalchemy.engine"], config.alembic_config() ) as alembic_config: alembic.command.downgrade(alembic_config, revision, **kwargs)
def heads(config, **kwargs): """ Show current available heads. """ with alembic_lock( config.registry["sqlalchemy.engine"], config.alembic_config() ) as alembic_config: alembic.command.heads(alembic_config, **kwargs)
def merge(config, revisions, **kwargs): """ Merge one or more revisions. Takes one or more revisions or "heads" for all heads and merges them into a single revision. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.merge(alembic_config, revisions, **kwargs)
def merge(config, revisions, **kwargs): """ Merge one or more revisions. Takes one or more revisions or "heads" for all heads and merges them into a single revision. """ with alembic_lock(config.registry["sqlalchemy.engine"], config.alembic_config()) as alembic_config: alembic.command.merge(alembic_config, revisions, **kwargs)