You are here

advanced_menu_menu_attributes.install in Advanced Menu 6.x

Same filename and directory in other branches
  1. 7 menu_attributes/advanced_menu_menu_attributes.install

File

menu_attributes/advanced_menu_menu_attributes.install
View source
<?php

// $Id: $

/**
 * Implementation of hook_install().
 */
function advanced_menu_menu_attributes_install() {

  // Create tables.
  drupal_install_schema('advanced_menu_menu_attributes');
}

/**
 * Implementation of hook_uninstall().
 */
function advanced_menu_menu_attributes_uninstall() {

  // Remove tables.
  drupal_uninstall_schema('advanced_menu_menu_attributes');
  menu_rebuild();
}

/**
 * Implementation of hook_schema().
 */
function advanced_menu_menu_attributes_schema() {
  $schema['advanced_menu_menu_attributes_expire'] = array(
    'description' => t('Holds Expiration data for menus'),
    'fields' => array(
      'mlid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The {menu_links}.mlid to which the expiration date is assigned.'),
      ),
      'expire' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The expiration datetime for the given mlid.'),
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
  );
  return $schema;
}