fix(Postgres Node): Do not include id column in upsert fields selection 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
This commit is contained in:
Michael Kret 2023-12-11 17:34:24 +02:00 committed by GitHub
parent 393afef174
commit 435392cbfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,