Ejemplo n.º 1
0
Archivo: cli.py Proyecto: armab/mistral
def main():
    config = alembic_cfg.Config(
        os.path.join(os.path.dirname(__file__), 'alembic.ini'))
    config.set_main_option(
        'script_location',
        'mistral.db.sqlalchemy.migration:alembic_migrations')
    # attach the Mistral conf to the Alembic conf
    config.mistral_config = CONF

    CONF(project='mistral')
    CONF.command.func(config, CONF.command.name)
Ejemplo n.º 2
0
def main():
    config = alembic_cfg.Config(
        os.path.join(os.path.dirname(__file__), 'alembic.ini')
    )
    config.set_main_option(
        'script_location',
        'mistral.db.sqlalchemy.migration:alembic_migrations'
    )
    # attach the Mistral conf to the Alembic conf
    config.mistral_config = CONF
    logging.register_options(CONF)

    CONF(project='mistral')
    logging.setup(CONF, 'Mistral')
    CONF.command.func(config, CONF.command.name)