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