From d649e771ebd320f37390d61b9ef86d6c19814e96 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 7 Jun 2018 21:01:06 +0800 Subject: Only check migration if really needed Then pass FAKE_APPLICATION_SETTINGS_IF_NEED_MIGRATION='true' --- lib/gitlab/current_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index 6cf7aa1bf0d..bce926f0d58 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -32,7 +32,7 @@ module Gitlab # need to be added to the application settings. To prevent Rake tasks # and other callers from failing, use any loaded settings and return # defaults for missing columns. - if ActiveRecord::Migrator.needs_migration? + if ENV['FAKE_APPLICATION_SETTINGS_IF_NEED_MIGRATION'] == 'true' && ActiveRecord::Migrator.needs_migration? return fake_application_settings(current_settings&.attributes) end -- cgit v1.2.1