def get_manager(): # Our CONF object is not the same as the db one so make sure the # database.connection is made know to the oslo DB layer. session.set_defaults(sql_connection=CONF.database.connection, sqlite_db='') alembic_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic.ini') migrate_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic_migrations') migration_config = {'alembic_ini_path': alembic_path, 'migration_repo_path': migrate_path, 'alembic_repo_path': migrate_path} return migration_manager.MigrationManager(migration_config)
def get_manager(): # Our CONF object is not the same as the db one so make sure the # database.connection is made know to the oslo DB layer. session.set_defaults(sql_connection=CONF.database.connection, sqlite_db='') alembic_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic.ini') migrate_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic_migrations') migration_config = { 'alembic_ini_path': alembic_path, 'migration_repo_path': migrate_path, 'alembic_repo_path': migrate_path } return migration_manager.MigrationManager(migration_config)
def get_manager(): CONF.import_opt('connection', 'solum.openstack.common.db.sqlalchemy.session', group='database') session.set_defaults(sql_connection=CONF.database.connection, sqlite_db='') session.get_session(mysql_traditional_mode=True) alembic_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic.ini') migrate_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic_migrations') migration_config = {'alembic_ini_path': alembic_path, 'migration_repo_path': migrate_path, 'alembic_repo_path': migrate_path} return migration_manager.MigrationManager(migration_config)
def get_manager(): CONF.import_opt('connection', 'solum.openstack.common.db.sqlalchemy.session', group='database') session.set_defaults(sql_connection=CONF.database.connection, sqlite_db='') session.get_session(mysql_traditional_mode=True) alembic_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic.ini') migrate_path = os.path.join(os.path.dirname(__file__), '..', 'objects', 'sqlalchemy', 'migration', 'alembic_migrations') migration_config = { 'alembic_ini_path': alembic_path, 'migration_repo_path': migrate_path, 'alembic_repo_path': migrate_path } return manager.MigrationManager(migration_config)
def configure(self): session.set_defaults(sql_connection="sqlite:///%s" % self.db_file, sqlite_db=self.db_file) cfg.CONF.set_default('sqlite_synchronous', False)