function sms_track_update_7002 in SMS Framework 7
Add fields for the message Author's and Recipient's User IDs.
See drupal issue #2351575
File
- modules/
sms_track/ sms_track.install, line 126 - SMS Framework Message Tracking feature module: Install file.
Code
function sms_track_update_7002(&$sandbox) {
// Additional Author and Recipient fields.
$fields = array(
'author' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "Author's {users}.uid.",
'default' => 0,
),
'recipient' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "Recipient's {users}.uid.",
'default' => 0,
),
);
foreach ($fields as $key => $field) {
if (!db_field_exists('sms_track', $key)) {
db_add_field('sms_track', $key, $field);
}
}
}