X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fmigrations%2Fd7_comment_field_instance.yml;fp=web%2Fcore%2Fmodules%2Fcomment%2Fmigrations%2Fd7_comment_field_instance.yml;h=aa558e53e1881a84da3ceeba04a52b7b6cbedb8c;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/comment/migrations/d7_comment_field_instance.yml b/web/core/modules/comment/migrations/d7_comment_field_instance.yml new file mode 100644 index 000000000..aa558e53e --- /dev/null +++ b/web/core/modules/comment/migrations/d7_comment_field_instance.yml @@ -0,0 +1,71 @@ +id: d7_comment_field_instance +label: Comment field instance configuration +migration_tags: + - Drupal 7 + - Configuration +source: + plugin: d7_node_type + constants: + entity_type: node + label: Comments + required: true +process: + entity_type: 'constants/entity_type' + label: 'constants/label' + required: 'constants/required' + field_name: + - + plugin: migration_lookup + source: type + migration: d7_comment_type + - + plugin: skip_on_empty + method: row + bundle: type + 'default_value/0/status': + # We're using static_map instead of default_value otherwise if the source + # is 0, the default value of 1 would be used. + plugin: static_map + source: comment + map: + 0: 0 + 1: 1 + 2: 2 + default_value: 2 + 'settings/default_mode': + # We're using static_map instead of default_value otherwise if the source + # is 0, the default value of 1 would be used. + plugin: static_map + source: comment_default_mode + map: + 0: 0 + 1: 1 + default_value: 1 + 'settings/per_page': + plugin: default_value + source: comment_default_per_page + default_value: 50 + 'settings/anonymous': + plugin: default_value + source: comment_anonymous + default_value: 0 + 'settings/form_location': + plugin: default_value + source: comment_form_location + default_value: 0 + 'settings/preview': + # We're using static_map instead of default_value otherwise if the source + # is 0, the default value of 1 would be used. + plugin: static_map + source: comment_preview + map: + 0: 0 + 1: 1 + 2: 2 + default_value: 1 +destination: + plugin: entity:field_config +migration_dependencies: + required: + - d7_node_type + - d7_comment_field