From de5f2d33087c8e9c12f83d573015d275098bd68f Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 9 Apr 2020 13:54:18 +1000 Subject: [PATCH] DEV: avoid loading module in production --- lib/freedom_patches/safe_migrations.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/freedom_patches/safe_migrations.rb b/lib/freedom_patches/safe_migrations.rb index 161d9fa8a7c..cdf989fdd5b 100644 --- a/lib/freedom_patches/safe_migrations.rb +++ b/lib/freedom_patches/safe_migrations.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true -require_dependency 'migration/safe_migrate' - # We do not run this in production cause it is intrusive and has # potential to break stuff, it also breaks under concurrent use # which rake:multisite_migrate uses # # The protection is only needed in Dev and Test if ENV['RAILS_ENV'] != "production" + require_dependency 'migration/safe_migrate' Migration::SafeMigrate.patch_active_record! end