Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danielmme/285d2819a939d0a5acdf5b5856a98287 to your computer and use it in GitHub Desktop.
Save danielmme/285d2819a939d0a5acdf5b5856a98287 to your computer and use it in GitHub Desktop.
Migrate config file
id: course_variation
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags:
- 'Drupal 7'
- Content
migration_group: drupal_7
label: 'Course nodes'
source:
plugin: course_variation
constants:
status: 1
promote: 1
sticky: 1
process:
title: title
field_course_date/value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: field_course_date/0/value
field_course_date/end_value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: field_course_date/0/value2
field_course_url: field_course_url/0/url
field_registration_deadline:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: field_late_registration_deadline/0/value
field_price: field_max_price/0/value
field_modality: field_course_modality
field_platform:
- plugin: sub_process
source: field_course_platform_term
process:
target_id:
plugin: migration_lookup
migration: pll_platform
source: target_id
no_stub: true
created: created
changed: timestamp
status: 'constants/status'
promote: 'constants/promote'
sticky: 'constants/sticky'
uid: uid
destination:
plugin: 'entity:node'
default_bundle: course_variation
migration_dependencies:
optional:
- d7_node
required:
- platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment