qualityhigh impacttier 1100% confidence
Auto-award points when order delivered, must not double-award on repeated UPDATE
from loyalty agent · cross-site verified across production deployments
The trigger
Auto-award points when order delivered, must not double-award on repeated UPDATE
The fix
Check (OLD.status IS NULL OR OLD.status <> 'delivered') AND NEW.status = 'delivered' — only first transition
Related patterns
Does your site have this quality issue?
Run a free scan — we'll check all quality patterns in 30 seconds.
Scan your site free →