function opening_hours_update_7000 in Opening hours 7
Implements hook_update_N().
File
- ./
opening_hours.install, line 112 - Database schema, installation and upgrade hooks for the opening hours module.
Code
function opening_hours_update_7000(&$sandbox) {
// Remove the old index, since we create a new one below.
// The new one also includes the category tid.
db_drop_index('opening_hours', 'nid_date');
db_add_field('opening_hours', 'category_tid', array(
'description' => 'The {taxonomy_term_data}.tid for the category selected for this instance, if any.',
'type' => 'int',
'unsigned' => TRUE,
), array(
'indexes' => array(
'nid_date_category_tid' => array(
'nid',
'date',
'category_tid',
),
),
));
}