You are here

function gauth_user_schema in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_user/gauth_user.install \gauth_user_schema()

Implements hook_schema().

File

gauth_user/gauth_user.install, line 10
Install and uninstall functions for the Google Auth User module.

Code

function gauth_user_schema() {
  $schema['gauth_user_services'] = array(
    'description' => 'Google services enabled for end user.',
    'fields' => array(
      'id' => array(
        'description' => 'The service machine name.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The service name.  Will be visible to end user',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'developer_key' => array(
        'description' => 'The api key of the service.',
        'type' => 'varchar',
        'length' => 255,
        'default' => '',
      ),
      'client_id' => array(
        'description' => 'The Client Id of the service.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'client_secret' => array(
        'description' => 'The Client Secret Id of the service.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'services' => array(
        'description' => 'Services which will be enabled for this account.',
        'type' => 'text',
      ),
      'access_type' => array(
        'description' => 'Stores the access type of the account',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'offline',
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}