function taxonomy_edge_schema in Taxonomy Edge 8
Same name and namespace in other branches
- 6 taxonomy_edge.install \taxonomy_edge_schema()
- 7.2 taxonomy_edge.install \taxonomy_edge_schema()
- 7 taxonomy_edge.install \taxonomy_edge_schema()
Implements hook_schema().
File
- ./
taxonomy_edge.install, line 34 - Installation file for Taxonomy Edge
Code
function taxonomy_edge_schema() {
$schema['taxonomy_term_edge'] = array(
'description' => 'Stores edge list for taxonomies.',
'fields' => array(
'eid' => array(
'description' => 'Edge ID',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'Vocabulary ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'tid' => array(
'description' => 'Term ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'parent' => array(
'description' => 'Parent Term ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'distance' => array(
'description' => 'Distance to parent (depth)',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'eid',
),
'indexes' => array(
'idx_update' => array(
'vid',
'distance',
'parent',
),
'idx_depth' => array(
'parent',
'distance',
'vid',
),
'idx_term' => array(
'tid',
'distance',
),
'idx_tree' => array(
'parent',
'vid',
'distance',
),
),
);
$schema['taxonomy_term_edge_order'] = array(
'description' => 'Sequencing table for sorting taxonomies.',
'fields' => array(
'oid' => array(
'description' => 'Order ID',
'type' => 'serial',
),
'vid' => array(
'description' => 'Vocabulary ID',
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'parent' => array(
'description' => 'Parent term ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'eid' => array(
'description' => 'Edge ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'oid',
),
'indexes' => array(
'idx_order' => array(
'vid',
'parent',
),
'idx_edge' => array(
'eid',
),
),
);
return $schema;
}