From bf0495de58ed4a0f4f5b5e079c3e758d6b6b132c Mon Sep 17 00:00:00 2001 From: eileencodes Date: Tue, 20 Feb 2018 12:58:01 -0500 Subject: Delete default configuration Because of this default configuration we're constantly checking if the database exists when looping through configurations. This is unnecessary and we should just delete it before we need to loop through configurations. --- activerecord/lib/active_record/tasks/database_tasks.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index d8e0cd1e30..0883e80d23 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -315,16 +315,12 @@ module ActiveRecord environments << "test" if environment == "development" ActiveRecord::Base.configurations.slice(*environments).each do |configuration_environment, configuration| - next unless configuration["database"] - yield configuration, configuration_environment end end def each_local_configuration ActiveRecord::Base.configurations.each_value do |configuration| - next unless configuration["database"] - if local_database?(configuration) yield configuration else -- cgit v1.2.3