You are here

function search_autocomplete_update_7300 in Search Autocomplete 7.3

Get ready for Search Autocomplete 7.3-x

File

./search_autocomplete.install, line 223
This file is used to install/update/delete the module tables in database

Code

function search_autocomplete_update_7300(&$sandbox) {
  $ret = array();
  $num_deleted = db_drop_table('search_autocomplete_forms');
  $num_deleted &= db_drop_table('search_autocomplete_suggestions');
  db_create_table('search_autocomplete_forms', drupal_get_schema('search_autocomplete_forms', TRUE));
  search_autocomplete_install();
  return t('The update process is successfull.');

  // In case of an error, simply throw an exception with an error message.
  throw new DrupalUpdateException('Something went wrong. Please uninstall and install the module again.');
  return $ret;
}