You are here

function hosting_server_schema in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 server/hosting_server.install \hosting_server_schema()
  2. 7.3 server/hosting_server.install \hosting_server_schema()

Implementation of hook_schema().

File

server/hosting_server.install, line 6

Code

function hosting_server_schema() {
  $schema['hosting_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,
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  $schema['hosting_ip_addresses'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'ip_address' => array(
        'type' => 'text',
        'size' => 'small',
        'not null' => TRUE,
      ),
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
    ),
  );
  $schema['hosting_service'] = 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,
      ),
      'service' => array(
        'type' => 'text',
        'size' => 'small',
        'not null' => TRUE,
      ),
      'type' => array(
        'type' => 'text',
        'size' => 'small',
        'not null' => TRUE,
      ),
      'restart_cmd' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'port' => array(
        'type' => 'int',
        'default' => 0,
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
      'available' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'indexes' => array(
      'vid' => array(
        'vid',
      ),
    ),
  );
  return $schema;
}