function hosting_client_schema in Hosting 6.2
Same name and namespace in other branches
- 7.4 client/hosting_client.install \hosting_client_schema()
- 7.3 client/hosting_client.install \hosting_client_schema()
Implementation of hook_schema().
File
- client/
hosting_client.install, line 10 - Install, update and uninstall for the clients module.
Code
function hosting_client_schema() {
$schema['hosting_client'] = array(
'fields' => array(
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'uname' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Machine-usable name of this client (without shell metacharacters, usable for UNIX groups)',
),
),
'primary key' => array(
'vid',
),
'unique keys' => array(
'uname_unq' => array(
'uname',
),
),
);
$schema['hosting_client_user'] = array(
'fields' => array(
'user' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'client' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'contact_type' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'user',
'client',
),
);
$schema['hosting_platform_client_access'] = array(
'fields' => array(
'pid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
);
return $schema;
}