From b69edbdb6464618a8e45a8e5e484a7e267794fd4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 24 Sep 2011 22:03:33 -0300 Subject: Coding muamba_get_transactions --- muamba.install | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'muamba.install') 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, + ) + ); +} -- cgit v1.2.3