You are here

function tokenauth_schema in Token authentication 6.2

Same name and namespace in other branches
  1. 6 tokenauth.install \tokenauth_schema()
  2. 7 tokenauth.install \tokenauth_schema()

Implementation of hook_schema().

File

./tokenauth.install, line 11
Install, update, and uninstall functions for tokenauth.

Code

function tokenauth_schema() {
  $schema['tokenauth_tokens'] = array(
    'description' => 'Stores information about each user\'s token',
    'fields' => array(
      'uid' => array(
        'description' => 'The user\'s {users}.uid',
        'type' => 'int',
        'size' => 'normal',
        'not null' => TRUE,
      ),
      'token' => array(
        'description' => 'The user specific token',
        'type' => 'varchar',
        'length' => 50,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'token',
    ),
    'unique keys' => array(
      'uid_key' => array(
        'uid',
      ),
    ),
  );
  return $schema;
}