def check_status(repo_path, db_url): pr = PatchRepo(repo_path) db = Db(db_url) result = db.test(pr) return 0 if result else 1
def migrate(repo_path, db_url): pr = PatchRepo(repo_path) db = Db(db_url) result = db.migrate(pr) return 0 if result else 1
def init_db(db_url): db = Db(db_url) db.init()