lib/table_sync/model/sequel.rb in table_sync-1.12.0 vs lib/table_sync/model/sequel.rb in table_sync-1.12.1
- old
+ new
@@ -19,10 +19,10 @@
qualified_version = ::Sequel.qualify(table_name, version_key)
version_condition = ::Sequel.function(:coalesce, qualified_version, 0) <
::Sequel.qualify(:excluded, version_key)
upd_spec = update_spec(data.first.keys - target_keys)
- data.map! { |d| d.merge(default_values) }
+ data.map! { |d| default_values.merge(d) }
insert_data = type_cast(data)
if first_sync_time_key
insert_data.each { |datum| datum[first_sync_time_key] = Time.current }
end