首页 > 解决方案 > 从 Magento 1.9 到 Magento 2.4 的数据迁移过程中出现错误

问题描述

SQLSTATE [42S02]:未找到基表或视图:1146 表“m2loom_live.customer_entity_back”不存在,查询为:SELECT DISTINCT childcustome r_idFROM authorlogin_customerAS child LEFT JOIN customer_entity_backAS parentON child.customer_id = parent.entity_id WHERE (child.customer_id IS NOT NULL) AND (parent.entity_id IS NUL L)

在此处输入图像描述

标签: magentomagento2database-migrationmagento-1.9

解决方案


查看该表名 ( m2loom_live) 我猜该表来自您可能已放入的扩展或自定义。这些表需要存在才能将它们的行迁移到新数据库。为此,您需要安装该扩展的 Magento 2 版本或重新创建模块并添加安装脚本(或更好的是 db_schema.xml)文件,然后运行bin/magento setup:upgrade以创建表。然后您应该能够将数据迁移到新数据库。

如果您不想保留该表,则必须修改或扩展数据迁移工具的映射文件,以告诉它忽略该表而不是尝试迁移其数据。我不是 100% 在这部分,但我认为您想要编辑的映射文件将是map.xml并且您会添加:

<document_rules><!-- This is the element you need to add your configuration too -->
...
<ignore>
    <document>Your Table Here</document>
</ignore>

推荐阅读