ironic_inspector.db.migration module

ironic_inspector.db.migration.create_schema(config=None, engine=None)[source]

Create database schema from models description.

Can be used for initial installation instead of upgrade(‘head’).

ironic_inspector.db.migration.downgrade(revision, config=None)[source]

Used for downgrading database.

Parameters:

version (string) – Desired database version

ironic_inspector.db.migration.revision(message=None, autogenerate=False, config=None)[source]

Creates template for migration.

Parameters:
  • message (string) – Text that will be used for migration title

  • autogenerate (bool) – If True - generates diff based on current database state

ironic_inspector.db.migration.stamp(revision, config=None)[source]

Stamps database with provided revision.

Don’t run any migrations.

Parameters:

revision (string) – Should match one from repository or head - to stamp database with most recent revision

ironic_inspector.db.migration.upgrade(revision, config=None)[source]

Used for upgrading database.

Parameters:

version (string) – Desired database version

ironic_inspector.db.migration.version(config=None, engine=None)[source]

Current database version.

Returns:

Database version

Return type:

string