diff --git a/alembic/templates/async/env.py b/alembic/templates/async/env.py index 9f2d5194..ab7598d1 100644 --- a/alembic/templates/async/env.py +++ b/alembic/templates/async/env.py @@ -14,7 +14,7 @@ # Interpret the config file for Python logging. # This line sets up loggers basically. if config.config_file_name is not None: - fileConfig(config.config_file_name) + fileConfig(config.config_file_name, defaults=config.config_args) # add your model's MetaData object here # for 'autogenerate' support diff --git a/alembic/templates/generic/env.py b/alembic/templates/generic/env.py index 36112a3c..34ced9b1 100644 --- a/alembic/templates/generic/env.py +++ b/alembic/templates/generic/env.py @@ -12,7 +12,7 @@ # Interpret the config file for Python logging. # This line sets up loggers basically. if config.config_file_name is not None: - fileConfig(config.config_file_name) + fileConfig(config.config_file_name, defaults=config.config_args) # add your model's MetaData object here # for 'autogenerate' support diff --git a/alembic/templates/multidb/env.py b/alembic/templates/multidb/env.py index e937b64e..11a41187 100644 --- a/alembic/templates/multidb/env.py +++ b/alembic/templates/multidb/env.py @@ -16,7 +16,7 @@ # Interpret the config file for Python logging. # This line sets up loggers basically. if config.config_file_name is not None: - fileConfig(config.config_file_name) + fileConfig(config.config_file_name, defaults=config.config_args) logger = logging.getLogger("alembic.env") # gather section names referring to different diff --git a/alembic/templates/pyproject/env.py b/alembic/templates/pyproject/env.py index 36112a3c..34ced9b1 100644 --- a/alembic/templates/pyproject/env.py +++ b/alembic/templates/pyproject/env.py @@ -12,7 +12,7 @@ # Interpret the config file for Python logging. # This line sets up loggers basically. if config.config_file_name is not None: - fileConfig(config.config_file_name) + fileConfig(config.config_file_name, defaults=config.config_args) # add your model's MetaData object here # for 'autogenerate' support