def to_h
      configs = configurations.reverse.inject({}) do |memo, db_config|
        memo.merge(db_config.to_legacy_hash)
      end

      Hash[configs.to_a.reverse]
    end
def to_h
      configs = configurations.reverse.inject({}) do |memo, db_config|
        memo.merge(db_config.to_legacy_hash)
      end

      Hash[configs.to_a.reverse]
    end
Returns the DatabaseConfigurations object as a Hash.