class ActiveRecord::DatabaseConfigurations::HashConfig

def schema_dump(format = ActiveRecord.schema_format)

the filename from the database config name.
If the config option is set that will be used. Otherwise Rails will generate

will not be dumped.
If `configuration_hash[:schema_dump]` is set to `false` or `nil` the schema

should be used.
Determines whether to dump the schema/structure files and the filename that
def schema_dump(format = ActiveRecord.schema_format)
  if configuration_hash.key?(:schema_dump)
    if config = configuration_hash[:schema_dump]
      config
    end
  elsif primary?
    schema_file_type(format)
  else
    "#{name}_#{schema_file_type(format)}"
  end
end