MONKEYPATCH: Allow us to disable the use of advisory locks during migration.

This commit is contained in:
Guo Xiang Tan 2017-11-21 14:05:09 +08:00
parent b8c9975429
commit 337ccfa3a6

View File

@ -0,0 +1,8 @@
# Awaiting decision on https://github.com/rails/rails/issues/31190
if ENV['DISABLE_MIGRATION_ADVISORY_LOCK']
class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
def supports_advisory_locks?
false
end
end
end