Skip to content

Commit

Permalink
fix(Postgres Node): Do not include id column in upsert fields selecti…
Browse files Browse the repository at this point in the history
…on if it's not unique (#7975)

## Summary
Do not include id column in upsert fields selection if it's not unique
Forum:
https://community.n8n.io/t/postgres-node-insert-or-update-unique-column-name/32520
  • Loading branch information
michael-radency authored Dec 11, 2023
1 parent 393afef commit 435392c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function getMappingColumns(
id: col.column_name,
displayName: col.column_name,
required: col.is_nullable !== 'YES' && !isAutoIncrement,
defaultMatch: col.column_name === 'id',
defaultMatch: (col.column_name === 'id' && canBeUsedToMatch) || false,
display: true,
type,
canBeUsedToMatch,
Expand Down

0 comments on commit 435392c

Please sign in to comment.