mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
Add rake task multisite:rollback
This commit is contained in:
parent
023c908d5a
commit
2a388e14e3
11
vendor/gems/rails_multisite/lib/tasks/db.rake
vendored
11
vendor/gems/rails_multisite/lib/tasks/db.rake
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user