summaryrefslogtreecommitdiff
path: root/alembic/migration.py
diff options
context:
space:
mode:
Diffstat (limited to 'alembic/migration.py')
-rw-r--r--alembic/migration.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/alembic/migration.py b/alembic/migration.py
index 733727d..2e817e6 100644
--- a/alembic/migration.py
+++ b/alembic/migration.py
@@ -21,9 +21,13 @@ class MigrationContext(object):
Mediates the relationship between an ``env.py`` environment script,
a :class:`.ScriptDirectory` instance, and a :class:`.DefaultImpl` instance.
- The :class:`.MigrationContext` is available directly via the :func:`.get_context` function,
- though usually it is referenced behind the scenes by the various module level functions
- within the :mod:`alembic.context` module.
+ The :class:`.MigrationContext` that's established for a
+ duration of a migration command is available via the
+ :attr:`.EnvironmentContext.migration_context` datamember,
+ which is available at ``alembic.context``::
+
+ from alembic import context
+ migration_context = context.migration_context
"""
def __init__(self, dialect, connection, opts):