You are here

function webform_update_7317 in Webform 7.3

Same name and namespace in other branches
  1. 7.4 webform.install \webform_update_7317()

Add an index for 'nid_sid' to webform_submissions.

File

./webform.install, line 737
Webform module install/schema hooks.

Code

function webform_update_7317() {

  // Even though we already have an index 'nid_uid_sid', adding the index for
  // 'nid_sid' saves us a tablesort on the node/x/webform-results page.
  if (!db_index_exists('webform_submissions', 'nid_sid')) {
    db_add_index('webform_submissions', 'nid_sid', array(
      'nid',
      'sid',
    ));
  }
}