将站点移动到暂存后找不到基表或视图

时间:2016-01-12 05:22:00

标签: mysql magento

Magento 1.9.2.2从本地迁移到登台环境,一切正常只有一个扩展 - magentopros_productAttachments_attachment无效,

  

a:5:{i:0; s:215:" SQLSTATE [42S02]:未找到基表或视图:1146表' magento.magentopros_productAttachments_attachment'不存在,查询是:SELECT COUNT(*)FROM magentopros_productAttachments_attachment AS main_table&#34 ;; i:1; s:5550:"#0 / var / www /public/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _execute(Array)

但是这些表实际上存在,而且在core_resource表中,请参见截图。

DEMO

我尝试删除了那些表和值并重新安装了扩展程序,但它有效,但如果在转移到生产环境时表中有大量数据会怎样。

任何人都可以建议明确解决此问题,任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:0)

任何良好的扩展都不应该发生这种情况。如果您遇到此类问题,您仍可以转储与该特定扩展相关的表和数据,并在部署到Live时运行它。

步骤 1.在生成之前使用数据表转储(magentopros_productattachments_attachment和magentopros_productattachments_attachment_product)。

  1. 将整个数据库部署到实时网站。

  2. 请勿更改扩展名的core_resouce表数据。

  3. 删除表magentopros_productattachments_attachment和magentopros_productattachments_attachment_product。

  4. 在Live site中运行SQL转储。

答案 1 :(得分:0)

  1. 从数据库中删除扩展表
  2. magentopros_productAttachments_setup表格中删除(core_resource)扩展程序设置文件。
  3. 禁用缓存管理,然后运行项目。
  4. 它会起作用。