You are here

function groupmenu_schema in Group Menu 7

Implements hook_schema().

File

./groupmenu.install, line 10
Install, update and uninstall functions for the groupmenu module.

Code

function groupmenu_schema() {
  $schema = array();
  $schema['group_menu'] = array(
    'description' => 'Stores relationships between a Group and their custom menus.',
    'fields' => array(
      'menu_name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'gid' => array(
        'description' => "The group's unique ID.",
        'type' => 'int',
        'size' => 'normal',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'menu_name',
    ),
    'foreign keys' => array(
      'menu_custom' => array(
        'table' => 'menu_custom',
        'columns' => array(
          'menu_name' => 'menu_name',
        ),
      ),
    ),
  );
  return $schema;
}