You are here

function shurly_service_schema in ShURLy 6

Same name and namespace in other branches
  1. 8 shurly_service/shurly_service.install \shurly_service_schema()
  2. 7 shurly_service/shurly_service.install \shurly_service_schema()

Implement hook_schema().

File

shurly_service/shurly_service.install, line 6

Code

function shurly_service_schema() {
  $schema['shurly_keys'] = array(
    'description' => t('API keys for use with the Shurly module'),
    'fields' => array(
      'uid' => array(
        'description' => t('User ID'),
        'type' => 'int',
        'not null' => TRUE,
      ),
      'apikey' => array(
        'description' => t('API key for user'),
        'type' => 'varchar',
        'length' => '35',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'apikey',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
  );
  return $schema;
}