Created
August 15, 2019 10:37
-
-
Save dinarcon/7608b3afd5db0793a66b1ca6d94e5dd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pseudo_mbe_book_paragraph: | |
plugin: migration_lookup | |
migration: ud_migrations_paragraph_intro_paragraph | |
source: book_ref | |
field_ud_favorite_book: | |
plugin: sub_process | |
source: | |
- '@pseudo_mbe_book_paragraph' | |
process: | |
target_id: '0' | |
target_revision_id: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'field_ud_favorite_book' => array (1) [ | |
array (2) [ | |
'target_id' => string (1) "3" | |
'target_revision_id' => string (1) "7" | |
] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
field_ud_image/target_id: | |
plugin: migration_lookup | |
migration: ud_migrations_paragraph_intro_image | |
source: photo_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: | |
plugin: embedded_data | |
data_rows: | |
- unique_id: 1 | |
name: 'Michele Metts' | |
photo_file: 'P01' | |
book_ref: 'B10' | |
- unique_id: 2 | |
name: 'Benjamin Melançon' | |
photo_file: 'P02' | |
book_ref: 'B20' | |
- unique_id: 3 | |
name: 'Stefan Freudenberg' | |
photo_file: 'P03' | |
book_ref: 'B30' | |
ids: | |
unique_id: | |
type: integer | |
destination: | |
plugin: 'entity:node' | |
default_bundle: ud_paragraphs | |
migration_dependencies: | |
required: | |
- ud_migrations_paragraph_intro_image | |
- ud_migrations_paragraph_intro_paragraph | |
optional: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: | |
plugin: embedded_data | |
data_rows: | |
- book_id: 'B10' | |
book_title: 'The definite guide to Drupal 7' | |
book_author: 'Benjamin Melançon et al.' | |
- book_id: 'B20' | |
book_title: 'Understanding Drupal Views' | |
book_author: 'Carlos Dinarte' | |
- book_id: 'B30' | |
book_title: 'Understanding Drupal Migrations' | |
book_author: 'Mauricio Dinarte' | |
ids: | |
book_id: | |
type: string | |
process: | |
field_ud_book_paragraph_title: book_title | |
field_ud_book_paragraph_author: book_author | |
destination: | |
plugin: 'entity_reference_revisions:paragraph' | |
default_bundle: ud_book_paragraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Rollback both migrations. | |
$ drush migrate:rollback ud_migrations_paragraph_intro_node | |
$ drush migrate:rollback ud_migrations_paragraph_intro_paragraph | |
# 2) Import both migrations againg. | |
$ drush migrate:import ud_migrations_paragraph_intro_paragraph | |
$ drush migrate:import ud_migrations_paragraph_intro_node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Manually. | |
$ drush migrate:import ud_migrations_paragraph_intro_image | |
$ drush migrate:import ud_migrations_paragraph_intro_paragraph | |
$ drush migrate:import ud_migrations_paragraph_intro_node | |
# 2) Executing depenpencies. | |
$ drush migrate:import ud_migrations_paragraph_intro_node --execute-dependencies | |
# 3) Using tags. | |
$ drush migrate:import --tag='UD Paragraphs Intro' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[3, 7] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment