From dfcfc872319acbadbf95ee75f555be0fd7ca8e6f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 24 Jan 2012 16:33:34 -0500 Subject: documentation updates for 0.2 --- alembic/migration.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'alembic/migration.py') 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): -- cgit v1.2.1