You are here

function search_api_et_schema in Search API Entity Translation 7.2

Implements hook_schema().

File

./search_api_et.install, line 11
Install, update and uninstall functions for the Search API ET module.

Code

function search_api_et_schema() {
  $schema['search_api_et_item'] = array(
    'description' => 'Stores the items which should be indexed for each index, and their status.',
    'fields' => array(
      'item_id' => array(
        'description' => "The item's ID, with language prefix.",
        'type' => 'varchar',
        'length' => 53,
        'not null' => TRUE,
      ),
      'index_id' => array(
        'description' => 'The {search_api_index}.id this item belongs to.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      '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,
      ),
    ),
    'indexes' => array(
      'indexing' => array(
        'index_id',
        'changed',
      ),
    ),
    'primary key' => array(
      'item_id',
      'index_id',
    ),
  );
  return $schema;
}