You are here

function entity_hierarchy_views_schema in Entity Reference Hierarchy 8

Implements hook_schema().

File

entity_hierarchy_views/entity_hierarchy_views.install, line 23
Install file for entity_hierarchy_views module.

Code

function entity_hierarchy_views_schema() {
  $schema['entity_hierarchy_views'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {node}.nid whose children are being embedded.',
      ),
      'nh_children_view' => array(
        'type' => 'varchar',
        'length' => '128',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The {views_view}.name of the embedded view.',
      ),
      'nh_children_view_display' => array(
        'type' => 'varchar',
        'length' => '64',
        'default' => 'default',
        'not null' => TRUE,
        'description' => 'The {views_display}.id of the embedded view.',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}