fix: Add consecutive_successes column to dispensaries table

Required for stage checkpoint tracking in task handlers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-13 01:15:59 -07:00
parent 7067db68fc
commit 95c23fcdff

View File

@@ -0,0 +1,9 @@
-- Migration: Add stage tracking columns to dispensaries table
-- Required for stage checkpoint feature in task handlers
ALTER TABLE dispensaries ADD COLUMN IF NOT EXISTS consecutive_successes INTEGER DEFAULT 0;
ALTER TABLE dispensaries ADD COLUMN IF NOT EXISTS last_successful_crawl_at TIMESTAMPTZ;
-- Index for finding failing stores
CREATE INDEX IF NOT EXISTS idx_dispensaries_consecutive_successes
ON dispensaries(consecutive_successes) WHERE consecutive_successes > 0;