Skip to content

Instantly share code, notes, and snippets.

@wluisi
Created May 25, 2016 18:27
Show Gist options
  • Save wluisi/5b643201586e1e8dcbb5d62bf5a4c447 to your computer and use it in GitHub Desktop.
Save wluisi/5b643201586e1e8dcbb5d62bf5a4c447 to your computer and use it in GitHub Desktop.
D8 Migration YML
# blog node migration YML file.
langcode: en
status: true
migration_group: D6 to D8
dependencies:
config:
- migrate_plus.migration.client_migration_blog
module:
- client_migration
- node
id: client_migration_blog
migration_tags:
- 'Drupal 6'
label: 'Blogs'
source:
plugin: client_migration_blog
node_type: blog
process:
nid: nid
type: type
title: title
langcode:
plugin: default_value
source: language
default_value: und
status: status
created: created
changed: changed
# set author to super admin
uid: user_one_uid
path: dst
field_abstract: field_abstract
body:
plugin: node_blog_body
source: field_body
field_featured_image:
migration: client_migration_blog_featured_image
plugin: node_blog_featured_image
source: field_blog_feature_img
destination:
plugin: entity:node
node_type: blog
migration_dependencies:
required:
- d6_filter_format
- client_migration_blog_featured_image
# blog file migration YML file.
id: client_migration_blog_featured_image
status: true
migration_group: Files
dependencies:
module:
- file
label: Migrate Blog Images
process:
fid: fid
filename: filename
uri:
plugin: file_uri
source:
- filepath
- file_directory_path
- temp_directory_path
- is_public
filemime: filemime
filesize: filesize
status: status
changed: timestamp
uid: uid
source:
plugin: client_migration_blog_featured_image
destination:
plugin: entity:file
source_path_property: filepath
urlencode: true
source_base_path: /sites/default/files/blog--featured-image
migration_dependencies: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment