예제 #1
0
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)
예제 #2
0
파일: migration.py 프로젝트: kjylmr/guts
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)
예제 #3
0
파일: manage.py 프로젝트: kjylmr/guts
 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))