Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / comment / migrations / d6_comment.yml
diff --git a/web/core/modules/comment/migrations/d6_comment.yml b/web/core/modules/comment/migrations/d6_comment.yml
new file mode 100644 (file)
index 0000000..32978de
--- /dev/null
@@ -0,0 +1,54 @@
+id: d6_comment
+label: Comments
+audit: true
+migration_tags:
+  - Drupal 6
+  - Content
+source:
+  plugin: d6_comment
+  constants:
+    entity_type: node
+process:
+  # If you are using this file to build a custom migration consider removing
+  # the cid field to allow incremental migrations.
+  cid: cid
+  pid:
+    plugin: migration_lookup
+    migration: d6_comment
+    source: pid
+  entity_id: nid
+  entity_type: 'constants/entity_type'
+  comment_type:
+    -
+      plugin: migration_lookup
+      source: type
+      migration: d6_comment_type
+    -
+      plugin: skip_on_empty
+      method: row
+  field_name: '@comment_type'
+  subject: subject
+  uid: uid
+  name: name
+  mail: mail
+  homepage: homepage
+  hostname: hostname
+  created: timestamp
+  changed: timestamp
+  status: status #In D6, published=0. We reverse the value in prepareRow.
+  thread: thread
+  'comment_body/value': comment
+  'comment_body/format':
+    plugin: migration_lookup
+    migration: d6_filter_format
+    source: format
+destination:
+  plugin: entity:comment
+migration_dependencies:
+  required:
+    - d6_node
+    - d6_comment_type
+    - d6_comment_entity_display
+    - d6_comment_entity_form_display
+    - d6_user
+    - d6_filter_format