From 718a3850a22baa2409ac7bc5aac6371d35f3195e Mon Sep 17 00:00:00 2001 From: David Valdez Date: Tue, 30 Jul 2019 12:45:40 -0500 Subject: [PATCH] Pages migration --- .../migrations/upgrade_d7_node_page.yml | 173 ++++++++++++++++++ .../upgrade_d7_node_page_body_paragraph.yml | 32 ++++ 2 files changed, 205 insertions(+) create mode 100644 web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page.yml create mode 100644 web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page_body_paragraph.yml diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page.yml new file mode 100644 index 0000000..91e66d8 --- /dev/null +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page.yml @@ -0,0 +1,173 @@ +langcode: en +status: true +dependencies: { } +id: upgrade_d7_node_page +class: Drupal\migrate\Plugin\Migration +field_plugin_method: alterFieldInstanceMigration +cck_plugin_method: null +migration_tags: + - 'Drupal 7' + - Content +migration_group: migrate_drupal_7_geo +label: 'Nodes (Page)' +source: + plugin: d7_node + node_type: page +process: + nid: + - + plugin: get + source: tnid + vid: + - + plugin: get + source: vid + langcode: + - + plugin: default_value + source: language + default_value: und + title: + - + plugin: get + source: title + uid: + - + plugin: get + source: node_uid + status: + - + plugin: get + source: status + created: + - + plugin: get + source: created + changed: + - + plugin: get + source: changed + promote: + - + plugin: get + source: promote + sticky: + - + plugin: get + source: sticky + revision_uid: + - + plugin: get + source: revision_uid + revision_log: + - + plugin: get + source: log + revision_timestamp: + - + plugin: get + source: timestamp + comment_node_page/0/status: + - + plugin: get + source: comment + taxonomy_vocabulary_1: + - + plugin: sub_process + source: taxonomy_vocabulary_1 + process: + target_id: tid + taxonomy_vocabulary_7: + - + plugin: sub_process + source: taxonomy_vocabulary_7 + process: + target_id: tid + taxonomy_vocabulary_12: + - + plugin: sub_process + source: taxonomy_vocabulary_12 + process: + target_id: tid + taxonomy_vocabulary_13: + - + plugin: sub_process + source: taxonomy_vocabulary_13 + process: + target_id: tid +# taxonomy_vocabulary_14: +# - +# plugin: sub_process +# source: taxonomy_vocabulary_14 +# process: +# target_id: tid + taxonomy_vocabulary_10: + - + plugin: sub_process + source: taxonomy_vocabulary_10 + process: + target_id: tid + taxonomy_vocabulary_2: + - + plugin: sub_process + source: taxonomy_vocabulary_2 + process: + target_id: tid +# taxonomy_vocabulary_3: +# - +# plugin: sub_process +# source: taxonomy_vocabulary_3 +# process: +# target_id: tid +# taxonomy_vocabulary_5: +# - +# plugin: sub_process +# source: taxonomy_vocabulary_5 +# process: +# target_id: tid +# taxonomy_vocabulary_8: +# - +# plugin: sub_process +# source: taxonomy_vocabulary_8 +# process: +# target_id: tid + taxonomy_vocabulary_17: + - + plugin: sub_process + source: taxonomy_vocabulary_17 + process: + target_id: tid + paragraph_body: + plugin: migration + migration: upgrade_d7_node_page_body_paragraph + source: nid + field_body_paragraph: + - + plugin: iterator + source: + - '@paragraph_body' + process: + target_id: '0' + target_revision_id: '1' +# body: +# - +# plugin: get +# source: body + upload: + - + plugin: sub_process + source: upload + process: + target_id: fid + display: display + description: description +destination: + plugin: 'entity:node' + default_bundle: page +migration_dependencies: + required: + - upgrade_d7_user + - upgrade_d7_node_type + optional: + - upgrade_d7_field_instance + - upgrade_d7_comment_field_instance diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page_body_paragraph.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page_body_paragraph.yml new file mode 100644 index 0000000..8b0b4cb --- /dev/null +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_node_page_body_paragraph.yml @@ -0,0 +1,32 @@ +id: upgrade_d7_node_page_body_paragraph +migration_group: migrate_drupal_7_geo +label: Body paragraph +source: + plugin: d7_node + node_type: page +process: + uid: + - plugin: get + source: node_uid + status: status + created: created + parent_type: "node" + field_text: + - + plugin: sub_process + source: body + process: + value: value + format: + plugin: default_value + default_value: 'full_html' +destination: + plugin: 'entity_reference_revisions:paragraph' + default_bundle: text +dependencies: + enforced: + module: + - paragraphs +migration_dependencies: + required: + - upgrade_d7_user