From 30b9b574ad070cb951ccb69bf14a074628793682 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Wed, 6 Mar 2024 09:51:31 +0200 Subject: [PATCH] fix: remove constraint reference --- database/gov.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/database/gov.go b/database/gov.go index bde419803..d47869513 100644 --- a/database/gov.go +++ b/database/gov.go @@ -289,12 +289,7 @@ WHERE proposal_deposit.height <= excluded.height` func (db *Db) SaveVote(vote types.Vote) error { query := ` INSERT INTO proposal_vote (proposal_id, voter_address, option, timestamp, height) -VALUES ($1, $2, $3, $4, $5) -ON CONFLICT ON CONSTRAINT unique_vote DO UPDATE - SET option = excluded.option, - timestamp = excluded.timestamp, - height = excluded.height -WHERE proposal_vote.height <= excluded.height` +VALUES ($1, $2, $3, $4, $5)` // Store the voter account err := db.SaveAccounts([]types.Account{types.NewAccount(vote.Voter)})