You are here

function search_api_autocomplete_update_7103 in Search API Autocomplete 7

Add the {search_api_autocomplete_search}.suggester_id column.

File

./search_api_autocomplete.install, line 175
Install, update and uninstall functions for the Search API autocomplete module.

Code

function search_api_autocomplete_update_7103() {

  // Set "server" as the suggester for all existing searches, then remove the
  // default again from the schema.
  $spec = array(
    'description' => 'The plugin ID of the suggester this search should use.',
    'type' => 'varchar',
    'length' => 50,
    'not null' => TRUE,
    'default' => 'server',
  );
  db_add_field('search_api_autocomplete_search', 'suggester_id', $spec);
  unset($spec['default']);
  db_change_field('search_api_autocomplete_search', 'suggester_id', 'suggester_id', $spec);
}