in lib/aws-record/record/secondary_indexes.rb [99:113]
def _migration_format_indexes(indexes)
return nil if indexes.empty?
indexes.collect do |name, opts|
h = { index_name: name }
h[:key_schema] = _si_key_schema(opts)
hk = opts.delete(:hash_key)
rk = opts.delete(:range_key)
h = h.merge(opts)
opts[:hash_key] = hk if hk
opts[:range_key] = rk if rk
h
end
end