You are here

function tfa_schema in Two-factor Authentication (TFA) 6

Same name and namespace in other branches
  1. 7 tfa.install \tfa_schema()

Implementation of hook_schema().

File

./tfa.install, line 17

Code

function tfa_schema() {
  $schema['tfa'] = array(
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Primary Key: {users}.uid for user.',
      ),
      'code' => array(
        'type' => 'varchar',
        'length' => 160,
        'not null' => TRUE,
        'default' => '',
      ),
      'accepted' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
      'created' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'uid',
    ),
    'indexes' => array(
      'code' => array(
        'code',
      ),
    ),
  );
  return $schema;
}