summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-08-22 13:55:53 +0000
committerDries Buytaert <dries@buytaert.net>2010-08-22 13:55:53 +0000
commitdb5368027e7b38a274e17bf002f543a0ffbbd7ae (patch)
tree95d6bbe06b2a58ddbad9e345523f4da2e6dfbe68 /modules/taxonomy/taxonomy.install
parent39d6704418f4a072f7157a524d4742a6c4e4f593 (diff)
downloadbrdo-db5368027e7b38a274e17bf002f543a0ffbbd7ae.tar.gz
brdo-db5368027e7b38a274e17bf002f543a0ffbbd7ae.tar.bz2
- Patch #880132 by bojanz: hook_schema() doesn't support compound foreign keys; inconsistent implementations in core.
Diffstat (limited to 'modules/taxonomy/taxonomy.install')
-rw-r--r--modules/taxonomy/taxonomy.install30
1 files changed, 24 insertions, 6 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index 35fbca2c9..cc2512206 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -66,7 +66,10 @@ function taxonomy_schema() {
),
'primary key' => array('tid'),
'foreign keys' => array(
- 'vid' => array('taxonomy_vocabulary' => 'vid'),
+ 'vocabulary' => array(
+ 'table' => 'taxonomy_vocabulary',
+ 'columns' => array('vid' => 'vid'),
+ ),
),
'indexes' => array(
'taxonomy_tree' => array('vid', 'weight', 'name'),
@@ -97,7 +100,10 @@ function taxonomy_schema() {
'parent' => array('parent'),
),
'foreign keys' => array(
- 'tid' => array('taxonomy_term_data' => 'tid'),
+ 'taxonomy_term_data' => array(
+ 'table' => 'taxonomy_term_data',
+ 'columns' => array('tid' => 'tid'),
+ ),
),
'primary key' => array('tid', 'parent'),
);
@@ -201,8 +207,14 @@ function taxonomy_schema() {
'nid' => array('nid'),
),
'foreign keys' => array(
- 'node' => 'nid',
- 'taxonomy_term_data' => 'tid',
+ 'tracked_node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
+ 'term' => array(
+ 'table' => 'taxonomy_term_data',
+ 'columns' => array('tid' => 'tid'),
+ ),
),
);
@@ -328,8 +340,14 @@ function taxonomy_update_7004() {
'nid' => array('nid'),
),
'foreign keys' => array(
- 'node' => 'nid',
- 'taxonomy_term_data' => 'tid',
+ 'tracked_node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
+ 'term' => array(
+ 'table' => 'taxonomy_term_data',
+ 'columns' => array('tid' => 'tid'),
+ ),
),
);
db_create_table('taxonomy_index', $taxonomy_index);