function sms_user_update_7003 in SMS Framework 7
Add sleep_enabled, sleep_start_time, sleep_end_time fields to {sms_user} table.
File
- modules/
sms_user/ sms_user.install, line 151 - Install, update and uninstall functions for the sms_user module.
Code
function sms_user_update_7003() {
$spec = array(
'sleep_enabled' => array(
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'default' => 0,
'not null' => TRUE,
),
'sleep_start_time' => array(
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'default' => 0,
'not null' => FALSE,
),
'sleep_end_time' => array(
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'default' => 0,
'not null' => FALSE,
),
);
foreach ($spec as $key => $value) {
db_add_field('sms_user', $key, $value);
}
}