migrate_plus.migration.d6_edlp_sons.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. id: d6_edlp_sons
  2. label: Edlp Drupal 6 sons
  3. migration_tags:
  4. - Drupal 6
  5. deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
  6. migration_group: d6_edlp
  7. source:
  8. plugin: d6_edlp_sons
  9. node_type: son
  10. process:
  11. # In D6, nodes always have a tnid, but it's zero for untranslated nodes.
  12. # We normalize it to equal the nid in that case.
  13. # @see \Drupal\node\Plugin\migrate\source\d6\Node::prepareRow().
  14. # If you are using this file to build a custom migration consider removing
  15. # the nid and vid fields to allow incremental migrations.
  16. # nid: tnid
  17. # vid: vid
  18. type:
  19. plugin: default_value
  20. default_value: autre_son
  21. langcode:
  22. plugin: default_value
  23. source: language
  24. default_value: "und"
  25. title:
  26. -
  27. plugin: get
  28. source: title
  29. -
  30. plugin: skip_on_empty
  31. method: row
  32. uid:
  33. -
  34. plugin: migration_lookup
  35. migration: d6_edlp_users
  36. source: node_uid
  37. -
  38. plugin: default_value
  39. default_value: 1
  40. # status: status
  41. created: created
  42. changed: changed
  43. promote: promote
  44. sticky: sticky
  45. revision_uid: revision_uid
  46. revision_log: log
  47. revision_timestamp: timestamp
  48. # body
  49. 'body/value': body
  50. 'body/format':
  51. plugin: default_value
  52. default_value: wysiwyg
  53. # field_genre -> field_genres
  54. field_genres:
  55. plugin: migration_lookup
  56. migration: d6_edlp_genres
  57. source: genres
  58. # field_artiste: field_locuteurs
  59. # text -> entity ref terms
  60. # instead of entity_generate, i create the term in prepareRow from plugin
  61. field_locuteurs: locuteurs
  62. # field_compositeur: field_collectionneurs
  63. # text -> entity ref terms
  64. # instead of entity_generate, i create the term in prepareRow from plugin
  65. field_collectionneurs: collectionneurs
  66. # # file
  67. # # field_mp3 -> field_son
  68. field_son:
  69. plugin: migration_lookup
  70. migration: d6_edlp_allfiles
  71. source: sons_fid
  72. # workflow
  73. status:
  74. plugin: static_map
  75. source: workflow
  76. map:
  77. 1: 0
  78. 2: 0
  79. 3: 1
  80. 4: 1
  81. destination:
  82. plugin: entity:node
  83. migration_dependencies:
  84. required:
  85. - d6_edlp_users
  86. - d6_edlp_entrees
  87. - d6_edlp_genres
  88. - d6_edlp_langues
  89. - d6_edlp_allfiles