function og_menu_schema in Organic Groups Menu (OG Menu) 7.3
Same name and namespace in other branches
- 6.2 og_menu.install \og_menu_schema()
- 6 og_menu.install \og_menu_schema()
- 7.2 og_menu.install \og_menu_schema()
Implements hook_schema().
File
- ./
og_menu.install, line 10 - Install, update and uninstall functions for the og_menu module.
Code
function og_menu_schema() {
$schema = array();
$schema['og_menu'] = array(
'description' => 'Stores relationships between organic groups 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,
),
'group_type' => array(
'description' => "The group's entity type (e.g., node, comment, etc').",
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
'default' => '',
),
'weight' => array(
'description' => "The menu weight for each group menu.",
'type' => 'int',
'length' => '11',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'menu_name',
),
'indexes' => array(
'gid_group_type_weight' => array(
'gid',
'group_type',
'weight',
),
),
'foreign keys' => array(
'menu_custom' => array(
'table' => 'menu_custom',
'columns' => array(
'menu_name' => 'menu_name',
),
),
),
);
return $schema;
}