def sync(self, version=None, current_version=None): """ Place a database under migration control and upgrade/downgrade it, creating first if necessary. """ if current_version is not None: migration.db_version_control(db_migration.MIGRATE_REPO_PATH, current_version) migration.db_sync(db_migration.MIGRATE_REPO_PATH, version)
def sync(self, version=None, current_version=None): """ Place a database under migration control and upgrade/downgrade it, creating first if necessary. """ if current_version not in (None, 'None'): migration.db_version_control(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, version=current_version) migration.db_sync(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, version, sanity_check=self._need_sanity_check())
def downgrade(self, version=None): """Downgrade the database's migration level""" migration.db_sync(db_migration.MIGRATE_REPO_PATH, version)
def upgrade(self, version=None): """Upgrade the database's migration level""" migration.db_sync(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, version, sanity_check=self._need_sanity_check())
def downgrade(self, version=None): """Downgrade the database's migration level""" migration.db_sync(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, version)
def upgrade(self, version=None): """Upgrade the database's migration level""" migration.db_sync(db_api.get_engine(), db_migration.MIGRATE_REPO_PATH, version)
def upgrade(self, version=None): """Upgrade the database's migration level""" migration.db_sync(db_migration.MIGRATE_REPO_PATH, version)