aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muamba.install21
1 files changed, 13 insertions, 8 deletions
diff --git a/muamba.install b/muamba.install
index 14debbe..6e68603 100644
--- a/muamba.install
+++ b/muamba.install
@@ -12,25 +12,30 @@ function muamba_schema() {
$schema['muamba'] = array(
'description' => 'The base table for muamba assets.',
'fields' => array(
- 'uid' => array(
- 'description' => t('The {user}.uid requesting an item.'),
+ 'nid' => array(
+ 'description' => t('The {node}.nid of the borrowed item.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
- 'nid' => array(
- 'description' => t('The {node}.nid of the borrowed item.'),
+ 'uid' => array(
+ 'description' => t('The {user}.uid requesting an item.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
- 'primary key' => array('uid', 'nid'),
- 'indexes' => array(
- 'nid' => array('nid'),
- 'uid' => array('uid'),
+ 'foreign keys' => array(
+ 'node' => array(
+ 'table' => 'node',
+ 'columns' => array('nid' => 'nid'),
+ ),
+ 'requester' => array(
+ 'table' => 'users',
+ 'columns' => array('uid' => 'uid'),
+ ),
),
);