summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.install')
-rw-r--r--modules/taxonomy/taxonomy.install27
1 files changed, 19 insertions, 8 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index d1e2c249f..18ee82e1f 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -43,7 +43,10 @@ function taxonomy_schema() {
),
),
'primary key' => array('tid'),
- 'indexes' => array('vid' => array('vid')),
+ 'unique keys' => array(
+ 'vid_name' => array('vid', 'name'),
+ ),
+ 'indexes' => array('taxonomy_tree' => array('vid', 'weight', 'name')),
);
$schema['term_hierarchy'] = array(
@@ -66,7 +69,6 @@ function taxonomy_schema() {
),
'indexes' => array(
'parent' => array('parent'),
- 'tid' => array('tid'),
),
'primary key' => array('tid', 'parent'),
);
@@ -97,11 +99,10 @@ function taxonomy_schema() {
),
),
'indexes' => array(
- 'nid' => array('nid'),
'vid' => array('vid'),
- 'tid' => array('tid'),
+ 'nid' => array('nid'),
),
- 'primary key' => array('vid', 'tid', 'nid'),
+ 'primary key' => array('tid', 'vid'),
);
$schema['term_relation'] = array(
@@ -127,8 +128,10 @@ function taxonomy_schema() {
'description' => t('The {term_data}.tid of the second term in a relationship.'),
),
),
+ 'unique keys' => array(
+ 'tid1_tid2' => array('tid1', 'tid2'),
+ ),
'indexes' => array(
- 'tid1' => array('tid1'),
'tid2' => array('tid2'),
),
'primary key' => array('trid'),
@@ -157,8 +160,10 @@ function taxonomy_schema() {
'description' => t('The name of the synonym.'),
),
),
+ 'unique keys' => array(
+ 'name_tid' => array('name', 'tid'),
+ ),
'indexes' => array(
- 'name' => array(array('name', 3)),
'tid' => array('tid'),
),
'primary key' => array('tsid'),
@@ -249,6 +254,9 @@ function taxonomy_schema() {
),
),
'primary key' => array('vid'),
+ 'indexes' => array(
+ 'list' => array('weight', 'name'),
+ ),
);
$schema['vocabulary_node_types'] = array(
@@ -269,7 +277,10 @@ function taxonomy_schema() {
'description' => t('The {node}.type of the node type for which the vocabulary may be used.'),
),
),
- 'primary key' => array('vid', 'type'),
+ 'primary key' => array('type', 'vid'),
+ 'indexes' => array(
+ 'vid' => array('vid'),
+ ),
);
return $schema;