· 8 years ago · Nov 27, 2017, 08:36 PM
1
2$sql[] = "
3CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."yazoo_price_reduction_config` (
4 `id` INT(11) NOT NULL AUTO_INCREMENT,
5 `price_reduction_status` TINYINT(1) NOT NULL DEFAULT '0',
6 `price_reduction_categories` TEXT NOT NULL,
7 `price_reduction_type` TINYINT(1) NOT NULL,
8 `price_reduction_value` DECIMAL(4,0) NOT NULL,
9 PRIMARY KEY (`id`)
10)
11COLLATE='utf8mb4_general_ci'
12ENGINE=InnoDB
13;
14CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."yazoo_price_reduction_products` (
15 `id` INT(11) NOT NULL AUTO_INCREMENT,
16 `id_product` INT(11) UNSIGNED NOT NULL,
17 `price_reduction_count` INT(6) NOT NULL,
18 `price_before_reduction` DECIMAL(8,6) NOT NULL,
19 `price_current` DECIMAL(8,6) NOT NULL,
20 `price_max_reduction` DECIMAL(8,6) NOT NULL,
21 PRIMARY KEY (`id`),
22 INDEX `product` (`id_product`),
23 CONSTRAINT `product` FOREIGN KEY (`id_product`) REFERENCES `ps_product` (`id_product`) ON UPDATE CASCADE ON DELETE CASCADE
24)
25COLLATE='utf8mb4_general_ci'
26ENGINE=InnoDB
27;
28";