You are here

function ulogin_schema in uLogin (advanced version) 6

Same name and namespace in other branches
  1. 8 ulogin.install \ulogin_schema()
  2. 7 ulogin.install \ulogin_schema()

Implements hook_schema().

File

./ulogin.install, line 37

Code

function ulogin_schema() {
  $schema = array();
  $schema['ulogin_identity'] = array(
    'description' => 'Holds identities from uLogin service.',
    'fields' => array(
      'id' => array(
        'description' => 'Unique id of uLogin identity.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'The {users}.uid that owns this uLogin identity.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'network' => array(
        'description' => 'The authentication provider for this uLogin identity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'ulogin_uid' => array(
        'description' => 'The uLogin uid for this uLogin identity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'description' => 'A serialized array containing information from uLogin service.',
        'type' => 'blob',
        'not null' => TRUE,
        'size' => 'normal',
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
    'unique keys' => array(
      'network_ulogin_uid' => array(
        'network',
        'ulogin_uid',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}