You are here

function views_term_hierarchy_weight_field_schema_alter in Views Term Hierarchy Weight Field 7

Implements hook_schema_alter().

1 call to views_term_hierarchy_weight_field_schema_alter()
views_term_hierarchy_weight_field_install in ./views_term_hierarchy_weight_field.install
Implements hook_install().

File

./views_term_hierarchy_weight_field.install, line 6

Code

function views_term_hierarchy_weight_field_schema_alter(&$schema) {
  $schema['taxonomy_term_data']['fields']['hweight'] = array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The weight of this term in the hierarchical tree. Added by the Views Term Hierarchy Weight Field module.',
  );
  $schema['taxonomy_term_data']['fields']['hdepth'] = array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The depth of this term in the hierarchical tree. Added by the Views Term Hierarchy Weight Field module.',
  );
  $schema['menu_links']['fields']['hweight'] = array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The weight of this menu link in the hierarchical tree. Added by the Views Term Hierarchy Weight Field module.',
  );
  if (module_exists('entity_menu_links')) {
    $schema['menu_links_revision']['fields']['hweight'] = array(
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'The weight of this menu link in the hierarchical tree. Added by the Views Term Hierarchy Weight Field module.',
    );
  }
}