View source
<?php
function sms_user_install() {
drupal_install_schema('sms_user');
}
function sms_user_schema() {
$schema['sms_user'] = array(
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'delta' => 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' => TRUE,
'length' => 16,
),
'gateway' => array(
'type' => 'text',
),
),
'primary key' => array(
'uid',
'delta',
),
'unique key' => array(
'number',
),
);
return $schema;
}
function sms_user_uninstall() {
drupal_uninstall_schema('sms_user');
}