You are here

function mobile_number_schema in Mobile Number 7

Same name and namespace in other branches
  1. 8 mobile_number.install \mobile_number_schema()
  2. 2.0.x mobile_number.install \mobile_number_schema()

Implements hook_schema().

File

./mobile_number.install, line 54
Install, update and uninstall functions for the systementity_configfield module.

Code

function mobile_number_schema() {
  $schema['mobile_number_verification'] = array(
    'description' => 'A table for storing verification codes for mobile numbers.',
    'fields' => array(
      'token' => array(
        'description' => 'Verification token.',
        'type' => 'varchar',
        'length' => 43,
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'description' => 'The time when the verification token was created.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'verification_code' => array(
        'description' => 'Hash of the code sent to the user.',
        'type' => 'varchar',
        'length' => 40,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'token_created' => array(
        'timestamp',
      ),
    ),
    'primary key' => array(
      'token',
    ),
  );
  return $schema;
}