从 Magento 1.9 到 Magento 2.4 的数据迁移过程中出现错误

问题描述

sqlSTATE[42S02]:未找到基表或视图:1146 表“m2loom_live.customer_entity_back”不存在,查询为:SELECT disTINCT child.custome r_id FROM authorlogin_customer AS child LEFT JOIN customer_entity_back AS parent ON child.customer_id = parent.entity_id WHERE (child.customer_id IS NOT NULL) AND (parent.entity_id IS NUL L)

enter image description here

解决方法

查看该表名 (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>