You are here

function hosting_ssl_schema in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 web_server/ssl/hosting_ssl.install \hosting_ssl_schema()
  2. 7.3 web_server/ssl/hosting_ssl.install \hosting_ssl_schema()

File

web_server/ssl/hosting_ssl.install, line 4

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;
}