CREATE TABLE IF NOT EXISTS messages ( id INT AUTO_INCREMENT PRIMARY KEY, sender_id INT NOT NULL, sender_type ENUM('coach', 'client') NOT NULL, receiver_id INT NOT NULL, receiver_type ENUM('coach', 'client') NOT NULL, message TEXT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, is_read BOOLEAN DEFAULT FALSE );