-- Migration: Add is_read column to contact_messages table
-- Run this SQL script to update your existing database

ALTER TABLE contact_messages 
ADD COLUMN is_read BOOLEAN DEFAULT FALSE AFTER message;

-- Add updated_at column if it doesn't exist
ALTER TABLE contact_messages 
ADD COLUMN updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

-- Update existing messages to be unread by default
UPDATE contact_messages SET is_read = FALSE WHERE is_read IS NULL;

