-- Добавяне на таблица за снимки към проверки

CREATE TABLE IF NOT EXISTS `inspection_photos` (
  `photo_id` int(11) NOT NULL AUTO_INCREMENT,
  `inspection_id` int(11) NOT NULL,
  `equipment_id` int(11) DEFAULT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `uploaded_by` int(11) NOT NULL,
  `upload_date` datetime NOT NULL,
  PRIMARY KEY (`photo_id`),
  KEY `inspection_id` (`inspection_id`),
  KEY `equipment_id` (`equipment_id`),
  KEY `uploaded_by` (`uploaded_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
