You are here

function og_subgroups_schema in Subgroups for Organic groups 6

Implementation of hook_schema()

File

./og_subgroups.install, line 11
Installs and updates the necessary tables required by the OG Subgroups module.

Code

function og_subgroups_schema() {
  $schema['og_subgroups'] = array(
    'description' => t('Handles the hierarchy of og'),
    'fields' => array(
      'gid' => array(
        'description' => t('The ID for a group.'),
        'type' => 'int',
        'not null' => TRUE,
      ),
      'parent' => array(
        'description' => t('The gid of the parent group.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'gid',
      'parent',
    ),
  );
  return $schema;
}