You are here

function bundle_inherit_schema in Bundle Inherit 7

Implements hook_schema().

File

./bundle_inherit.install, line 10
Bundle Inherit module install file.

Code

function bundle_inherit_schema() {
  $schema['bundle_inherit'] = array(
    'description' => 'Holds info about hierarchy relations between entity types.',
    'fields' => array(
      'entity_type' => array(
        'description' => 'The entity type of the bundles.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'bundle' => array(
        'description' => 'Child bundle name.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'bundle_parent' => array(
        'description' => 'Parent bundle name.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'entity_type',
      'bundle',
    ),
    'indexes' => array(
      'parent' => array(
        'entity_type',
        'bundle_parent',
      ),
    ),
  );
  return $schema;
}