diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-24 16:33:34 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-24 16:33:34 -0500 |
commit | dfcfc872319acbadbf95ee75f555be0fd7ca8e6f (patch) | |
tree | e574f2929c91f5733592a46a4996d896a324397c /alembic/migration.py | |
parent | 14d05f4b062c1cd237447f66467e234ee30ab3f7 (diff) | |
download | alembic-dfcfc872319acbadbf95ee75f555be0fd7ca8e6f.tar.gz |
documentation updates for 0.2
Diffstat (limited to 'alembic/migration.py')
-rw-r--r-- | alembic/migration.py | 10 |
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): |