From: Brendan Gann Date: Tue, 14 Feb 2023 16:03:09 +0000 (-0500) Subject: restore config object to merge command X-Git-Tag: rel_1_9_4~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5aba011f6b1ea868f14bc03b5c1beb09262c8b8;p=thirdparty%2Fsqlalchemy%2Falembic.git 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 --- 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.