Create a gist now

Instantly share code, notes, and snippets.

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