summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-06-07 21:01:06 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-06-07 21:01:06 +0800
commitd649e771ebd320f37390d61b9ef86d6c19814e96 (patch)
tree14072f814db83f7c69cc9f88202ac6ce0d9ccf34
parentdf326d061e23a7d5eb2618e542c193d4aef79c1a (diff)
downloadgitlab-ce-only-check-migration-if-really-needed.tar.gz
Only check migration if really neededonly-check-migration-if-really-needed
Then pass FAKE_APPLICATION_SETTINGS_IF_NEED_MIGRATION='true'
-rw-r--r--lib/gitlab/current_settings.rb2
1 files changed, 1 insertions, 1 deletions
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