// Removed some warnings in the updater
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16770 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user