Skip to content

Commit

Permalink
give credit for idea...#65
Browse files Browse the repository at this point in the history
  • Loading branch information
urimikhli committed Apr 14, 2016
1 parent e287013 commit 307845d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/upsert/merge_function/postgresql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def create!
names = setter_column_definitions.map(&:quoted_name).join(', ')
values = setter_column_definitions.map(&:to_setter_value).join(', ')
update_pair = update_column_definitions.map(&:to_setter).join(', ')
#Solution based on based on https://github.com/seamusabshere/upsert/pull/65
if @time_stamp_cols.count > 0
names += ', created_at, updated_at'
values += ", now(), now()"
Expand Down

0 comments on commit 307845d

Please sign in to comment.