function search_api_autocomplete_schema in Search API Autocomplete 7
Implements hook_schema().
File
- ./
search_api_autocomplete.install, line 11 - Install, update and uninstall functions for the Search API autocomplete module.
Code
function search_api_autocomplete_schema() {
$schema['search_api_autocomplete_search'] = array(
'description' => 'Stores autocomplete settings for searches on Search API indexes.',
'fields' => array(
'id' => array(
'description' => 'The primary identifier for a search.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'machine_name' => array(
'description' => 'A string identifier for a search.',
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
),
'name' => array(
'description' => 'A human-readable name for the search.',
'type' => 'varchar',
'length' => 50,
),
'index_id' => array(
'description' => 'The {search_api_index}.machine_name this search belongs to.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
),
'suggester_id' => array(
'description' => 'The plugin ID of the suggester this search should use.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
),
'type' => array(
'description' => 'The type of search, usually a module name.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
),
'enabled' => array(
'description' => 'A flag indicating whether autocompletion for this search is enabled.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'options' => array(
'description' => 'The options used to configure autocompletion for this search.',
'type' => 'text',
'serialize' => TRUE,
'not null' => TRUE,
),
'status' => array(
'description' => 'The exportable status of the entity.',
'type' => 'int',
'not null' => TRUE,
'default' => 0x1,
'size' => 'tiny',
),
'module' => array(
'description' => 'The name of the providing module if the entity has been defined in code.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'primary key' => array(
'id',
),
'unique keys' => array(
'machine_name' => array(
'machine_name',
),
),
'indexes' => array(
'enabled' => array(
'enabled',
),
),
);
return $schema;
}