0
我需要用我的插件的安装脚本更改magento中的默认customer_entity表描述,是否可以使其删除UNIQUE KEY
字段?Magento客户实体表删除表属性中的UNIQUE KEY
Magento的customer_entity
表结构描述为:
CREATE TABLE `customer_entity` (
`entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
`entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
`attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set Id',
`website_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Website Id',
`email` varchar(255) DEFAULT NULL COMMENT 'Email',
...
UNIQUE KEY `UNQ_CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`),
...
所以我需要的是让它删除这一项与安装脚本
UNIQUE KEY `UNQ_CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`)
究竟似乎是问题吗?你不能从脚本中删除该行吗? – Mureinik
根据magento参考它应该与安装脚本不使用SQL,我上面提供的代码只是一个转储,描述一个表 –