dof-dss / nidirect-migrations
Drupal Migrate API modules for NI Direct
Installs: 3 905
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Type:drupal-module
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-12-06 03:44:02 UTC
README
IF YOU UPDATE A MIGRATION CONFIGURATION PLEASE ENSURE YOU EXPORT THE CONFIG TO THE DRUPAL/CONFIG/SYNC DIRECTORY AND COMMIT IT
Migrations
Running migrations
- If you need to remove existing content on the site, use the command
lando drush mig-purge
- Ensure the Drupal migrate modules (
migrate, migrate_plus, migrate_tools
) are enabled. - perform a 'git pull' to ensure you have the latest commits.
- Enable the required NIDirect migration modules.
- Import the NIDirect Drupal 7 database into the Lando
drupal7db
database. - Add the NIDirect Drupal 7 files to
/imports/files/sites/default/files/
- Ensure 'Migrate NIDirect Utils' is enabled and run
lando drush mig-prep
to preform site-uuid sync and pre-migration tasks on the D7 database. - Import the site configuration using 'drush cim'.
- Use
lando mist
to display the migration status - Use
lando miip --group=<group name>
orlando miip <individual migration>
Migration order
Items in italics typically will not be run on production.
Run lando miip --group=<group name>
with the following:
- 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
then run the following individual migrations:
- node_contact
- miip nidirect_book
Running tests
Automated testing is broken into different categories: static analysis, unit and functional tests.
Static analysis
The project uses PHPCS to validate all custom code against Drupal.org coding standards; including migrate modules and custom themes.
For convenience, it can be invoked for local development using Lando:
lando phpcs
Unit tests
Any custom code that implements unit tests will be checked when using PHPUnit.
For local work, invoke it with lando phpunit
. This acts as a local tool
wrapper for the drupal8/phpcs.sh
script in order to simplify usage.
Functional tests
Migrations and key user activities and journeys are tested using a headless Chromedriver browser running in a local container. Drupal Core has adopted nightwatch.js as their functional testing tool. We use the same configuration file as Drupal Core, and can run any nightwatch.js tests (core, contrib or custom) by specifying a test suite tags parameter, eg:
lando nightwatch --skiptags core
: run all tests except those tagged
with core
.
lando nightwatch --tag nidirect-migrate
: run all tests tagged
with nidirect-migrate
.
lando nightwatch /path/to/your/test/file.js
: run a specific set of
tests in a single file.
Environmental variables
Some tests use environmental variables to prevent setting potentially sensitive values directly into test code. How these are set will vary from one environment to another, but in the case of local development using Lando you will find them under:
/config/drupal.env
If you need to change this file, you will also need to rebuild your local
appserver service: lando rebuild -s appserver
NightWatchJS tests
Import the included 'D7_Migrate_View' View into existing Drupal 7 NI Direct site and update the TEST_D7_URL env var to the URL of the site. This view contains XML data export displays for most of the migrated entities with paths specified as /migrate/ (see 'before' hook in each test for full path). Each display will return a random entity but this can be overridden in the test to return a specific node by appending an ID to the end of the URL e.g. /migrate/recipe/5012