// Removed some warnings in the updater

This commit is contained in:
dMetzger
2012-08-09 07:24:03 +00:00
parent 44d4c1648d
commit c463539174
2 changed files with 12 additions and 19 deletions
@@ -6,15 +6,8 @@
function update_mailalerts_add_column_idshop()
{
$id_mailalerts = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "mailalerts"');
if($id_mailalerts)
{
$res = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`');
if ($res)
return true;
else
return array('error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance ()->getMsgError()));
}
$installed = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "mailalerts"');
if ($installed && !Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`'))
return array('error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance ()->getMsgError()));
return true;
}