DROP TABLE IF EXISTS `sales_history`;
CREATE TABLE `sales_history` (
                                 `id` int NOT NULL AUTO_INCREMENT,
                                 `sales_id` int DEFAULT NULL,
                                 `user_id` int DEFAULT NULL,
                                 `sale_status_id` int NOT NULL,
                                 `tracking_code` varchar(20) DEFAULT NULL,
                                 `tracking_name` varchar(50) DEFAULT NULL,
                                 `note` text,
                                 `user_note` text,
                                 `date_added` datetime DEFAULT NULL,
                                 PRIMARY KEY (`id`),
                                 KEY `sales_history_id` (`sale_status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;