function taxonomy_revision_schema in Taxonomy revision 7
Implements hook_schema().
1 call to taxonomy_revision_schema()
- taxonomy_revision_entity_info_alter in ./
taxonomy_revision.module - Implements hook_entity_info_alter().
File
- ./
taxonomy_revision.install, line 11 - Install, update and uninstall functions for the taxonomy revision module.
Code
function taxonomy_revision_schema() {
$schema = array();
$schema['taxonomy_term_data_revision'] = array(
'description' => 'Stores term information.',
'fields' => array(
'tid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Unique term ID.',
),
'revision_id' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary key: The revision id for the taxonomy terms.',
),
'log' => array(
'description' => 'The log entry explaining the changes in this version.',
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
),
'timestamp' => array(
'description' => 'A Unix timestamp indicating when this version was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'User id storing the user who created the revision.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The {taxonomy_vocabulary}.vid of the vocabulary to which the term is assigned.',
),
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The term name.',
'translatable' => TRUE,
),
'description' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'description' => 'A description of the term.',
'translatable' => TRUE,
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'The {filter_format}.format of the description.',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'The weight of this term in relation to other terms.',
),
),
'primary key' => array(
'revision_id',
),
'foreign keys' => array(
'vocabulary' => array(
'table' => 'taxonomy_vocabulary',
'columns' => array(
'vid' => 'vid',
),
),
'taxonomy_term_data' => array(
'table' => 'taxonomy_term_data',
'columns' => array(
'tid' => 'tid',
),
),
),
'indexes' => array(
'taxonomy_tree' => array(
'vid',
'weight',
'name',
),
'vid_name' => array(
'vid',
'name',
),
'name' => array(
'name',
),
),
);
return $schema;
}