function hashtags_schema in Hashtags 7
Implementation of hook_schema().
File
- ./
hashtags.install, line 74 - Install, update and uninstall functions for the hashtags module.
Code
function hashtags_schema() {
$schema['hashtags_index'] = array(
'description' => 'Stores relation between nodes (entites), terms and comments of the nodes',
'fields' => array(
'tid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The tid of hashtag',
),
'entity_id' => array(
'description' => 'The id of entity (node) that contains Hashtags field',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'type' => array(
'description' => 'The entity bundle.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'comment_id' => array(
'description' => 'Sum of same hashtags that are used for current entity
and its comments',
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'default' => NULL,
),
),
'indexes' => array(
'entity_tid' => array(
'entity_id',
'type',
'tid',
),
'entity_id' => array(
'entity_id',
),
'comment_id' => array(
'comment_id',
),
),
);
return $schema;
}