t('Stores sms messages'), 'fields' => array( 'mid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'size' => 'normal', 'description' => t('Message id'), ), 'direction' => array( 'type' => 'varchar', 'length' => '3', 'not null' => TRUE, 'description' => t('On or out for receiving or sending'), ), 'type' => array( 'type' => 'varchar', 'length' => '32', 'not null' => TRUE, 'description' => t('message type'), ), 'text' => array( 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'description' => t('message text of sms'), ), 'sender' => array( 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'description' => t('mobile number of sender'), ), 'recipient' => array( 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'description' => t('mobile number of recipient'), ), 'sms' => array( 'type' => 'text', 'size' => 'medium', 'not null' => TRUE, 'description' => t('serialized data of whole message'), 'serialize' => TRUE, ), 'timestamp' => array( 'type' => 'int', 'size' => 'normal', 'not null' => TRUE, 'description' => t('timestamp of message sent or received'), ), ), 'primary key' => array('mid'), 'indexes' => array( 'sender' => array('sender'), 'account' => array('recipient'), 'direction' => array('direction'), 'type' => array('type'), ), ); return $schema; }