Skip to content

Instantly share code, notes, and snippets.

@dinarcon
Last active May 17, 2020 00:43
Show Gist options
  • Save dinarcon/1b64ad61969848b92a3c7ce305dcd7ea to your computer and use it in GitHub Desktop.
Save dinarcon/1b64ad61969848b92a3c7ce305dcd7ea to your computer and use it in GitHub Desktop.
First Drupal migration example - https://understanddrupal.com/migrations
.
|-- core
|-- index.php
|-- modules
| `-- custom
| `-- ud_migrations
| `-- ud_migrations_first
| |-- migrations
| | `-- udm_first.yml
| `-- ud_migrations_first.info.yml
type: module
name: UD First Migration
description: 'Example of basic Drupal migration. Learn more at <a href="https://understanddrupal.com/migrations" title="Drupal Migrations">https://understanddrupal.com/migrations</a>.'
package: Understand Drupal
core: 8.x
dependencies:
- drupal:migrate
id: udm_first
label: 'UD First migration'
source:
plugin: embedded_data
data_rows:
-
unique_id: 1
creative_title: 'The versatility of Drupal fields'
engaging_content: 'Fields are Drupal''s atomic data storage mechanism...'
-
unique_id: 2
creative_title: 'What is a view in Drupal? How do they work?'
engaging_content: 'In Drupal, a view is a listing of information. It can a list of nodes, users, comments, taxonomy terms, files, etc...'
ids:
unique_id:
type: integer
process:
title: creative_title
body: engaging_content
destination:
plugin: 'entity:node'
default_bundle: page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment