You are here

function hosting_https_schema in Aegir HTTPS 7.3

Implements hook_schema().

2 calls to hosting_https_schema()
hosting_https_update_7001 in ./hosting_https.install
Add the client_authentication column with defaults to the database.
hosting_https_update_7002 in ./hosting_https.install
Add support for enabling client authentication only on a specific path.

File

./hosting_https.install, line 11
Define the database schema and uninstall function for the hosting_https module.

Code

function hosting_https_schema() {
  $schema['hosting_https_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,
      ),
      'https_port' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'vid',
      'nid',
    ),
  );
  $schema['hosting_https_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,
      ),
      'https_enabled' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'client_authentication' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'Whether client authentication is enabled (1) or not (0).',
      ),
      'client_authentication_path' => array(
        'description' => 'The client authentication path, if not global.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'vid',
      'nid',
    ),
  );
  return $schema;
}