-- Add user_status column to users table
ALTER TABLE users ADD COLUMN IF NOT EXISTS user_status VARCHAR(20) DEFAULT 'OFFLINE';
UPDATE users SET user_status = CASE WHEN is_online = true THEN 'ONLINE' ELSE 'OFFLINE' END WHERE user_status IS NULL;

