diff --git a/install-dev/upgrade/php/editorial_update_multishop.php b/install-dev/upgrade/php/editorial_update_multishop.php new file mode 100644 index 000000000..e846261e3 --- /dev/null +++ b/install-dev/upgrade/php/editorial_update_multishop.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function editorial_update_multishop() +{ + if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name`="editorial"')) + { + Db::getInstance()->execute('ALTER `'._DB_PREFIX_.'editorial` ADD `id_shop` AFTER `id_editorial`'); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'editorial` SET `id_shop` = 1'); + } +} \ No newline at end of file diff --git a/install-dev/upgrade/sql/1.5.0.12.sql b/install-dev/upgrade/sql/1.5.0.12.sql index 95d90320d..6c932c569 100644 --- a/install-dev/upgrade/sql/1.5.0.12.sql +++ b/install-dev/upgrade/sql/1.5.0.12.sql @@ -29,4 +29,5 @@ SET total_amount = odt.unit_amount * od.product_quantity; ALTER TABLE `PREFIX_pagenotfound` ADD `id_shop_group` INT(10) AFTER `id_pagenotfound`; ALTER TABLE `PREFIX_pagenotfound` ADD `id_shop` INT(10) AFTER `id_pagenotfound`; -/* PHP:add_new_groups('Non identifié', 'Unidentified'); */; \ No newline at end of file +/* PHP:add_new_groups('Non identifié', 'Unidentified'); */; +/* PHP:editorial_update_multishop(); */; \ No newline at end of file