You are here

function hosting_schema in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 hosting.install \hosting_schema()
  2. 7.3 hosting.install \hosting_schema()

Implements hook_schema().

File

./hosting.install, line 20
Install, update and uninstall for the hosting module.

Code

function hosting_schema() {
  $schema['hosting_context'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => HOSTING_MAX_ALIAS_LENGTH,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}