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
+from mediagoblin.init import setup_global_and_app_config
# This MUST be imported so as to set up the appropriate migrations!
from mediagoblin.db import migrations
def migrate(args):
- config, validation_result = read_mediagoblin_config(args.conf_file)
+ global_config, app_config = setup_global_and_app_config(args.conf_file)
connection, db = setup_connection_and_db_from_config(
- config['mediagoblin'], use_pymongo=True)
+ app_config, use_pymongo=True)
migration_manager = db_util.MigrationManager(db)
# Clear old indexes