-- SQL Migration for creating the uploaded_files table.
-- This table will store metadata for each XML file uploaded.

CREATE TABLE IF NOT EXISTS `uploaded_files` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `original_filename` VARCHAR(255) NOT NULL,
  `new_filename` VARCHAR(255) NOT NULL,
  `upload_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  `status` VARCHAR(50) DEFAULT 'pending_validation',
  `uploaded_by` VARCHAR(255) NOT NULL COMMENT 'User email or identifier'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
