Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created Dec 16, 2008
Embed
What would you like to do?
desc "Completely wipe and resurrect dev and test databases"
task :resurrect do
puts 'dropping and recreating dev and test dbs'
`rake db:drop RAILS_ENV=development`
`rake db:drop RAILS_ENV=test `
`rake db:create RAILS_ENV=development`
`rake db:create RAILS_ENV=test`
puts 'migrating dev back up'
`rake db:migrate`
puts 'loading reference data'
`rake db:load_sql`
puts 'cloning dev to test'
`rake db:test:clone`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment