Update ON CONFLICT with pipeline_refs primary key

This commit is contained in:
restitux 2023-05-04 20:26:43 -06:00
parent 89be2c4816
commit 32a86ace9f
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ func (db *Database) UpdatePipelineRefs(pipelineId uuid.UUID, refsMap map[string]
query := `
INSERT INTO pipeline_refs(name, pipeline_id, hash)
VALUES($1, $2, $3)
ON CONFLICT (name)
ON CONFLICT (name, pipeline_id)
DO
UPDATE SET hash=$3;`