-- Migration: Add is_read column to messages table
-- Date: 2026-02-26

ALTER TABLE messages
  ADD COLUMN IF NOT EXISTS is_read BOOLEAN DEFAULT FALSE AFTER message,
  ADD INDEX IF NOT EXISTS idx_messages_unread (recipient_id, is_read);
