diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-08-22 13:55:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-08-22 13:55:53 +0000 |
commit | db5368027e7b38a274e17bf002f543a0ffbbd7ae (patch) | |
tree | 95d6bbe06b2a58ddbad9e345523f4da2e6dfbe68 /modules/node/node.install | |
parent | 39d6704418f4a072f7157a524d4742a6c4e4f593 (diff) | |
download | brdo-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/node/node.install')
-rw-r--r-- | modules/node/node.install | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/modules/node/node.install b/modules/node/node.install index cc3d8ee97..81ad93b3e 100644 --- a/modules/node/node.install +++ b/modules/node/node.install @@ -118,8 +118,14 @@ function node_schema() { 'vid' => array('vid'), ), 'foreign keys' => array( - 'vid' => array('node_revision' => 'vid'), - 'uid' => array('users' => 'uid'), + 'node_revision' => array( + 'table' => 'node_revision', + 'columns' => array('vid' => 'vid'), + ), + 'node_author' => array( + 'table' => 'users', + 'columns' => array('uid' => 'uid'), + ), ), 'primary key' => array('nid'), ); @@ -174,7 +180,12 @@ function node_schema() { ), ), 'primary key' => array('nid', 'gid', 'realm'), - 'foreign keys' => array('node' => 'nid'), + 'foreign keys' => array( + 'affected_node' => array( + 'table' => 'node', + 'columns' => array('nid' => 'nid'), + ), + ), ); $schema['node_revision'] = array( @@ -249,8 +260,14 @@ function node_schema() { ), 'primary key' => array('vid'), 'foreign keys' => array( - 'node' => 'nid', - 'users' => 'uid' + 'versioned_node' => array( + 'table' => 'node', + 'columns' => array('nid' => 'nid'), + ), + 'version_author' => array( + 'table' => 'users', + 'columns' => array('uid' => 'uid'), + ), ), ); |