class ActiveRecord::DatabaseConfigurations

def build_configuration_sentence

def build_configuration_sentence
  configs = configs_for(include_hidden: true)
  configs.group_by(&:env_name).map do |env, config|
    names = config.map(&:name)
    if names.size > 1
      "#{env}: #{names.join(", ")}"
    else
      env
    end
  end.join("\n")
end