execute($query); $query = 'ALTER TABLE `' . _DB_PREFIX_ . "cookiesplus_user_consent` CHANGE `hash` `hash` varchar(41) COLLATE 'utf8_general_ci' NOT NULL AFTER `id_shop`;"; Db::getInstance()->execute($query); $query = 'ALTER TABLE `' . _DB_PREFIX_ . "cookiesplus_user_consent` CHANGE `ip` `ip` varchar(39) COLLATE 'utf8_general_ci' NOT NULL AFTER `date`;"; Db::getInstance()->execute($query); $indexExists = Db::getInstance()->executeS( 'SHOW index FROM `' . _DB_PREFIX_ . "cookiesplus_user_consent` WHERE column_name = 'hash';" ); if (!$indexExists) { $query = 'ALTER TABLE `' . _DB_PREFIX_ . 'cookiesplus_user_consent` ADD INDEX `hash` (`hash`);'; Db::getInstance()->execute($query); } return true; }