mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
Fix alembic messing up logging (#423)
This commit is contained in:
parent
1fb1c62a62
commit
efd12e8332
2 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,8 @@ config = context.config
|
|||
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
fileConfig(config.config_file_name)
|
||||
if config.attributes.get('configure_logger', True):
|
||||
fileConfig(config.config_file_name)
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from alembic import command
|
|||
def run_migrations(engine):
|
||||
""" Run migrations. """
|
||||
alembic_cfg = Config("alembic.ini")
|
||||
alembic_cfg.attributes['configure_logger'] = False
|
||||
with engine.begin() as connection:
|
||||
alembic_cfg.attributes['connection'] = connection
|
||||
command.upgrade(alembic_cfg, "head")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue