You are here

nodehierarchy_menu.install in Node Hierarchy 7.4

Install file for nodehierarchy_menu module.

File

nodehierarchy_menu/nodehierarchy_menu.install
View source
<?php

/**
 * @file
 *   Install file for nodehierarchy_menu module.
 */

// Create the database table on install (MySQL only for now)

/**
 * Implements hook_install().
 */
function nodehierarchy_menu_install() {
}

/**
 * Implements hook_uninstall().
 */
function nodehierarchy_menu_uninstall() {
}

/**
 * Implements hook_schema().
 */
function nodehierarchy_menu_schema() {
  $schema['nodehierarchy_menu_links'] = array(
    'fields' => array(
      'mlid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => "The book page's {menu_links}.mlid.",
      ),
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {node}.nid whose parent is being defined.',
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
    ),
  );
  return $schema;
}