def _sync_extension_repo(extension, version): if extension in MIGRATED_EXTENSIONS: raise exception.MigrationMovedFailure(extension=extension) with sql.session_for_write() as session: engine = session.get_bind() try: package_name = '.'.join((contrib.__name__, extension)) package = importutils.import_module(package_name) except ImportError: raise ImportError(_("%s extension does not exist.") % package_name) try: abs_path = find_migrate_repo(package) try: migration.db_version_control(engine, abs_path) # Register the repo with the version control API # If it already knows about the repo, it will throw # an exception that we can safely ignore except exceptions.DatabaseAlreadyControlledError: # nosec pass except exception.MigrationNotProvided as e: print(e) sys.exit(1) _assert_not_schema_downgrade(extension=extension, version=version) init_version = get_init_version(abs_path=abs_path) migration.db_sync(engine, abs_path, version=version, init_version=init_version, sanity_check=False)
def upgrade(migrate_engine): raise exception.MigrationMovedFailure(extension='oauth1')
def upgrade(migrate_engine): raise exception.MigrationMovedFailure(extension='endpoint_filter')