Fix constraint language of subscribe query
continuous-integration/drone/push Build is passing Details

master
Peter Stuifzand 3 years ago
parent 5452cabf7e
commit 3b2e866f3e

@ -29,7 +29,7 @@ func (s *postgres) Subscribe(topic string, sub Subscriber) error {
INSERT INTO "subscribers"
("topic", "callback", "lease_seconds", "secret", "created")
VALUES ($1, $2, $3, $4, now())
ON CONFLICT ON CONSTRAINT subscribers_topic_callback
ON CONFLICT (topic, callback)
DO UPDATE SET lease_seconds = excluded.lease_seconds,
secret = excluded.secret,
updated = excluded.created

Loading…
Cancel
Save