Skip to content

Instantly share code, notes, and snippets.

@rantoniuk
Created February 2, 2011 17:45
Show Gist options
  • Save rantoniuk/808054 to your computer and use it in GitHub Desktop.
Save rantoniuk/808054 to your computer and use it in GitHub Desktop.
Backup before migration and migrate task.
namespace :project do desc "Backup before migration and migrate"
task :update => [:environment] do
Rake::Task["db:backup"].invoke
Rake::Task["db:migrate"].invoke
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment