function workbench_email_update_7001 in Workbench Email 7.3
Same name and namespace in other branches
- 7 workbench_email.install \workbench_email_update_7001()
Implements hook_update_N().
Removes string indexes from the 'workbench_emails' and 'workbench_email_transitions' tables. Also adds the 'rid' index to the 'workbench_email_transitions' table.
File
- ./
workbench_email.install, line 143 - Install file for the Workbench Email module.
Code
function workbench_email_update_7001() {
// Remove the transition index from the 'workbench_emails' table.
db_drop_index('workbench_emails', 'transition');
// Remove the set index from the 'workbench_emails' table.
db_drop_index('workbench_emails', 'set');
// Remove old primary key on 'workbench_emails' table.
db_drop_primary_key('workbench_emails');
// Add the wid field to the 'workbench_emails' table.
$field_definition = array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'An auto increment id',
);
db_add_field('workbench_emails', 'wid', $field_definition, array(
'primary key' => array(
'wid',
),
));
}