You are here

function nodesymlinks_schema in NodeSymlinks 6

Same name and namespace in other branches
  1. 7 nodesymlinks.install \nodesymlinks_schema()

Implementation of hook_schema

File

./nodesymlinks.install, line 47
Installation functions for NodeSymlinks.

Code

function nodesymlinks_schema() {
  $schema['nodesymlinks_link_storage'] = array(
    'description' => 'Permanent storage for nodesymlinks while it exists in installed apps. Since menu_links are not permanent, we need to have a backing store so they can be regenerated during module re-enable.',
    'fields' => array(
      'mlid' => array(
        'description' => 'The menu link ID (mlid) is the integer primary key.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'nid' => array(
        'description' => 'The original Node ID this link pointed to.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'item_data' => array(
        'description' => 'The serialized item data structure that was/should be passed to menu_link_save.',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
  );
  return $schema;
}