magento升级错误从1.12到1.13 SQLSTATE:找不到catcat_category_flat'不存在

时间:2013-07-22 14:52:36

标签: magento

我已将Magento Enteprise 1.13.0.0的补丁文件添加到我的Magento Enteprise 1.12.0.2     越来越好了     SQLSTATE [42S02]:找不到基表或视图:1146表'catalog_category_flat'不存在     并且还根据http://www.hassmann-software.de/mysql-workbench-lost-connection-to-mysql-server-after-600-seconds/的指示对表进行了更改,但仍然得到相同的错误。我无法打开任何管理页面。

并在Magento Answers

发布了此问题

Magento Error

1 个答案:

答案 0 :(得分:-2)

SET SQL_SAFE_UPDATES=0;
DELETE
FROM catalog_category_entity_datetime
WHERE catalog_category_entity_datetime.attribute_id NOT IN (
    SELECT eav_attribute.attribute_id FROM eav_entity_type
     INNER JOIN eav_attribute ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
     WHERE (eav_entity_type.entity_type_code='catalog_category')
);

DELETE
FROM catalog_category_entity_decimal
WHERE catalog_category_entity_decimal.attribute_id NOT IN (
    SELECT eav_attribute.attribute_id FROM eav_entity_type
     INNER JOIN eav_attribute ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
     WHERE (eav_entity_type.entity_type_code='catalog_category')
);
DELETE
FROM catalog_category_entity_int
WHERE catalog_category_entity_int.attribute_id NOT IN (
    SELECT eav_attribute.attribute_id FROM eav_entity_type
     INNER JOIN eav_attribute ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
     WHERE (eav_entity_type.entity_type_code='catalog_category')
);

DELETE
FROM catalog_category_entity_text
WHERE catalog_category_entity_text.attribute_id NOT IN (
    SELECT eav_attribute.attribute_id FROM eav_entity_type
     INNER JOIN eav_attribute ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
     WHERE (eav_entity_type.entity_type_code='catalog_category')
);

DELETE
FROM catalog_category_entity_varchar
WHERE catalog_category_entity_varchar.attribute_id NOT IN (
    SELECT eav_attribute.attribute_id FROM eav_entity_type
     INNER JOIN eav_attribute ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
     WHERE (eav_entity_type.entity_type_code='catalog_category')
);



SET SQL_SAFE_UPDATES=0;
TRUNCATE TABLE catalog_category_entity_datetime;
TRUNCATE TABLE catalog_category_entity_decimal;
TRUNCATE TABLE catalog_category_entity_int;
TRUNCATE TABLE catalog_category_entity_text;
TRUNCATE TABLE catalog_category_entity_varchar;
TRUNCATE TABLE core_url_rewrite;