You are here

function gauth_login_schema in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_login/gauth_login.install \gauth_login_schema()

Implements hook_schema().

File

gauth_login/gauth_login.install, line 10
Install and uninstall functions for the Google Auth Login module.

Code

function gauth_login_schema() {
  $schema['gauth_login'] = array(
    'description' => 'Login using google enabled for end user.',
    'fields' => array(
      'google_id' => array(
        'description' => 'The user id of the user in google',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'The user id of the user',
        'type' => 'int',
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
    'foreign keys' => array(
      'google_account' => array(
        'table' => 'users',
        'columns' => array(
          'uid' => 'uid',
        ),
      ),
    ),
    'primary key' => array(
      'google_id',
    ),
  );
  return $schema;
}