* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ function alter_ignore_drop_key($table, $key) { $indexes = Db::getInstance()->executeS(' SHOW INDEX FROM `'._DB_PREFIX_.pSQL($table).'` WHERE Key_name = \''.pSQL($key).'\' '); if (count($indexes) > 0) { Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.pSQL($table).'` DROP KEY `'.pSQL($key).'` '); } }