Skip to content

Instantly share code, notes, and snippets.

@bbody
Last active April 1, 2018 02:14
Show Gist options
  • Save bbody/81b3f129370f8ab5322b1b3123fa3b5f to your computer and use it in GitHub Desktop.
Save bbody/81b3f129370f8ab5322b1b3123fa3b5f to your computer and use it in GitHub Desktop.
Useful rake task to restart database from scrap for Rails applications, do not use in production
# lib/tasks/db.rake
namespace :db do
desc 'Drop, create, migrate then seed the development database'
task reseed: [ 'db:drop', 'db:create', 'db:migrate', 'db:seed' ] do
puts 'Reseeding completed.'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment