X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Fmigrations%2Fd6_vocabulary_field.yml;fp=web%2Fcore%2Fmodules%2Ftaxonomy%2Fmigrations%2Fd6_vocabulary_field.yml;h=36974e159c7286f1400496eb0a39f130be4f84ef;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/taxonomy/migrations/d6_vocabulary_field.yml b/web/core/modules/taxonomy/migrations/d6_vocabulary_field.yml new file mode 100644 index 000000000..36974e159 --- /dev/null +++ b/web/core/modules/taxonomy/migrations/d6_vocabulary_field.yml @@ -0,0 +1,51 @@ +id: d6_vocabulary_field +label: Vocabulary field configuration +migration_tags: + - Drupal 6 + - Configuration +source: + plugin: d6_taxonomy_vocabulary + constants: + entity_type: node + type: entity_reference + target_entity_type: taxonomy_term + field_prefix: field_ +process: + entity_type: 'constants/entity_type' + type: 'constants/type' + # This value is only used in the 'field_name' process pipeline below. + raw_field_name: + - + plugin: migration_lookup + migration: d6_taxonomy_vocabulary + source: vid + - + plugin: skip_on_empty + method: row + field_name: + # Prepend field_ to avoid conflicts with base fields, and make sure the + # result is no longer than 32 characters. + - + plugin: concat + source: + - constants/field_prefix + - '@raw_field_name' + - + plugin: substr + length: 32 + - + # This plugin checks if the vocabulary being migrated is the one used by + # Forum. If so, we use the machine name that Forum expects. Otherwise, we + # leave it unchanged. + plugin: forum_vocabulary + machine_name: taxonomy_forums + 'settings/target_type': 'constants/target_entity_type' + cardinality: cardinality +destination: + plugin: entity:field_storage_config + dependencies: + module: + - entity_reference +migration_dependencies: + required: + - d6_taxonomy_vocabulary