Skip to main content
Makenot
.
work
Discover
Use Cases
Docs
Fan+
Login
Join
max
/
makenotwork
lane-a-pipeline
main
tag: launch-2026-06-01
Files
Commits
Issues
makenotwork
/
server
/
migrations
/
066_pending_refund_dedup.sql
286 B · 6 lines
History
Blame
Raw
1
--
Partial unique index to prevent duplicate unmatched pending refunds
2
--
for the same payment intent. Allows multiple matched (historical) rows.
3
CREATE
UNIQUE INDEX
IF
NOT EXISTS idx_pending_refunds_unmatched_pi
4
ON
pending_refunds (payment_intent_id)
5
WHERE
matched_at IS
NULL
;
6