* @copyright 2022 idnovate.com * @license See above */ function upgrade_module_1_1_16() { $columnExists = Db::getInstance()->getRow( "SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '"._DB_NAME_."' AND TABLE_NAME = '"._DB_PREFIX_."advancedpopup' AND COLUMN_NAME = 'genders'" ); if (!$columnExists) { $query = "ALTER TABLE `" . _DB_PREFIX_ . "advancedpopup` ADD `genders` text COLLATE 'utf8_general_ci' NULL AFTER `groups`;"; Db::getInstance()->execute($query); $query = "UPDATE `" . _DB_PREFIX_ . "advancedpopup` SET genders = '';"; Db::getInstance()->execute($query); } return true; }