-- Fix for missing 'type' column in conversations table
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS type VARCHAR(20);
-- Now create the index
CREATE INDEX IF NOT EXISTS idx_conversations_type ON conversations(type);
