function clients_schema in Web Service Clients 6.2
Same name and namespace in other branches
- 6 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 33 - 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',
// CTools exportables support:
'export' => array(
'key' => 'name',
'key name' => 'Name',
'primary key' => 'cid',
'identifier' => 'connection',
// Exports will be as $myobj
'default hook' => 'clients_default_connections',
// Function hook name.
'export type string' => 'export_type_label',
'object factory' => 'clients_connection_unpack_object',
'export callback' => 'clients_export_object',
'api' => array(
'owner' => 'clients',
'api' => 'clients',
// Base name for api include files.
'minimum_version' => 3,
'current_version' => 3,
),
),
'fields' => array(
'cid' => array(
'description' => 'The primary identifier for a service connection.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'no export' => TRUE,
),
'name' => array(
'description' => 'Connection name, must be unique',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
'type' => array(
'description' => 'Connection type',
'type' => 'varchar',
'length' => 64,
),
'endpoint' => array(
'description' => 'Connection endpoint',
'type' => 'varchar',
'length' => 256,
),
'configuration' => array(
'description' => 'Connection configuration - serialized',
'serialize' => TRUE,
'size' => 'big',
'type' => 'text',
),
),
'unique keys' => array(
'name' => array(
'name',
),
),
'primary key' => array(
'cid',
),
);
return $schema;
}