Skip to content

A platform for community discussion. Free, open, simple.

FIX: Disable concurrent migration for `multisite:migrate`.

Guo Xiang Tan850d5696f2b2
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index b0bdd0a9651..c3284acc70e 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -114,7 +114,9 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
raise "Multisite migrate is only supported in production"
end
- concurrency = (ENV['MIGRATE_CONCURRENCY'].presence || "20").to_i
+ # TODO: Switch to processes for concurrent migrations because Rails migration
+ # is not thread safe by default.
+ concurrency = 1
puts "Multisite migrator is running using #{concurrency} threads"
puts