function clients_schema in Web Service Clients 6
Same name and namespace in other branches
- 6.2 clients.install \clients_schema()
- 7.3 clients.install \clients_schema()
- 7 clients.install \clients_schema()
- 7.2 clients.install \clients_schema()
Implementation of hook_schema
File
- ./
clients.install, line 34 - @author Django Beatty - adub Install, update and uninstall functions for the Clients module.
Code
function clients_schema() {
$schema['cache_clients'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['clients_connections'] = array(
'description' => 'Stores service connection configurations',
'fields' => array(
'cid' => array(
'description' => 'The primary identifier for a service connection.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'name' => array(
'description' => 'Connection name, must be unique',
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
),
'type' => array(
'description' => 'Connection type',
'type' => 'varchar',
'length' => 100,
),
'endpoint' => array(
'description' => 'Connection endpoint',
'type' => 'varchar',
'length' => 100,
),
'configuration' => array(
'description' => 'Connection configuration - serialized',
'serialize' => TRUE,
'size' => 'big',
'type' => 'text',
),
),
'unique keys' => array(
'name' => array(
'name',
),
),
'primary key' => array(
'cid',
),
);
$schema['clients_resources'] = array(
'description' => 'Stores service configurations - these are used as resources to clients',
'fields' => array(
'rid' => array(
'description' => 'The primary identifier for a resource.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'name' => array(
'description' => 'Resource name, must be unique',
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
),
'cid' => array(
'description' => 'Foreign key referencing {clients_connections}',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'configuration' => array(
'description' => 'Resource configuration - serialized',
'serialize' => TRUE,
'size' => 'big',
'type' => 'text',
),
),
'unique keys' => array(
'name' => array(
'name',
),
),
'primary key' => array(
'rid',
),
);
return $schema;
}