-- Migration: Add video support to gallery
-- Date: 2024
-- Description: Adds media_type column to gallery table to support both images and videos

-- Add media_type column to gallery table
ALTER TABLE gallery 
ADD COLUMN IF NOT EXISTS media_type VARCHAR(10) DEFAULT 'image' AFTER image_url;

-- Update existing records to have media_type = 'image'
UPDATE gallery 
SET media_type = 'image' 
WHERE media_type IS NULL OR media_type = '';

-- Add comment to table
ALTER TABLE gallery COMMENT = 'Gallery media (images and videos) with categories and descriptions';
