function sms_user_schema in SMS Framework 7
Same name and namespace in other branches
- 6.2 modules/sms_user/sms_user.install \sms_user_schema()
- 6 modules/sms_user/sms_user.install \sms_user_schema()
Implements hook_schema().
File
- modules/
sms_user/ sms_user.install, line 50 - Install, update and uninstall functions for the sms_user module.
Code
function sms_user_schema() {
$schema['sms_user'] = array(
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'number' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => 32,
),
'status' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'code' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => 16,
'default' => '',
),
'gateway' => array(
'type' => 'text',
'serialize' => TRUE,
),
'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,
),
// Additional sms_user_opt_out field.
'sms_user_opt_out' => array(
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'default' => 0,
'not null' => TRUE,
),
),
'primary key' => array(
'number',
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
return $schema;
}