Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-23 17:50:36 +0300
committerRémy Coutable <remy@rymai.me>2016-09-23 17:50:36 +0300
commitc2b8063fdabbd3c77d086d7dc80890eacebbaf65 (patch)
treeffa89eb3a7da5601dff695d67bd6ec71e9602355 /lib/gitlab
parentbc16d7679b841e30258483013414d79990a1880a (diff)
parentcee66810f88ad7ba622c05529b2163e1d38b1b0f (diff)
Merge branch 'fix/database-seeds' into 'master'
Fix database seeds for development environment ## What does this MR do? This MR fixes database seeds for development environment and adds CI test for it. ## Why was this MR needed? Database seeds for development environment are often broken, and we are not able to catch that when someone modified `db/fixtures` and forgets to reseed database. Closes #22422 See merge request !6475
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/current_settings.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 12fbb78c53e..ef9160d6437 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -59,10 +59,8 @@ module Gitlab
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
active_db_connection = ActiveRecord::Base.connection.active? rescue false
- ENV['USE_DB'] != 'false' &&
active_db_connection &&
- ActiveRecord::Base.connection.table_exists?('application_settings')
-
+ ActiveRecord::Base.connection.table_exists?('application_settings')
rescue ActiveRecord::NoDatabaseError
false
end