function apachesolr_nan_schema in Apache Solr Not-A-Node 7.2
Same name and namespace in other branches
- 7 apachesolr_nan.install \apachesolr_nan_schema()
Implements hook_schema().
File
- ./
apachesolr_nan.install, line 11 - Defines tables for non-node search data and cleanup functions.
Code
function apachesolr_nan_schema() {
$schema['apachesolr_nan'] = array(
'description' => t('The base table for the NAN entity'),
'fields' => array(
'id' => array(
'description' => t('Primary key of the NAN entity'),
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'path' => array(
'description' => t('The path to index.'),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'description' => array(
'description' => t('The description to show users for search results.'),
'type' => 'text',
'not null' => FALSE,
),
'title' => array(
'description' => t('The title that will be added to the index.'),
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'frequency' => array(
'description' => t('The time between indexing in seconds.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'last_indexed' => array(
'description' => t('The unix timestamp of the last index run.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'unique keys' => array(
'path' => array(
'path',
),
),
);
return $schema;
}