The nova.db.sqlalchemy.migrate_repo.versions.267_instance_uuid_non_nullable Module

process_null_records(meta, scan=True)

Scans the database for null instance_uuid records for processing.

Parameters:
  • meta – sqlalchemy.MetaData object, assumes tables are reflected.
  • scan – If True, does a query and fails the migration if NULL instance uuid entries found. If False, makes instances.uuid non-nullable.
scan_for_null_records(table, col_name, check_fkeys)

Queries the table looking for NULL instances of the given column.

Parameters:
  • col_name – The name of the column to look for in the table.
  • check_fkeys – If True, check the table for foreign keys back to the instances table and if not found, return.
Raises:

exception.ValidationError: If any records are found.

upgrade(migrate_engine)

Previous topic

The nova.db.sqlalchemy.migrate_repo.versions.266_add_instance_tags Module

Next topic

The nova.db.sqlalchemy.migrate_repo.versions.268_add_host_in_compute_node Module

Project Source

This Page