'migrate': {
'setup': 'mediagoblin.gmg_commands.migrate:migrate_parser_setup',
'func': 'mediagoblin.gmg_commands.migrate:migrate',
- 'help': 'Apply all unapplied bulk migrations to the database'},
+ 'help': ('Migrate your Mongo database. '
+ '[DEPRECATED!] use convert_mongo_to_sql and dbupdate.')},
'adduser': {
'setup': 'mediagoblin.gmg_commands.users:adduser_parser_setup',
'func': 'mediagoblin.gmg_commands.users:adduser',
import sys
-from mediagoblin.db.mongo import util as db_util
-from mediagoblin.db.mongo.open import setup_connection_and_db_from_config
from mediagoblin.init import setup_global_and_app_config
-# This MUST be imported so as to set up the appropriate migrations!
-from mediagoblin.db.mongo import migrations
-
def migrate_parser_setup(subparser):
pass
def run_migrate(conf_file):
+ # This MUST be imported so as to set up the appropriate migrations!
+ from mediagoblin.db.mongo import migrations
+
+ from mediagoblin.db.mongo import util as db_util
+ from mediagoblin.db.mongo.open import setup_connection_and_db_from_config
+
global_config, app_config = setup_global_and_app_config(conf_file)
connection, db = setup_connection_and_db_from_config(