aboutsummaryrefslogtreecommitdiff
path: root/muamba.install
diff options
context:
space:
mode:
Diffstat (limited to 'muamba.install')
-rw-r--r--muamba.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/muamba.install b/muamba.install
index 4d2ba42..a9404be 100644
--- a/muamba.install
+++ b/muamba.install
@@ -34,6 +34,15 @@ function muamba_schema() {
'not null' => TRUE,
'default' => 0,
),
+ // This assumes that the node won't have his author changed,
+ // which might be reasonable depending on the application.
+ 'owner' => array(
+ 'description' => t('The {user}.owner owner of an item.'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
'uid' => array(
'description' => t('The {user}.uid requesting an item.'),
'type' => 'int',
@@ -61,6 +70,10 @@ function muamba_schema() {
'table' => 'node',
'columns' => array('nid' => 'nid'),
),
+ 'owner' => array(
+ 'table' => 'users',
+ 'columns' => array('owner' => 'uid'),
+ ),
'requester' => array(
'table' => 'users',
'columns' => array('uid' => 'uid'),
@@ -135,3 +148,19 @@ function muamba_update_7001(&$sandbox) {
)
);
}
+
+
+/**
+ * Adds owner field.
+ */
+function muamba_update_7002(&$sandbox) {
+ db_add_field('muamba', 'owner',
+ array(
+ 'description' => t('The {user}.owner owner of an item.'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ )
+ );
+}