Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Clear out your dev db (with protection from #epicfailure)

View gist:1883590
1 2 3 4 5 6 7 8
function cleardb {
DEVDB="`ruby -e "require 'yaml'; puts YAML.load(File.open('config/database.yml'))['development']['database']"`"
if [[ $DEVDB =~ "production" ]]; then
echo 'WATCHOUT! cleardb running against production dump';
else
bundle exec rake db:drop db:create db:schema:load db:seed && bundle exec rake db:test:clone;
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.