Add rake task multisite:rollback

This commit is contained in:
Neil Lalonde 2013-07-31 14:56:16 -04:00
parent 023c908d5a
commit 2a388e14e3
1 changed files with 11 additions and 0 deletions

View File

@ -18,3 +18,14 @@ task "multisite:seed_fu" => :environment do
t.invoke
end
end
desc "rollback migrations for all sites in tier"
task "multisite:rollback" => :environment do
RailsMultisite::ConnectionManagement.each_connection do |db|
puts "Rollback #{db}"
puts "---------------------------------\n"
t = Rake::Task["db:rollback"]
t.reenable
t.invoke
end
end