summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-12-30 20:18:30 +0000
committerRobert Speicher <robert@gitlab.com>2015-12-30 20:18:30 +0000
commit4ed369558e5642ec69c160be5658bb3c6a495bbd (patch)
tree5f95d89fdbe1a71a9cc30d373a72ffaa3aac1809
parent088d833c0a8dee9048ccbf30dae13bdd0b9aebb6 (diff)
parentff98c631c1004247656677568989e5ed68fc88f3 (diff)
downloadgitlab-ce-4ed369558e5642ec69c160be5658bb3c6a495bbd.tar.gz
Merge branch 'fix-build' into 'master'
Ensure that is no pending migrations when using database on Gitlab::CurrentSettings This fixes the undefined method `recaptcha_enabled' for #<ApplicationSetting:0x007f28552f8238> when running the build. See merge request !2254
-rw-r--r--lib/gitlab/current_settings.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 46a4ef0e31f..7a86c09158e 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -38,7 +38,9 @@ module Gitlab
true
end
- use_db && ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings')
+ use_db && ActiveRecord::Base.connection.active? &&
+ !ActiveRecord::Migrator.needs_migration? &&
+ ActiveRecord::Base.connection.table_exists?('application_settings')
end
end
end