You are here

function button_field_update_6100 in Button Field 6

Implementation of hook_update_N().

CCK Fields won't appear for views unless they have a database column associated with them.

File

./button_field.install, line 51
Notify CCK when this module is enabled, disabled, installed, and uninstalled so CCK can do any necessary preparation or cleanup.

Code

function button_field_update_6100() {
  $ret = array();
  $columns['value'] = array(
    'type' => 'varchar',
    'length' => '255',
    'not null' => TRUE,
    'sortable' => FALSE,
    'views' => TRUE,
  );
  $ret[] = update_sql('UPDATE {content_node_field} SET db_columns = ' . '\'' . serialize($columns) . '\' WHERE type = \'button_field\'');
  return $ret;
}