def db_sync(version=None, init_version=INIT_VERSION, engine=None): """Migrate the database to `version` or the most recent version.""" if engine is None: engine = db_api.get_engine() return get_backend().db_sync(engine=engine, abs_path=MIGRATE_REPO_PATH, version=version, init_version=init_version)
def version(self): """Print the current database version.""" print(migration.db_version(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, db_migration.INIT_VERSION))