Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ps_emailsubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ public function install()
`http_referer` VARCHAR(255) NULL,
`active` TINYINT(1) NOT NULL DEFAULT \'0\',
`id_lang` int(10) NOT NULL DEFAULT \'0\',
PRIMARY KEY(`id`)
PRIMARY KEY(`id`),
KEY `email_shop` (`email`, `id_shop`),
KEY `active_shop` (`active`, `id_shop`)
) ENGINE=' . _MYSQL_ENGINE_ . ' default CHARSET=utf8');
}

Expand Down
42 changes: 42 additions & 0 deletions upgrade/upgrade-3.0.1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
if (!defined('_PS_VERSION_')) {
exit;
}

/**
* @param Module $module
*
* @return bool
*/
function upgrade_module_3_0_1($module)
{
return Db::getInstance()->execute(
'ALTER TABLE `' . _DB_PREFIX_ . 'emailsubscription`
ADD KEY `email_shop` (`email`, `id_shop`),
ADD KEY `active_shop` (`active`, `id_shop`)'
);
}
Loading