function ack_menu_schema in Access Control Kit 7
Implements hook_schema().
File
- ack_menu/
ack_menu.install, line 11 - Install, update, and uninstall functions for the ACK menu module.
Code
function ack_menu_schema() {
$schema['ack_menu_map'] = array(
'description' => 'Maps menu trees to access realms.',
'fields' => array(
'mlid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The {menu_links}.mlid that identifies the top link of the realm menu tree.',
),
'scheme' => array(
'type' => 'varchar',
'length' => 28,
'not null' => TRUE,
'default' => '',
'description' => 'The {access_scheme}.machine_name of the scheme that contains the realm.',
),
'realm' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The realm value.',
),
),
'primary key' => array(
'mlid',
'scheme',
),
'indexes' => array(
'realm' => array(
array(
'scheme',
4,
),
'realm',
),
),
'foreign keys' => array(
'menu_link' => array(
'table' => 'menu_links',
'columns' => array(
'mlid' => 'mlid',
),
),
'scheme_machine_name' => array(
'table' => 'access_scheme',
'columns' => array(
'scheme' => 'machine_name',
),
),
),
);
return $schema;
}