From: Berker Peksag Date: Fri, 15 Aug 2014 12:40:35 +0000 (+0300) Subject: Move the AlembicMigrationManager to top of the module. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2064ad9450f6260eaf583a205d865d167380d59d;p=mediagoblin.git Move the AlembicMigrationManager to top of the module. Also, add a simple docstring. --- diff --git a/mediagoblin/gmg_commands/dbupdate.py b/mediagoblin/gmg_commands/dbupdate.py index 7039b95c..f5c20720 100644 --- a/mediagoblin/gmg_commands/dbupdate.py +++ b/mediagoblin/gmg_commands/dbupdate.py @@ -19,7 +19,7 @@ import logging from sqlalchemy.orm import sessionmaker from mediagoblin.db.open import setup_connection_and_db_from_config -from mediagoblin.db.migration_tools import MigrationManager +from mediagoblin.db.migration_tools import MigrationManager, AlembicMigrationManager from mediagoblin.init import setup_global_and_app_config from mediagoblin.tools.common import import_component @@ -107,7 +107,7 @@ forgotten to add it? ({1})'.format(plugin, exc)) def run_alembic_migrations(db, app_config, global_config): - from mediagoblin.db.migration_tools import AlembicMigrationManager + """Initializes a database and runs all Alembic migrations.""" Session = sessionmaker(bind=db.engine) manager = AlembicMigrationManager(Session()) manager.init_or_migrate()