diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-23 14:50:36 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-23 14:50:36 +0000 |
commit | c2b8063fdabbd3c77d086d7dc80890eacebbaf65 (patch) | |
tree | ffa89eb3a7da5601dff695d67bd6ec71e9602355 /lib | |
parent | bc16d7679b841e30258483013414d79990a1880a (diff) | |
parent | cee66810f88ad7ba622c05529b2163e1d38b1b0f (diff) | |
download | gitlab-ce-c2b8063fdabbd3c77d086d7dc80890eacebbaf65.tar.gz |
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')
-rw-r--r-- | lib/gitlab/current_settings.rb | 4 |
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 |