webmaster@1: 'Stores term information.', webmaster@1: 'fields' => array( webmaster@1: 'tid' => array( webmaster@1: 'type' => 'serial', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, franck@19: 'description' => 'Primary Key: Unique term ID.', webmaster@1: ), webmaster@1: 'vid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'The {vocabulary}.vid of the vocabulary to which the term is assigned.', webmaster@1: ), webmaster@1: 'name' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'The term name.', webmaster@1: ), webmaster@1: 'description' => array( webmaster@1: 'type' => 'text', webmaster@1: 'not null' => FALSE, webmaster@1: 'size' => 'big', franck@19: 'description' => 'A description of the term.', webmaster@1: ), webmaster@1: 'weight' => array( webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'The weight of this term in relation to other terms.', webmaster@1: ), webmaster@1: ), webmaster@1: 'primary key' => array('tid'), webmaster@1: 'indexes' => array( webmaster@1: 'taxonomy_tree' => array('vid', 'weight', 'name'), webmaster@1: 'vid_name' => array('vid', 'name'), webmaster@1: ), webmaster@1: ); webmaster@1: webmaster@1: $schema['term_hierarchy'] = array( franck@19: 'description' => 'Stores the hierarchical relationship between terms.', webmaster@1: 'fields' => array( webmaster@1: 'tid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'Primary Key: The {term_data}.tid of the term.', webmaster@1: ), webmaster@1: 'parent' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => "Primary Key: The {term_data}.tid of the term's parent. 0 indicates no parent.", webmaster@1: ), webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'parent' => array('parent'), webmaster@1: ), webmaster@1: 'primary key' => array('tid', 'parent'), webmaster@1: ); webmaster@1: webmaster@1: $schema['term_node'] = array( franck@19: 'description' => 'Stores the relationship of terms to nodes.', webmaster@1: 'fields' => array( webmaster@1: 'nid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'Primary Key: The {node}.nid of the node.', webmaster@1: ), webmaster@1: 'vid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'Primary Key: The {node}.vid of the node.', webmaster@1: ), webmaster@1: 'tid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'Primary Key: The {term_data}.tid of a term assigned to the node.', webmaster@1: ), webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'vid' => array('vid'), webmaster@1: 'nid' => array('nid'), webmaster@1: ), webmaster@1: 'primary key' => array('tid', 'vid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['term_relation'] = array( franck@19: 'description' => 'Stores non-hierarchical relationships between terms.', webmaster@1: 'fields' => array( webmaster@1: 'trid' => array( webmaster@1: 'type' => 'serial', webmaster@1: 'not null' => TRUE, franck@19: 'description' => 'Primary Key: Unique term relation ID.', webmaster@1: ), webmaster@1: 'tid1' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'The {term_data}.tid of the first term in a relationship.', webmaster@1: ), webmaster@1: 'tid2' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'The {term_data}.tid of the second term in a relationship.', webmaster@1: ), webmaster@1: ), webmaster@1: 'unique keys' => array( webmaster@1: 'tid1_tid2' => array('tid1', 'tid2'), webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'tid2' => array('tid2'), webmaster@1: ), webmaster@1: 'primary key' => array('trid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['term_synonym'] = array( franck@19: 'description' => 'Stores term synonyms.', webmaster@1: 'fields' => array( webmaster@1: 'tsid' => array( webmaster@1: 'type' => 'serial', webmaster@1: 'not null' => TRUE, franck@19: 'description' => 'Primary Key: Unique term synonym ID.', webmaster@1: ), webmaster@1: 'tid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'The {term_data}.tid of the term.', webmaster@1: ), webmaster@1: 'name' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'The name of the synonym.', webmaster@1: ), webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'tid' => array('tid'), webmaster@1: 'name_tid' => array('name', 'tid'), webmaster@1: ), webmaster@1: 'primary key' => array('tsid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['vocabulary'] = array( franck@19: 'description' => 'Stores vocabulary information.', webmaster@1: 'fields' => array( webmaster@1: 'vid' => array( webmaster@1: 'type' => 'serial', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, franck@19: 'description' => 'Primary Key: Unique vocabulary ID.', webmaster@1: ), webmaster@1: 'name' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'Name of the vocabulary.', webmaster@1: ), webmaster@1: 'description' => array( webmaster@1: 'type' => 'text', webmaster@1: 'not null' => FALSE, webmaster@1: 'size' => 'big', franck@19: 'description' => 'Description of the vocabulary.', webmaster@1: ), webmaster@1: 'help' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'Help text to display for the vocabulary.', webmaster@1: ), webmaster@1: 'relations' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'Whether or not related terms are enabled within the vocabulary. (0 = disabled, 1 = enabled)', webmaster@1: ), webmaster@1: 'hierarchy' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)', webmaster@1: ), webmaster@1: 'multiple' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'Whether or not multiple terms from this vocabulary may be assigned to a node. (0 = disabled, 1 = enabled)', webmaster@1: ), webmaster@1: 'required' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'Whether or not terms are required for nodes using this vocabulary. (0 = disabled, 1 = enabled)', webmaster@1: ), webmaster@1: 'tags' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'Whether or not free tagging is enabled for the vocabulary. (0 = disabled, 1 = enabled)', webmaster@1: ), webmaster@1: 'module' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'The module which created the vocabulary.', webmaster@1: ), webmaster@1: 'weight' => array( webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny', franck@19: 'description' => 'The weight of the vocabulary in relation to other vocabularies.', webmaster@1: ), webmaster@1: ), webmaster@1: 'primary key' => array('vid'), webmaster@1: 'indexes' => array( webmaster@1: 'list' => array('weight', 'name'), webmaster@1: ), webmaster@1: ); webmaster@1: webmaster@1: $schema['vocabulary_node_types'] = array( franck@19: 'description' => 'Stores which node types vocabularies may be used with.', webmaster@1: 'fields' => array( webmaster@1: 'vid' => array( webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, franck@19: 'description' => 'Primary Key: the {vocabulary}.vid of the vocabulary.', webmaster@1: ), webmaster@1: 'type' => array( webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 32, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '', franck@19: 'description' => 'The {node}.type of the node type for which the vocabulary may be used.', webmaster@1: ), webmaster@1: ), webmaster@1: 'primary key' => array('type', 'vid'), webmaster@1: 'indexes' => array( webmaster@1: 'vid' => array('vid'), webmaster@1: ), webmaster@1: ); webmaster@1: webmaster@1: return $schema; webmaster@1: } webmaster@1: