You are here

function filefield_update_6001 in FileField 6.2

Same name and namespace in other branches
  1. 6.3 filefield.install \filefield_update_6001()

File

./filefield.install, line 121

Code

function filefield_update_6001() {
  include_once drupal_get_path('module', 'content') . '/includes/content.admin.inc';

  // add data column to filefields.
  $fields = content_fields();
  foreach ($fields as $field) {
    if ($field['type'] != 'file') {
      continue;
    }
    $new_field = $field;
    $new_field['columns']['data'] = array(
      'type' => 'text',
    );
    content_alter_db($field, $new_field);
  }
}