From f5aba011f6b1ea868f14bc03b5c1beb09262c8b8 Mon Sep 17 00:00:00 2001 From: Brendan Gann Date: Tue, 14 Feb 2023 11:03:09 -0500 Subject: [PATCH] restore config object to merge command Fixed regression introduced in 1.7.0 where the "config" object passed to the template context when running the :func:`.merge` command programmatically failed to be correctly populated. Pull request courtesy Brendan Gann. Closes: #1176 Pull-request: https://github.com/sqlalchemy/alembic/pull/1176 Pull-request-sha: cf6a886915f6bef6eeef8041804e316038955402 Change-Id: Idbab2dc0339cce6f8827d2f49156791600a82c1a --- alembic/command.py | 2 +- docs/build/unreleased/merge_cfg.rst | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/build/unreleased/merge_cfg.rst diff --git a/alembic/command.py b/alembic/command.py index d2c5c85f..a8e56571 100644 --- a/alembic/command.py +++ b/alembic/command.py @@ -322,7 +322,7 @@ def merge( script = ScriptDirectory.from_config(config) template_args = { - "config": "config" # Let templates use config for + "config": config # Let templates use config for # e.g. multiple databases } return script.generate_revision( diff --git a/docs/build/unreleased/merge_cfg.rst b/docs/build/unreleased/merge_cfg.rst new file mode 100644 index 00000000..4a2df78d --- /dev/null +++ b/docs/build/unreleased/merge_cfg.rst @@ -0,0 +1,7 @@ +.. change:: + :tags: bug, commands + + Fixed regression introduced in 1.7.0 where the "config" object passed to + the template context when running the :func:`.merge` command + programmatically failed to be correctly populated. Pull request courtesy + Brendan Gann. -- 2.47.2