gpt4 book ai didi

migration - 什么方法可以调试 Drupal 8 迁移中忽略的项目

转载 作者:行者123 更新时间:2023-12-04 10:47:48 25 4
gpt4 key购买 nike

我使用 migrate_upgrade 模块创建了迁移脚本,但是在迁移时我有很多被忽略的项目,我尝试使用迁移工具中的 drush mmsg 但它仅在失败时对忽略的字段没有帮助。

最佳答案

您正在从 Drupal 7 迁移到 Drupal 8,并且在运行迁移后忽略了项目。这就引出了一个非常重要的问题,即哪些被忽略了?

你看到什么了

[notice] Processed 632 items (630 created, 0 updated, 0 failed, 2 ignored) - done with 'node_form'

以上是我将在示例中使用的内容。

你想知道什么

哪些项目被忽略了!?为此,我们可以查看数据库。我假设您可以访问控制台...
migrate_map_migration_name数据库中的表将为您提供所需的信息。会有一个名为 source_row_status 的列.值 2 等于忽略状态。所以运行以下 MySQL 命令:

SELECT * FROM `migrate_map_node_form` WHERE source_row_status = 2;
sourceid1返回行的列将包含被忽略的项目的 id。

示例输出:
+-------------------------------------------------------+-----------+---------+-------------------+-------------------+---------------+------+
| source_ids_hash | sourceid1 | destid1 | source_row_status | source_row_status | last_imported | hash |
+-------------------------------------------------------+-----------+---------+-------------------+-------------------+---------------+------+
| 8530eb5d63ad4cfea47134a28e3339e089f639164d218287c3... | 10931 | NULL | 2 | 0 | 0 | |
+-------------------------------------------------------+-----------+---------+-------------------+-------------------+---------------+------+
| ddd550e747c2a26a2a5058d49be0e146616fd5c45f6bef88f3... | 11656 | NULL | 2 | 0 | 0 | |
+-------------------------------------------------------+-----------+---------+-------------------+-------------------+---------------+------+

关于migration - 什么方法可以调试 Drupal 8 迁移中忽略的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38874193/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com