if field already exists set delete false
This commit is contained in:
parent
fe0e37ee9e
commit
ca69d33bb2
@ -889,7 +889,7 @@ WITH user_data AS (
|
||||
nf.createdAt
|
||||
FROM new_fields nf
|
||||
JOIN user_data ud ON true
|
||||
ON CONFLICT (amoID, accountID, entity) DO NOTHING
|
||||
ON CONFLICT (amoID, accountID, entity) DO UPDATE SET Deleted=false
|
||||
RETURNING *
|
||||
)
|
||||
SELECT nf.*,ud.AmoID
|
||||
|
@ -230,7 +230,7 @@ WITH user_data AS (
|
||||
nf.createdAt
|
||||
FROM new_fields nf
|
||||
JOIN user_data ud ON true
|
||||
ON CONFLICT (amoID, accountID, entity) DO NOTHING
|
||||
ON CONFLICT (amoID, accountID, entity) DO UPDATE SET Deleted=false
|
||||
RETURNING id, amoid, code, accountid, name, entity, type, deleted, createdat
|
||||
)
|
||||
SELECT nf.amoid, nf.code, nf.name, nf.entity, nf.type, nf.createdat,ud.AmoID
|
||||
|
Loading…
Reference in New Issue
Block a user