function lineage_schema in Taxonomy Lineage 6
Same name and namespace in other branches
- 7 lineage.install \lineage_schema()
Implementation of hook_schema().
File
- ./lineage.install, line 11 
- Install, update, and uninstall functions for the Taxonomy Lineage module.
Code
function lineage_schema() {
  $schema['term_lineage'] = array(
    'fields' => array(
      'tid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'lineage' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'depth' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'lineage' => array(
        'lineage',
      ),
    ),
    'primary key' => array(
      'tid',
    ),
  );
  return $schema;
}