-- Migration 002: Add confidence_score and is_handoff to messages table
-- Run this in Supabase SQL editor

ALTER TABLE messages ADD COLUMN IF NOT EXISTS confidence_score DECIMAL(5,4);
ALTER TABLE messages ADD COLUMN IF NOT EXISTS is_handoff BOOLEAN DEFAULT FALSE;

CREATE INDEX IF NOT EXISTS idx_messages_confidence
    ON messages(confidence_score) WHERE confidence_score IS NOT NULL;
