function panopoly_widgets_update_7007 in Panopoly Widgets 7
Implements hook_update_N().
Add an "alt" field for spotlight items.
File
- ./
panopoly_widgets.install, line 251 - An installation file for Panopoly Widgets
Code
function panopoly_widgets_update_7007(&$sandbox) {
$spec = array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
);
$data_table_name = 'field_data_field_basic_spotlight_items';
$revision_table_name = 'field_revision_field_basic_spotlight_items';
$field_name = 'field_basic_spotlight_items_alt';
if (!db_field_exists($data_table_name, $field_name)) {
db_add_field($data_table_name, $field_name, $spec);
}
if (!db_field_exists($revision_table_name, $field_name)) {
db_add_field($revision_table_name, $field_name, $spec);
}
}