Merge pull request #35663 from eileencodes/fix-database-configuration-when-not-actually-a-three-tier

Fix database configuration when adding another config level
This commit is contained in:
Eileen M. Uchitelle 2019-03-18 19:58:42 -04:00 committed by GitHub
commit 6e94127dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -106,7 +106,7 @@ module ActiveRecord
build_db_config = configs.each_pair.flat_map do |env_name, config|
walk_configs(env_name.to_s, "primary", config)
end.compact
end.flatten.compact
if url = ENV["DATABASE_URL"]
build_url_config(url, build_db_config)

View File

@ -123,6 +123,8 @@ module TestHelpers
adapter: sqlite3
pool: 5
timeout: 5000
variables:
statement_timeout: 1000
development:
primary:
<<: *default