function nodehierarchy_schema in Node Hierarchy 7.4
Same name and namespace in other branches
- 6.3 nodehierarchy.install \nodehierarchy_schema()
- 6 nodehierarchy.install \nodehierarchy_schema()
- 6.2 nodehierarchy.install \nodehierarchy_schema()
- 7.2 nodehierarchy.install \nodehierarchy_schema()
Implements hook_schema().
2 calls to nodehierarchy_schema()
- nodehierarchy_update_6200 in ./
nodehierarchy.install - Update from the 5.x or 6.x-1.x branches.
- nodehierarchy_update_7400 in ./
nodehierarchy.install - Add the new table for Node Hierarchy.
File
- ./
nodehierarchy.install, line 33 - Install file for nodehierarchy module.
Code
function nodehierarchy_schema() {
$schema['nodehierarchy'] = array(
'description' => 'The hierarchical structure of the nodes.',
'fields' => array(
'nhid' => array(
'description' => 'A unique identifier for this relationship.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pnid' => array(
'description' => 'The {node}.nid of the parent.',
'type' => 'int',
'not null' => FALSE,
),
'cnid' => array(
'description' => 'The {node}.nid whose parent is being defined.',
'type' => 'int',
'not null' => FALSE,
),
'pweight' => array(
'description' => 'The weight of the parent.',
'type' => 'int',
'not null' => FALSE,
),
'cweight' => array(
'description' => 'The weight of the child.',
'type' => 'int',
'not null' => FALSE,
),
'mlid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => "The node's {menu_links}.mlid if any.",
),
),
'primary key' => array(
'nhid',
),
);
return $schema;
}