jaf
01/20/2022, 12:48 PMonConflict
option when doing a mass insert? What syntax do I need to use? I have a composite unique constraint that consists of two columns. I'm periodically inserting the whole data set and want to just ignore the row if it already exists (or maybe update the updated_at
column). One tutorial I found suggested the following: ON CONFLICT ON CONSTRAINT customers_name_key
DO NOTHING
So how would I write that with the supabase JS library?Steve
01/20/2022, 2:08 PMignoreDuplicates
option on upsert does DO NOTHING
, see:
https://supabase.com/docs/reference/javascript/upsertjaf
01/20/2022, 2:19 PMjaf
01/21/2022, 3:00 PMonConflict: 'product_id, shop_id'
. Not sure why I upsert didn't complain about the missing primary key