oslo_db.sqlalchemy.migration_cli.ext_alembic Module¶oslo_db.sqlalchemy.migration_cli.ext_alembic.AlembicExtension(engine, migration_config)¶Bases: oslo_db.sqlalchemy.migration_cli.ext_base.MigrationExtensionBase
Extension to provide alembic features.
engine (sqlalchemy.engine.Engine) – SQLAlchemy engine instance for a given database
migration_config (dict) – Stores specific configuration for migrations
downgrade(version)¶Used for downgrading database.
version (string) – Desired database version
enabled¶Used for availability verification of a plugin.
bool
has_revision(rev_id)¶Checks whether the repo contains a revision
rev_id – Revision to check
Whether the revision is in the repo
bool
order = 2¶revision(message='', autogenerate=False)¶Creates template for migration.
message (string) – Text that will be used for migration title
autogenerate (bool) – If True - generates diff based on current database state
stamp(revision)¶Stamps database with provided revision.
revision (string) – Should match one from repository or head - to stamp database with most recent revision
upgrade(version)¶Used for upgrading database.
version (string) – Desired database version
version()¶Current database version.
Databse version
string
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.