]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
restore config object to merge command
authorBrendan Gann <b.gann21@gmail.com>
Tue, 14 Feb 2023 16:03:09 +0000 (11:03 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Feb 2023 16:09:31 +0000 (11:09 -0500)
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
docs/build/unreleased/merge_cfg.rst [new file with mode: 0644]

index d2c5c85f7c9ca8a22543688c2c3eacdc17f94878..a8e56571f162c7f767ca3ac5f5a8f050245dde23 100644 (file)
@@ -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 (file)
index 0000000..4a2df78
--- /dev/null
@@ -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.