You are here

function webform_update_5 in Webform 5

Same name and namespace in other branches
  1. 5.2 webform.install \webform_update_5()
  2. 6.2 webform.install \webform_update_5()

File

./webform.install, line 236

Code

function webform_update_5() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query('LOCK TABLES {sequences} WRITE');
      $ret[] = update_sql(sprintf("UPDATE {sequences} SET name = '%s' WHERE name = '%s'", db_prefix_tables('{webform_submissions}_sid'), db_prefix_tables('{webform_submissions}_id')));
      db_query('UNLOCK TABLES');
      break;
  }
  return $ret;
}