-- Update database to add media support for news submissions
USE realtenko_bot;

-- Add media columns to news_submissions table
ALTER TABLE news_submissions 
ADD COLUMN media_type ENUM('text', 'photo', 'video') DEFAULT 'text' AFTER text,
ADD COLUMN media_file_id VARCHAR(255) AFTER media_type,
ADD COLUMN media_file_size INT AFTER media_file_id,
ADD COLUMN media_duration INT AFTER media_file_size,
ADD COLUMN media_width INT AFTER media_duration,
ADD COLUMN media_height INT AFTER media_width;

-- Update existing records to have 'text' media type
UPDATE news_submissions SET media_type = 'text' WHERE media_type IS NULL; 