dof-dss / nidirect-migrations
为NI Direct提供的Drupal迁移API模块
Requires
- composer/installers: ^1.6
- dev-development
- 1.0.0
- 0.15.1
- 0.14.5
- 0.14.4
- 0.14.3
- 0.14.2
- 0.14.1
- 0.12.8
- 0.12.7
- 0.12.6
- 0.12.5
- 0.12.4
- 0.12.3
- 0.12.2
- 0.12.1
- 0.11.17
- 0.11.16
- 0.11.14
- 0.11.13
- 0.11.12
- 0.11.11
- 0.11.9
- 0.11.7
- 0.11.6
- 0.11.4
- 0.11.2
- 0.10.3
- 0.10.2
- 0.10.1
- 0.9.3
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-main
- dev-main_copy
- dev-node_id_renumber
- dev-D8NID-783
- dev-D8NID-551
- dev-D8NID-555
- dev-D8NID-588
- dev-D8NID-515
- dev-D8NID-514
- dev-circle_ci_php7.3
- dev-D8NID-397
- dev-D8NID-410
- dev-post_migrate_alias_tidy
- dev-health_conditions_group_bugfix
- dev-migration_source_bugfix
- dev-D8NID-386
- dev-D8NID-364
- dev-D8NID-365
- dev-D8NID-363
- dev-D8NID-359
- dev-D8NID-322
- dev-cleanup
- dev-D8NID-337
- dev-D8NID-341
- dev-D8NID-329-update-functional-tests
- dev-D8NID-336
- dev-migrate_module_dependencies
- dev-install_migrate_modules
- dev-D8NID-327
- dev-D8NID-310-bugfix
- dev-D8NID-323
- dev-D8NID-278
- dev-D8NID-225
- dev-D8NID-237
- dev-D8NID-230
- dev-D8NID-228
- dev-D8NID-94
- dev-D8NID-103
- dev-D8NID-97
- dev-D8NID-96
- dev-D8NID-95
- dev-D8NID-93
- dev-D8NID-92
- dev-D8NID-91
- dev-D8NID-90
- dev-D8NID-84
- dev-D8NID-9-content-authoring-plugins
- dev-D8NID-86
- dev-D8NID-81
- dev-D8NID-72
- dev-D8NID-70
- dev-D8NID-68
- dev-D8NID-22
- dev-D8NID-62
- dev-D8NID-29-recipe
- dev-D8NID-59
- dev-D8NID-60
- dev-D8NID-57
- dev-remove_content_type_migration
- dev-D8NID-46
- dev-D8NID-37
This package is auto-updated.
Last update: 2024-09-06 03:13:34 UTC
README
如果您更新了迁移配置,请确保将配置导出到DRUPAL/CONFIG/SYNC目录并提交
迁移
运行迁移
- 如果您需要删除网站上的现有内容,请使用命令
lando drush mig-purge
- 确保已启用Drupal迁移模块(
migrate, migrate_plus, migrate_tools
)。 - 执行'git pull'以确保您有最新的提交。
- 启用所需的NIDirect迁移模块。
- 将NIDirect Drupal 7数据库导入到Lando的
drupal7db
数据库。 - 将NIDirect Drupal 7文件添加到
/imports/files/sites/default/files/
- 确保“Migrate NIDirect Utils”已启用,并运行
lando drush mig-prep
以在D7数据库上执行站点-uuid同步和迁移前任务。 - 使用“drush cim”导入站点配置。
- 使用
lando mist
显示迁移状态 - 使用
lando miip --group=<group name>
或lando miip <individual migration>
迁移顺序
通常在生产环境中不会运行斜体字中的项。
使用以下内容运行lando miip --group=<group name>
- migrate_drupal_7_user
- migrate_drupal_7_file
- migrate_drupal_7_taxo
- migrate_nidirect_node_driving_instructor
- migrate_nidirect_entity_gp
- migrate_nidirect_node_application
- migrate_nidirect_node_article
- migrate_nidirect_node_external_link
- migrate_nidirect_node_gp_practice
- migrate_nidirect_node_health_condition
- migrate_nidirect_node_landing_page
- migrate_nidirect_node_news
- migrate_nidirect_node_contact
- migrate_nidirect_node_nidirect_contact
- migrate_nidirect_node_page
- migrate_nidirect_node_publication
- migrate_drupal_7_link
然后运行以下单个迁移
- node_contact
- miip nidirect_book
运行测试
自动测试分为不同的类别:静态分析、单元测试和功能测试。
静态分析
项目使用PHPCS验证所有自定义代码与Drupal.org编码标准的一致性;包括迁移模块和自定义主题。
为了方便,可以在Lando本地开发中使用它:lando phpcs
单元测试
使用PHPUnit时,将检查实现单元测试的任何自定义代码。
对于本地工作,使用lando phpunit
调用它。这充当本地工具包装器,用于简化对drupal8/phpcs.sh
脚本的调用。
功能测试
使用在本地容器中运行的headless Chromedriver浏览器测试迁移和关键用户活动和旅程。Drupal Core已采用nightwatch.js作为其功能测试工具。我们使用与Drupal Core相同的配置文件,可以通过指定测试套件标签参数来运行任何nightwatch.js测试(核心、贡献或自定义),例如
lando nightwatch --skiptags core
:运行除带有core
标签的测试之外的所有测试。lando nightwatch --tag nidirect-migrate
:运行带有nidirect-migrate
标签的所有测试。lando nightwatch /path/to/your/test/file.js
:运行单个文件中的特定测试集。
环境变量
一些测试使用环境变量来防止将可能敏感的值直接设置到测试代码中。这些变量的设置方法会因环境而异,但如果你在本地开发中使用Lando,你可以在以下位置找到它们:
/config/drupal.env
如果你需要更改此文件,你还需要重新构建你的本地应用服务器服务:lando rebuild -s appserver
NightWatchJS 测试
将包含的 'D7_Migrate_View' 视图导入现有的Drupal 7 NI Direct站点,并将 TEST_D7_URL 环境变量更新为站点的URL。此视图包含大多数迁移实体的XML数据导出显示,路径指定为 /migrate/(见每个测试中的 'before' 钩子以获取完整路径)。每个显示将返回一个随机实体,但可以在测试中通过将ID追加到URL末尾来覆盖,例如:/migrate/recipe/5012