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

标签 migration drupal-8

我使用 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/

相关文章:

ruby-on-rails - rails : Alter migrations during early development phases

ruby-on-rails - 你只使用 rake :db:migrate:up when you only have migrations that have a up method in them?

python - Django South - 为已经填充表格的应用程序创建初始迁移

html - CKEditor 样式列表样式

php - Drupal 8 Twig 不适用于调试

jquery - 如何防止 Drupal 关注触发 ajax 提交的元素?

.net - 处理 Entity Framework 5 中的枚举更改

mysql - 从 MSSQL 迁移到 postgresql 或 mysql

php - 如何对一个方法进行单元测试,该方法调度改变被测方法行为的事件?

drupal-forms - Drupal 8、如何构建分层表单?