aboutsummaryrefslogtreecommitdiff
path: root/muamba.install
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-24 22:03:33 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-24 22:03:33 -0300
commitb69edbdb6464618a8e45a8e5e484a7e267794fd4 (patch)
tree64c821c5cc3477ed4e1596679f75e4227fc8e58b /muamba.install
parent065a0ae24bba01c813d661c7e3b0ac48b6e456c5 (diff)
downloadmuamba-b69edbdb6464618a8e45a8e5e484a7e267794fd4.tar.gz
muamba-b69edbdb6464618a8e45a8e5e484a7e267794fd4.tar.bz2
Coding muamba_get_transactions
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,
+ )
+ );
+}