summaryrefslogtreecommitdiff
path: root/src/sql/ext_mapping_upsert.sql
blob: db9f44b1ae46ae2feeb60ff467fc758ae5974bde (plain)
1
2
3
4
5
6
7
INSERT INTO [ext_mapping] (source_id,id_external_integer,uuid)
	VALUES('%i','%i','%s')
		ON CONFLICT(source_id,id_external_integer) DO UPDATE SET
			uuid=excluded.uuid
			,is_deleted=0
			,modification_dt=unixepoch('now')
		WHERE source_id=excluded.source_id AND id_external_integer=excluded.id_external_integer