function accordions_schema in Accordions 7
Implements hook_schema().
File
- ./
accordions.install, line 6
Code
function accordions_schema() {
$schema = array();
$schema['accordions'] = array(
'description' => 'Details of accordions',
'fields' => array(
'type' => array(
// e.g. 'entity' / 'block' / 'field' / 'field:delta'
'description' => 'Type of accordion group.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'subtype' => array(
// e.g. 'node' / 'module' / 'node:nid' / 'node:nid:field_name'
'description' => 'Subtype of accordion group.',
'type' => 'varchar',
'length' => 32,
'not null' => FALSE,
),
'id' => array(
// e.g. 'nid' / 'delta' / 'field_name' / 'delta'
'description' => 'ID of accordion group within type/subtype.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'name' => array(
// e.g. 'sidebar-blocks' (or anything else)
'description' => 'Name of accordion group.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'initial' => array(
'description' => 'Binary flag to indicate whether the item should initially be expanded or not.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'type',
'subtype',
'id',
),
'indexes' => array(
'ti' => array(
'type',
'id',
),
),
);
return $schema;
}