Methods and definitions of migrations for the configuration file of an AiiDA instance.
aiida.manage.configuration.migrations.
check_and_migrate_config
Checks if the config needs to be migrated, and performs the migration if needed.
config – the configuration dictionary
the migrated configuration dictionary
config_needs_migrating
Checks if the config needs to be migrated.
If the oldest compatible version of the configuration is higher than the current configuration version defined in the code, the config cannot be used and so the function will raise.
True if the configuration has an older version and needs to be migrated, False otherwise
aiida.common.ConfigurationVersionError – if the config’s oldest compatible version is higher than the current
get_current_version
Return the current version of the config.
current config version or 0 if not defined
Define the current configuration version and migrations.
Defines utilities for verifying the version of the configuration file and migrating it when necessary.
aiida.manage.configuration.migrations.utils.