summaryrefslogtreecommitdiff
path: root/modules/forum
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/forum
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/forum')
-rw-r--r--modules/forum/forum.install33
1 files changed, 27 insertions, 6 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index 205430dd1..9a1ae18f6 100644
--- a/modules/forum/forum.install
+++ b/modules/forum/forum.install
@@ -153,8 +153,13 @@ function forum_schema() {
),
'primary key' => array('vid'),
'foreign keys' => array(
- 'nid' => array('node' => 'nid'),
- 'vid' => array('node' => 'vid'),
+ 'forum_node' => array(
+ 'table' => 'node',
+ 'columns' => array(
+ 'nid' => 'nid',
+ 'vid' => 'vid',
+ ),
+ ),
),
);
@@ -214,8 +219,16 @@ function forum_schema() {
'forum_topics' => array('tid', 'sticky', 'last_comment_timestamp'),
),
'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',
+ ),
+ ),
),
);
@@ -291,8 +304,16 @@ function forum_update_7001() {
'forum_topics' => array('tid', 'sticky', 'last_comment_timestamp'),
),
'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('forum_index', $forum_index);