You are here

function workbench_email_update_7001 in Workbench Email 7

Same name and namespace in other branches
  1. 7.3 workbench_email.install \workbench_email_update_7001()

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 67
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',
    ),
  ));
}