Skip to content

Commit

Permalink
Improve conflict handling on owner changes
Browse files Browse the repository at this point in the history
  • Loading branch information
awfm9 committed Jun 30, 2022
1 parent d67cd4a commit 8a6eec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/graph/owner_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (n *OwnerRepository) Upsert(transfers ...*events.Transfer) error {
"event_id",
"number",
).
Suffix("ON CONFLICT DO NOTHING")
Suffix("ON CONFLICT (owner, nft_id, event_id) DO UPDATE SET number = number + EXCLUDED.number")

for _, transfer := range transfers {

Expand Down

0 comments on commit 8a6eec7

Please sign in to comment.