Example #1
0
def _reset_bmdb():
    global _DB
    engine = bm_session.get_engine()
    engine.dispose()
    conn = engine.connect()
    if _DB is None:
        if bm_migration.db_version() > bm_migration.INIT_VERSION:
            return
        bm_migration.db_sync()
        _DB = "".join(line for line in conn.connection.iterdump())
    else:
        conn.connection.executescript(_DB)
Example #2
0
def _reset_bmdb():
    global _DB
    engine = bm_session.get_engine()
    engine.dispose()
    conn = engine.connect()
    if _DB is None:
        if bm_migration.db_version() > bm_migration.INIT_VERSION:
            return
        bm_migration.db_sync()
        _DB = "".join(line for line in conn.connection.iterdump())
    else:
        conn.connection.executescript(_DB)
Example #3
0
 def sync(self, version=None):
     """Sync the database up to the most recent version."""
     bmdb_migration.db_sync(version)
Example #4
0
 def sync(self, version=None):
     """Sync the database up to the most recent version."""
     bmdb_migration.db_sync(version)