lib/dyna/dsl/converter.rb in dyna-0.1.5 vs lib/dyna/dsl/converter.rb in dyna-0.1.6
- old
+ new
@@ -68,10 +68,10 @@
attribute_definitions = ERB.new(attribute_definitions_tmpl).result(binding)
<<-EOS
table "#{name}" do
key_schema(
hash: #{table[:key_schema][0][:attribute_name].inspect},
- range: #{table[:key_schema][1][:attribute_name].inspect},
+ range: #{table[:key_schema].size == 1 ? 'nil' : table[:key_schema][1][:attribute_name].inspect},
)
#{attribute_definitions}
provisioned_throughput(
read_capacity_units: #{table[:provisioned_throughput][:read_capacity_units]},
write_capacity_units: #{table[:provisioned_throughput][:write_capacity_units]},