article
My discount tracker could add and fix rows but never let one go
An upsert-only sync kept counting discount rows that a better read of the same day no longer had. I gave trusted one-day reads the power to mark missing rows as replaced instead of deleting them, made every report count only live rows, and taught the sync to prefer the evidence that matches the day exactly.
Read more