fix(db): status backfill skips event leads whose current status is already recorded

A second run after go-live no longer adds a fake OPEN->status row for a
lead captured with another status, which would move its win date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-01 10:51:05 +08:00
1 parent ee5fe6d15b
commit 07c3ecb7ad
2 files changed
+2 -2

No files matched your search

@@ -1,5 +1,5 @@
-- Co-Lite change add-lead-dashboard: event lead status history (design decision 1).
-- Target: `service-counter`. Additive only. Run once, after the release package, before 02.
-- Target: `service-counter`. Additive only. Run before the new images go live (services-counter writes this table), then 02.
USE `service-counter`;
CREATE TABLE IF NOT EXISTS `event_lead_status_change` (