The nova.db.sqlalchemy.migration Module

class AddColumn(table_name, column, desired_phase=None)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
class AddForeignKey(fkc, desired_phase=None)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
class AddIndex(index, args)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
class AddTable(table)

Bases: nova.db.sqlalchemy.migration.OperationBase

desired_phase = 'expand'
execute(ddlop)
class AddUniqueConstraint(uc, desired_phase=None)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
class AlterColumn(table_name, column_name, args)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
class Converter

Bases: object

convert_alembic(diffs)
class DropColumn(table_name, column)

Bases: nova.db.sqlalchemy.migration.OperationBase

desired_phase = 'contract'
execute(ddlop)
removes = True
class DropForeignKey(fkc, desired_phase=None)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
removes = True
class DropIndex(index)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
removes = True
class DropTable(table)

Bases: nova.db.sqlalchemy.migration.OperationBase

desired_phase = 'contract'
execute(ddlop)
removes = True
class DropUniqueConstraint(uc)

Bases: nova.db.sqlalchemy.migration.OperationBase

execute(ddlop)
removes = True
class OperationBase

Bases: object

desired_phase = 'migrate'
removes = False
class Scheduler(ops=None)

Bases: object

add(op)
add_edge(f, t)
handle_conflicts(metadata)
order_drop_add()
schedule()
sort()
db_contract(dryrun=False, database='main')
db_expand(dryrun=False, database='main')
db_initial_version(database='main')
db_migrate(dryrun=False, database='main')
db_null_instance_uuid_scan(delete=False)

Scans the database for NULL instance_uuid records.

Parameters:delete – If true, delete NULL instance_uuid records found, else just query to see if they exist for reporting.
Returns:dict of table name to number of hits for NULL instance_uuid rows.
db_sync(version=None, database='main')
db_version(database='main')
db_version_control(version=None, database='main')
get_engine(database='main')

Previous topic

The nova.db.sqlalchemy.migrate_repo.versions.302_pgsql_add_instance_system_metadata_index Module

Next topic

The nova.db.sqlalchemy.models Module

Project Source

This Page