summaryrefslogtreecommitdiff
path: root/modules/poll
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/poll
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/poll')
-rw-r--r--modules/poll/poll.install20
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/poll/poll.install b/modules/poll/poll.install
index 8fe8ef1b7..931fcfb61 100644
--- a/modules/poll/poll.install
+++ b/modules/poll/poll.install
@@ -36,7 +36,10 @@ function poll_schema() {
),
'primary key' => array('nid'),
'foreign keys' => array(
- 'nid' => array('node' => 'nid'),
+ 'poll_node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
),
);
@@ -82,7 +85,10 @@ function poll_schema() {
),
'primary key' => array('chid'),
'foreign keys' => array(
- 'nid' => array('node' => 'nid'),
+ 'choice_node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
),
);
@@ -124,8 +130,14 @@ function poll_schema() {
),
'primary key' => array('nid', 'uid', 'hostname'),
'foreign keys' => array(
- 'nid' => array('node' => 'nid'),
- 'uid' => array('users' => 'uid'),
+ 'poll_node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
+ 'voter' => array(
+ 'table' => 'users',
+ 'columns' => array('uid' => 'uid'),
+ ),
),
'indexes' => array(
'chid' => array('chid'),