Skip to content

Instantly share code, notes, and snippets.

@austintaylor
Created July 6, 2010 18:39
Show Gist options
  • Select an option

  • Save austintaylor/465756 to your computer and use it in GitHub Desktop.

Select an option

Save austintaylor/465756 to your computer and use it in GitHub Desktop.
One-liner to rollback schema changes in a branch
for VERSION in `git diff --summary master..HEAD -- db/migrate/ | sed -e "s/.*migrate\///" -e "s/_.*//" | sort -r` ; do export VERSION && rake db:migrate:down; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment