You are here

function patch_manager_update_7100 in Patch manager 7

Adding field_patch_notes field into database storage.

File

./patch_manager.install, line 278
Install, update and uninstall functions for the Patch manager module.

Code

function patch_manager_update_7100(&$sandbox) {
  $fields_info = field_info_fields();
  if (!isset($fields_info['field_patch_notes'])) {
    $fields = patch_manager_field_info();
    field_create_field($fields['field_patch_notes']);
  }
  $instances_info = field_info_instances('node', 'patch');
  if (!isset($instances_info['field_patch_notes'])) {
    $instances = patch_manager_instance_info();
    field_create_instance($instances['field_patch_notes']);
  }
}