Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created December 16, 2008 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jashkenas/36642 to your computer and use it in GitHub Desktop.
Save jashkenas/36642 to your computer and use it in GitHub Desktop.
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