function entity_hierarchy_schema in Entity Reference Hierarchy 8
Implements hook_schema().
File
- ./
entity_hierarchy.install, line 10 - schema and uninstall functions for the entity_hierarchy module.
Code
function entity_hierarchy_schema() {
$schema['entity_hierarchy'] = array(
'description' => 'The hierarchical structure of the nodes.',
'fields' => array(
'hid' => 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(
'hid',
),
);
return $schema;
}