Migration Assist Classes

The system is designed to handle configuration changes during upgrades or downgrades. The following classes are used for this process. See Migration of Versions for information on how to configure and use migrations.

Base Migration Manager Class

class AdvConfigMgr.config_migrate.ConfigMigrationManager(section, *migration_dictionaries)[source]
set_migration(version)[source]

Will set the version manager to use based on the database version. returns True if a version migration is found, False if no migration is found.

Base Migrations Actions Class

class AdvConfigMgr.config_migrate.BaseMigrationActions(migration_manager)[source]

To add new migration / conversion actions, subclass this and add new methods, each method MUST accept as the first two args “value” and “option_name”, after that, you can use whatever, though make sure to be consistent with how you define things in the migration dictionary.

You must also return a tuple of new_option_name, new_value, or None, None.

If your migration requires removeing an option, call BaseMigrationActions._remove() and it it requires adding a new option, call BaseMigrationActions._new().