This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Usage: | |
# rake db:rollback_to_common branch=production | |
# git checkout -m production | |
# rake db:migrate | |
# | |
namespace :db do | |
desc 'Rolls back database to common migration state between current branch and another' | |
task :rollback_to_common do | |
FileUtils.cd(RAILS_ROOT) do |