lib/dyna/wrapper/table.rb in dyna-0.1.4 vs lib/dyna/wrapper/table.rb in dyna-0.1.5
- old
+ new
@@ -153,9 +153,14 @@
def dsl_stream_specification(dsl)
dsl.symbolize_keys.select {|k,v| k == :stream_specification}
end
def update_stream_specification(dsl)
+ dsl = dsl.dup
+ unless dsl[:stream_specification]
+ dsl[:stream_specification] = { stream_enabled: false }
+ end
+
log(:info, " table: #{@table.table_name}(update stream spec)\n".green + Dyna::Utils.diff(self_stream_specification, dsl, :color => @options.color, :indent => ' '), false)
unless @options.dry_run
params = { table_name: @table.table_name }.merge(dsl)
@ddb.update_table(params)
@options.updated = true