import sys
-from mediagoblin.db import migrations
from mediagoblin.db import util as db_util
from mediagoblin.db.open import setup_connection_and_db_from_config
from mediagoblin.init.config import read_mediagoblin_config
+# This MUST be imported so as to set up the appropriate migrations!
+from mediagoblin.db import migrations
+
def migrate_parser_setup(subparser):
subparser.add_argument(
'-cf', '--conf_file', default='mediagoblin.ini',
help="Config file used to set up environment")
+
def _print_started_migration(migration_number, migration_func):
sys.stdout.write(
"Running migration %s, '%s'... " % (
migration_number, migration_func.func_name))
+ sys.stdout.flush()
+
def _print_finished_migration(migration_number, migration_func):
- print "done."
+ sys.stdout.write("done.\n")
+ sys.stdout.flush()
def migrate(args):