From e48c0c6b034c237cb0f792e6623d291608958e93 Mon Sep 17 00:00:00 2001 From: David Valdez Date: Thu, 23 Aug 2018 12:00:54 -0500 Subject: [PATCH] Page migration --- .../migrations/agaric_page_paragraph.yml | 30 ++++++++++++ .../migrations/agaric_pages.yml | 49 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 web/modules/custom/agaric_migration/migrations/agaric_page_paragraph.yml create mode 100644 web/modules/custom/agaric_migration/migrations/agaric_pages.yml diff --git a/web/modules/custom/agaric_migration/migrations/agaric_page_paragraph.yml b/web/modules/custom/agaric_migration/migrations/agaric_page_paragraph.yml new file mode 100644 index 0000000..cbef17f --- /dev/null +++ b/web/modules/custom/agaric_migration/migrations/agaric_page_paragraph.yml @@ -0,0 +1,30 @@ +id: agaric_page_paragraph +migration_group: agaric +label: Page Body paragraph +source: + plugin: d7_node + node_type: page +process: + uid: + - + plugin: migration_lookup + migration: agaric_user + source: node_uid + no_stub: true + - + plugin: skip_on_empty + method: row + status: status + created: created + parent_type: "node" + field_text: body +destination: + plugin: 'entity_reference_revisions:paragraph' + default_bundle: text +dependencies: + enforced: + module: + - paragraphs +migration_dependencies: + required: + - agaric_user diff --git a/web/modules/custom/agaric_migration/migrations/agaric_pages.yml b/web/modules/custom/agaric_migration/migrations/agaric_pages.yml new file mode 100644 index 0000000..9433274 --- /dev/null +++ b/web/modules/custom/agaric_migration/migrations/agaric_pages.yml @@ -0,0 +1,49 @@ +id: agaric_page +migration_group: agaric +label: Agaric Pages +source: + plugin: d7_node + node_type: page +destination: + plugin: entity:node +process: + type: + plugin: default_value + default_value: page + langcode: + plugin: default_value + source: language + default_value: "und" + title: title + uid: + - + plugin: migration_lookup + migration: agaric_user + source: node_uid + no_stub: true + - + plugin: skip_on_empty + method: row + paragraph_body: + plugin: migration + migration: agaric_page_paragraph + source: nid + field_body_paragraph: + plugin: iterator + source: + - '@paragraph_body' + process: + target_id: '0' + target_revision_id: '1' + status: status + created: created + changed: changed + promote: promote + sticky: sticky + revision_uid: revision_uid + revision_log: log + revision_timestamp: timestamp +migration_dependencies: + required: + - agaric_user + - agaric_page_paragraph