[-] Installer : changed the primary keys of tha language tables of category, product, meta, carrier #PSCFV-3726
This commit is contained in:
1 parent
76bf4353ef
commit
9f768e6b61
3 files changed
+139
-139
No files matched your search
+129
-129
File diff suppressed because it is too large.
Load diff
@@ -28,16 +28,14 @@
|
|||||||
function add_id_shop_to_shipper_lang_index()
|
function add_id_shop_to_shipper_lang_index()
|
||||||
{
|
{
|
||||||
$res = true;
|
$res = true;
|
||||||
$key_exists = Db::getInstance()->executeS('SHOW INDEX
|
|
||||||
FROM `'._DB_PREFIX_.'carrier_lang`
|
$key_exists = Db::getInstance()->executeS('
|
||||||
WHERE Key_name = "shipper_lang_index"');
|
SHOW INDEX
|
||||||
|
FROM `'._DB_PREFIX_.'carrier_lang`
|
||||||
|
WHERE Key_name = "shipper_lang_index"');
|
||||||
if ($key_exists)
|
if ($key_exists)
|
||||||
$res &= Db::getInstance()->execute('ALTER TABLE
|
$res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'carrier_lang` DROP KEY `shipper_lang_index`');
|
||||||
`'._DB_PREFIX_.'carrier_lang`
|
$res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'carrier_lang` ADD PRIMARY KEY (`id_carrier`, `id_shop`, `id_lang`)');
|
||||||
DROP KEY `shipper_lang_index`');
|
|
||||||
$res &= Db::getInstance()->execute('ALTER TABLE
|
|
||||||
`'._DB_PREFIX_.'carrier_lang`
|
|
||||||
ADD UNIQUE `shipper_lang_index` (`id_carrier`, `id_shop`, `id_lang`)');
|
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
@@ -5,4 +5,6 @@ ALTER TABLE `PREFIX_order_detail_tax` CHANGE `total_amount` `total_amount` DECIM
|
|||||||
|
|
||||||
ALTER TABLE `PREFIX_customer_message` ADD `read` tinyint(1) NOT NULL default '0' AFTER `private`;
|
ALTER TABLE `PREFIX_customer_message` ADD `read` tinyint(1) NOT NULL default '0' AFTER `private`;
|
||||||
|
|
||||||
INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ALLOW_MOBILE_DEVICE', '1', NOW(), NOW());
|
INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ALLOW_MOBILE_DEVICE', '1', NOW(), NOW());
|
||||||
|
|
||||||
|
/* PHP:p15017_add_id_shop_to_primary_key(); */;
|
||||||
Reference in new issue
Block a user