-- Migration: Add 'flagged' status to relay_event_queue -- Fixes infinite re-review loop (#27): AI-flagged events now transition to -- status='flagged' instead of staying 'pending', so processPending() skips them. -- -- The status column is plain TEXT (not a Postgres enum), so no ALTER TYPE is -- needed. This migration adds an index for admin queries on flagged events. CREATE INDEX IF NOT EXISTS idx_relay_event_queue_status ON relay_event_queue(status);