README.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. INTRODUCTION
  2. ------------
  3. The migrate_example_advanced module demonstrates some techniques for Drupal 8
  4. migrations beyond the basics in migrate_example. It includes a group of
  5. migrations with a wine theme.
  6. SETUP
  7. -----
  8. To demonstrate XML migrations as realistically as possible, the setup module
  9. provides the source data as REST services. So the migrations' references to these
  10. services can be set up accurately, if you install migrate_example_advanced via
  11. drush be sure to use the --uri parameter, e.g.
  12. drush en -y migrate_example_advanced --uri=http://d8.local:8083/
  13. THE WINE SITE
  14. -------------
  15. In this scenario, we have a wine aficionado site which stores data in SQL tables
  16. as well is pulling in additional data from XML services.
  17. To make the example as simple as to run as possible, the SQL data is placed in
  18. tables directly in your Drupal database - in most real-world scenarios, your
  19. source data will be in an external database. The migrate_example_advanced_setup
  20. submodule creates and populates these tables, as well as configuring your Drupal
  21. 8 site (creating node types, vocabularies, fields, etc.) to receive the data,
  22. and providing service endpoints for XML data.
  23. STRUCTURE
  24. ---------
  25. As with most custom migrations, there are two primary components to this
  26. example:
  27. 1. Migration configuration, in the config/install directory. These YAML files
  28. describe the migration process and provide the mappings from the source data
  29. to Drupal's destination entities.
  30. 2. Source plugins, in src/Plugin/migrate/source. These are referenced from the
  31. configuration files, and provide the source data to the migration processing
  32. pipeline, as well as manipulating that data where necessary to put it into
  33. a canonical form for migrations.
  34. UNDERSTANDING THE MIGRATIONS
  35. ----------------------------
  36. Basic techniques demonstrated in the migrate_example module are not rehashed
  37. here - it is expected that if you are learning Drupal 8 migration, you will
  38. study and understand those examples first, and use migrate_example_advanced to
  39. learn about specific techniques beyond those basics. This example doesn't have
  40. the narrative form of migrate_example - it's more of a grab-bag demonstrating
  41. varous features, and is more of a reference for, say, copying the code to set
  42. up an XML migration. An index of things demonstrated by this module:
  43. Multiple vocabularies populated in one migration
  44. ------------------------------------------------
  45. See migrate_plus.migration.wine_terms.yml.
  46. Importing from XML services
  47. ---------------------------
  48. See migrate_plus.migration.wine_role_xml.yml.