You are here

function hosting_schema in Hosting 7.3

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

Implements hook_schema().

File

./hosting.install, line 33
Define database schemas and update functions 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;
}