From da350a3361ccd4fa4410b40348b40ce9ed98228e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 5 May 2020 13:05:28 +0100 Subject: [PATCH] Start adding post node migration --- .../migrate_plus.migration.post_node.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 web/modules/custom/custom/migrations/migrate_plus.migration.post_node.yml diff --git a/web/modules/custom/custom/migrations/migrate_plus.migration.post_node.yml b/web/modules/custom/custom/migrations/migrate_plus.migration.post_node.yml new file mode 100644 index 0000000..0a52077 --- /dev/null +++ b/web/modules/custom/custom/migrations/migrate_plus.migration.post_node.yml @@ -0,0 +1,56 @@ +id: post_node + +source: + plugin: url + data_fetcher_plugin: http + data_parser_plugin: json + urls: http://localhost:9000/posts.json + ids: + id: + type: integer + item_selector: posts/ + fields: + - + name: id + selector: id + label: Node ID + - + name: title + selector: title + label: Title + - + name: created + selector: created + label: Created + - + name: status + selector: status + label: Status + - + name: content + selector: content + label: Content + - + name: path + selector: path + label: Path + +process: + body/0/format: + plugin: default_value + default_value: full_html + body/0/value: content + title: title + created: created + changed: created + path: path + status: status + type: + plugin: default_value + default_value: post + uid: + plugin: default_value + default_value: 1 + +destination: + plugin: 'entity:node' \ No newline at end of file