# Tiny hack to warn user if our migration is out of date
if not migration_manager.database_at_latest_migration():
- print (
- "*WARNING:* Your migrations are out of date, "
- "maybe run ./bin/gmg migrate?")
+ db_migration_num = migration_manager.database_current_migration()
+ latest_migration_num = migration_manager.latest_migration()
+ if db_migration_num < latest_migration_num:
+ print (
+ "*WARNING:* Your migrations are out of date, "
+ "maybe run ./bin/gmg migrate?")
+ elif db_migration_num > latest_migration_num:
+ print (
+ "*WARNING:* Your migrations are out of date... "
+ "in fact they appear to be from the future?!")
setup_globals(
db_connection = connection,
def setup_storage():
- app_config = mg_globals.app_config
+ global_config = mg_globals.global_config
+
+ key_short = 'publicstore'
+ key_long = "storage:" + key_short
+ public_store = storage_system_from_config(global_config[key_long])
- public_store = storage_system_from_config(app_config, 'publicstore')
- queue_store = storage_system_from_config(app_config, 'queuestore')
+ key_short = 'queuestore'
+ key_long = "storage:" + key_short
+ queue_store = storage_system_from_config(global_config[key_long])
setup_globals(
public_store = public_store,