Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Created November 28, 2011 18:42
Show Gist options
  • Select an option

  • Save jmeridth/1401466 to your computer and use it in GitHub Desktop.

Select an option

Save jmeridth/1401466 to your computer and use it in GitHub Desktop.
Runs rails db migrations if changes exist in changes
#!/usr/bin/env ruby
`rake db:migrate && rake db:test:prepare` if `git diff --name-only HEAD@{1} HEAD`.index("db/migrations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment