'VARCHAR(16) NOT NULL DEFAULT \'info\'', 'timeout' => 'INT(11) NOT NULL DEFAULT 0', ]; foreach ($columnsToAdd as $column => $definition) { $existing = Db::getInstance()->executeS( 'SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'ws_customhtml` LIKE \'' . $column . '\'' ); if (!empty($existing)) { continue; } if (!Db::getInstance()->execute( 'ALTER TABLE `' . _DB_PREFIX_ . 'ws_customhtml` ADD COLUMN `' . $column . '` ' . $definition )) { return false; } } return true; }