aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/dbupdate.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-08-15 15:40:35 +0300
committerBerker Peksag <berker.peksag@gmail.com>2014-08-15 15:40:35 +0300
commit2064ad9450f6260eaf583a205d865d167380d59d (patch)
tree7842d460d5252b799acd88635df955bc9bea63c0 /mediagoblin/gmg_commands/dbupdate.py
parentde51eca53f1e7fbbc2175caaf3428c027538c954 (diff)
downloadmediagoblin-2064ad9450f6260eaf583a205d865d167380d59d.tar.lz
mediagoblin-2064ad9450f6260eaf583a205d865d167380d59d.tar.xz
mediagoblin-2064ad9450f6260eaf583a205d865d167380d59d.zip
Move the AlembicMigrationManager to top of the module.
Also, add a simple docstring.
Diffstat (limited to 'mediagoblin/gmg_commands/dbupdate.py')
-rw-r--r--mediagoblin/gmg_commands/dbupdate.py4
1 files changed, 2 insertions, 2 deletions
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()