CREATE TABLE IF NOT EXISTS `image_optimization_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `original_filename` varchar(255) NOT NULL,
  `source_url` text,
  `target_domain` varchar(255) DEFAULT NULL,
  `user_alt` varchar(255) DEFAULT NULL,
  `user_title` varchar(255) DEFAULT NULL,
  `suggested_alt` varchar(255) DEFAULT NULL,
  `suggested_title` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
