function search_api_saved_searches_schema in Search API Saved Searches 8
Same name and namespace in other branches
- 7 search_api_saved_searches.install \search_api_saved_searches_schema()
Implements hook_schema().
File
- ./
search_api_saved_searches.install, line 11 - Install and update functions for the Search API Saved Searches module.
Code
function search_api_saved_searches_schema() {
$schema['search_api_saved_searches_old_results'] = [
'description' => 'Stores the known results for a search.',
'fields' => [
'search_id' => [
'description' => 'The ID of the saved search',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'search_type' => [
'description' => 'The ID of the saved search type',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
],
'item_id' => [
'description' => "The item ID of one of the search's results",
'type' => 'varchar',
'length' => 150,
'not null' => TRUE,
],
],
'indexes' => [
'search_type' => [
'search_type',
],
],
'primary key' => [
'search_id',
'item_id',
],
];
return $schema;
}