* @copyright 2019 idnovate.com * @license See above */ function upgrade_module_2_1_4($module) { Db::getInstance()->execute( "ALTER TABLE `"._DB_PREFIX_."quantity_discount_rule_condition` ADD `customer_years_from` int(10) NULL AFTER `customer_birthday`, ADD `customer_years_to` int(10) NULL AFTER `customer_years_from`, ADD `customer_orders_nb_prod_operator` tinyint(1) unsigned DEFAULT NULL AFTER `customer_orders_nb_days`, ADD `customer_orders_nb_prod` int(10) unsigned DEFAULT NULL AFTER `customer_orders_nb_prod_operator`;" ); Db::getInstance()->execute( "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."quantity_discount_rule_condition_state` ( `id_quantity_discount_rule_condition` int(10) unsigned NOT NULL, `id_quantity_discount_rule` int(10) unsigned NOT NULL, `id_state` int(10) unsigned NOT NULL, PRIMARY KEY `primary_ps_quantity_discount_rule_condition_state` (`id_quantity_discount_rule_condition`, `id_quantity_discount_rule`, `id_state`), KEY `id_quantity_discount_rule_condition` (`id_quantity_discount_rule_condition`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8" ); $module->registerHook('actionCustomerAccountAdd'); return true; }