CREATE TABLE IF NOT EXISTS product_images ( id INT AUTO_INCREMENT PRIMARY KEY, product_id INT NOT NULL, file_path VARCHAR(255) NOT NULL, is_primary TINYINT(1) DEFAULT 0, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY (product_id) REFERENCES products(id) ON DELETE CASCADE );