Update ON CONFLICT with pipeline_refs primary key

This commit is contained in:
2023-05-04 20:26:43 -06:00
parent 89be2c4816
commit 32a86ace9f
+1 -1
View File
@@ -437,7 +437,7 @@ func (db *Database) UpdatePipelineRefs(pipelineId uuid.UUID, refsMap map[string]
query := ` query := `
INSERT INTO pipeline_refs(name, pipeline_id, hash) INSERT INTO pipeline_refs(name, pipeline_id, hash)
VALUES($1, $2, $3) VALUES($1, $2, $3)
ON CONFLICT (name) ON CONFLICT (name, pipeline_id)
DO DO
UPDATE SET hash=$3;` UPDATE SET hash=$3;`