Commit 574cdd21 authored by anarcat's avatar anarcat

add ip_address field to the certs table

this way we will be able to allocate IPs directly to certificates
parent 7a81a4b1
......@@ -50,6 +50,11 @@ function hosting_ssl_schema() {
'not null' => TRUE,
'default' => 0,
),
'ip_address' => array(
'type' => 'text',
'size' => 'small',
'not null' => TRUE,
),
),
'primary key' => array('cid'),
'indexes' => array('ssl_key' => array(array('ssl_key', 50)))
......@@ -97,3 +102,15 @@ function hosting_ssl_uninstall() {
db_query("DELETE FROM {hosting_service} WHERE service='http' and type='nginx_ssl'");
drupal_uninstall_schema('hosting_ssl');
}
/**
* Add SSL to IP address mapping in the frontend
*
* We need this mapping because allocation is in the frontend now and we need
* to make sure we track which certificate uses which IP on which server.
*/
function hosting_ssl_update_6200() {
$ret = array();
db_add_field($ret, 'hosting_ssl_cert', 'ip_address', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
return $ret;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment