Inicial story migration

This commit is contained in:
David Valdez 2019-07-18 14:58:19 -05:00
parent b609774a38
commit 4eda1d9ba6
2 changed files with 250 additions and 0 deletions

View file

@ -0,0 +1,218 @@
langcode: en
status: true
dependencies: { }
id: upgrade_d7_node_story
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 (Issue article)'
source:
plugin: d7_node
node_type: story
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_story/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
paragraph_body:
plugin: migration
migration: upgrade_d7_node_story_body_paragraph
source: nid
field_body_paragraph:
-
plugin: iterator
source:
- '@paragraph_body'
process:
target_id: '0'
target_revision_id: '1'
# upload:
# -
# plugin: sub_process
# source: upload
# process:
# target_id: fid
# display: display
# description: description
# field_author:
# -
# plugin: get
# source: field_author
# field_author_picture:
# -
# plugin: sub_process
# source: field_author_picture
# process:
# target_id: fid
# alt: alt
# title: title
# width: width
# height: height
# field_author_bio:
# -
# plugin: get
# source: field_author_bio
# field_citiations:
# -
# plugin: get
# source: field_citiations
# field_issue:
# -
# plugin: sub_process
# source: field_issue
# process:
# target_id: tid
# field_subtitle:
# -
# plugin: get
# source: field_subtitle
field_image:
-
plugin: sub_process
source: field_inserted_image
process:
target_id: fid
alt: alt
title: title
width: width
height: height
# field_geo_volume_3:
# -
# plugin: sub_process
# source: field_geo_volume_3
# process:
# target_id: tid
# field_publication_date:
# -
# plugin: sub_process
# source: field_publication_date
# process:
# value:
# plugin: format_date
# from_format: 'Y-m-d\TH:i:s'
# to_format: 'Y-m-d\TH:i:s'
# source: value
destination:
plugin: 'entity:node'
default_bundle: article
migration_dependencies:
required:
- upgrade_d7_user
optional: { }

View file

@ -0,0 +1,32 @@
id: upgrade_d7_node_story_body_paragraph
migration_group: migrate_drupal_7_geo
label: Body paragraph
source:
plugin: d7_node
node_type: story
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