-- Add package_videos table for videos and YouTube embeds
CREATE TABLE IF NOT EXISTS `package_videos` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `package_id` INT NOT NULL,
  `video_type` ENUM('upload', 'youtube') NOT NULL DEFAULT 'upload',
  `video_file` VARCHAR(255) DEFAULT NULL,
  `youtube_id` VARCHAR(50) DEFAULT NULL,
  `youtube_url` VARCHAR(500) DEFAULT NULL,
  `thumbnail` VARCHAR(255) DEFAULT NULL,
  `title` VARCHAR(255) DEFAULT NULL,
  `sort_order` INT DEFAULT 0,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`package_id`) REFERENCES `packages`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Create videos directory if not exists
-- This will be handled by PHP when uploading
