function hosting_ssl_schema in Hosting 7.3
Same name and namespace in other branches
- 6.2 web_server/ssl/hosting_ssl.install \hosting_ssl_schema()
- 7.4 web_server/ssl/hosting_ssl.install \hosting_ssl_schema()
Implements hook_schema().
File
- web_server/
ssl/ hosting_ssl.install, line 11 - Define the database schema and uninstall function for the hosting_ssl module.
Code
function hosting_ssl_schema() {
$schema['hosting_ssl_server'] = 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,
),
'ssl_port' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'vid',
'nid',
),
);
$schema['hosting_ssl_cert'] = array(
'fields' => array(
'cid' => array(
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
),
'ssl_key' => array(
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'client' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'cid',
),
'indexes' => array(
'ssl_key' => array(
array(
'ssl_key',
50,
),
),
),
);
$schema['hosting_ssl_site'] = 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,
),
'ssl_enabled' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'ssl_key' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'vid',
'nid',
),
);
$schema['hosting_ssl_cert_ips'] = array(
'fields' => array(
// cert id
'cid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
// reference to the hosting_ip_addresses table
'ip_address' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'cid' => array(
'cid',
),
'ip_address' => array(
'ip_address',
),
),
);
return $schema;
}