content migration to drupal 8
TRANSCRIPT
Content Migration to D8
Training Team
Mohit - Axelerant
Vaibhav - Acquia
Rohit - Acquia
Amit - Acquia
Agenda
- Basics of Migration Configuration Entity (YML)
- Basics of how to write Source and Process Plugins
- Demo code to showcase migrations from Drupal / XML / JSON / Custom Mysql database
- Exercise to do migration from a given source (xml, json, mysql db)
Migration Configuration Entity (YML)
Heart of the migration is YML file. YML has four important keys,
- Id
- Source
- Process
- Destination
Sample YML File
Sample YML File - XML/JSON
Core/Contrib Process Plugins
https://www.drupal.org/docs/8/api/migrate-api/migrate-process
- get
- callback
- default_value
- concat
- migrate
Core/Contrib Source Plugins
- XML
- JSON
- SOAP
Custom Process Plugin
Custom Source Plugin - SQL
Migration related Drush Commands
drush migrate-status (ms)
drush migrate-import <migration-name> (mi) [--update, --idlist=1,2,4]
drush migrate-rollback <migration-name> (mr)
drush migrate-reset-status <migration-name> (mrs)
Demo Time
- Custom Mysql DB to D8
- XML to D8
- JSON to D8
- D6 to D8
Exercise Time
- Users
- eyeColor (taxonomy), gender (select list - m/f), about (split in 2 fields), registered (timestamp)
- Data
- money (prefix $), user_id (map to user),
References
- Writing D6 to D8 entity migrations
- Drupal 6 to Drupal 8(.1.x) Custom Content Migration