DROP TABLE IF EXISTS `coupon_history`;
CREATE TABLE `coupon_history` (
                                  `id` int NOT NULL AUTO_INCREMENT,
                                  `coupon_id` int NOT NULL,
                                  `order_id` int NOT NULL,
                                  `customer_id` int NOT NULL,
                                  `amount` decimal(15,4) NOT NULL,
                                  `date_added` datetime NOT NULL,
                                  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;