def data_upgrade(): """Perform data upgrade.""" try: load_data_migrations(revision, 'upgrade') except Exception: data_downgrade() schema_downgrade() raise
def data_downgrade(): """Perform data downgrade.""" load_data_migrations(revision, 'downgrade')