function hosting_client_schema in Hosting 7.3
Same name and namespace in other branches
- 6.2 client/hosting_client.install \hosting_client_schema()
- 7.4 client/hosting_client.install \hosting_client_schema()
Implements hook_schema().
File
- client/
hosting_client.install, line 10 - Define database schema, install and update functions for the hosting_client 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;
}