prestashop alter table if not exists code example
Example: prestashop alter table if not exists
$columnExists = Db::getInstance()->executeS('SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'orders` LIKE \'sendnow\'');
if (empty($columnExists)) {
$sql[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'orders`
ADD sendnow tinyInt(1);';
}