function search_api_grouping_schema in Search API Grouping 7.2
Implements hook_schema().
2 calls to search_api_grouping_schema()
- search_api_grouping_update_7000 in ./
search_api_grouping.install - Add new columns required for processing.
- search_api_grouping_update_7001 in ./
search_api_grouping.install - Ensure table indexes are set.
File
- ./
search_api_grouping.install, line 10 - Installation and update hooks for search_api_denormalized_entity.
Code
function search_api_grouping_schema() {
$schema['search_api_denormalized_entity'] = array(
'description' => 'Maintain a map from entities to their de-normalized meta entity keys',
'fields' => array(
'id' => array(
'description' => 'The primary identifier, search api needs a serial id',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'index_id' => array(
'description' => 'The search api index id',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'item_id' => array(
'description' => 'The id in the search index.',
'type' => 'varchar',
'length' => 256,
'not null' => TRUE,
'default' => '',
),
'entity_type' => array(
'description' => 'The entity type of this item.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'etid' => array(
'description' => 'The entity id of this item.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'Either a flag or a timestamp to indicate if or when the item was changed since it was last indexed.',
'type' => 'int',
'size' => 'big',
'not null' => TRUE,
'default' => 1,
),
'needs_processing' => array(
'description' => 'Defines that this item was already processed from the queue.',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'queued' => array(
'description' => 'Timestamp when the item was queued.',
'type' => 'int',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'item_id' => array(
array(
'item_id',
16,
),
),
'entity_type' => array(
'entity_type',
'etid',
),
'entity_type_2' => array(
'entity_type',
'etid',
'needs_processing',
'queued',
),
'entity_type_3' => array(
'entity_type',
),
),
'primary key' => array(
'id',
),
);
return $schema;
}