You are here

function twilio_schema in Twilio 7

Implements hook_schema().

1 call to twilio_schema()
twilio_update_7000 in ./twilio.install
Create new database table {twilio_twiml}.

File

./twilio.install, line 33
Install and uninstall functions for the twilio module.

Code

function twilio_schema() {
  $schema['twilio_user'] = array(
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'number' => array(
        'type' => 'varchar',
        'not null' => TRUE,
        'length' => 32,
      ),
      'country' => array(
        'type' => 'varchar',
        'not null' => TRUE,
        'length' => 32,
        'default' => '1',
      ),
      'status' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'code' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 16,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'number',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
  );
  return $schema;
}