You are here

function menu_node_schema in Menu Node API 7

Same name and namespace in other branches
  1. 6 menu_node.install \menu_node_schema()

Implements hook_schema().

File

./menu_node.install, line 12
Install file for Menu Node API.

Code

function menu_node_schema() {
  $schema['menu_node'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'mlid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
    ),
    'foreign_keys' => array(
      'nid' => array(
        'node' => 'nid',
      ),
      'mlid' => array(
        'menu_links' => 'mlid',
      ),
    ),
  );
  return $schema;
}