summaryrefslogtreecommitdiff
path: root/alembic/runtime/environment.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-08-21 13:06:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-08-21 13:06:56 -0400
commitec7c2b721f73f2770e2ed9ac770bc873065c1e60 (patch)
treeaf06ee9ac888f6157544953fff56aaa01c713c1b /alembic/runtime/environment.py
parent28d37a9c57e0fcdfbe129e763e8a7f1d108ed9ee (diff)
downloadalembic-ec7c2b721f73f2770e2ed9ac770bc873065c1e60.tar.gz
- add a test and changelog notes for the fact that a non-autogenerate
run can render Python code in upgradeops/downgradeops via the process_revision_directives hook.
Diffstat (limited to 'alembic/runtime/environment.py')
-rw-r--r--alembic/runtime/environment.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/alembic/runtime/environment.py b/alembic/runtime/environment.py
index 3b6252c..b2d0ba7 100644
--- a/alembic/runtime/environment.py
+++ b/alembic/runtime/environment.py
@@ -697,6 +697,15 @@ class EnvironmentContext(util.ModuleClsProxy):
.. versionadded:: 0.8.0
+ .. versionchanged:: 0.8.1 - The
+ :paramref:`.EnvironmentContext.configure.process_revision_directives`
+ hook can append op directives into :class:`.UpgradeOps` and
+ :class:`.DowngradeOps` which will be rendered in Python regardless
+ of whether the ``--autogenerate`` option is in use or not;
+ the ``revision_environment`` configuration variable should be
+ set to "true" in the config to enable this.
+
+
.. seealso::
:ref:`customizing_revision`