function blockreference_field_schema in Block reference 7
Same name and namespace in other branches
- 7.2 blockreference.field.inc \blockreference_field_schema()
Implements hook_field_schema().
File
- ./
blockreference.module, line 71 - Defines a field type for referencing a block from a node.
Code
function blockreference_field_schema($field) {
$columns = array(
'bid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
),
);
return array(
'columns' => $columns,
'indexes' => array(
'bid' => array(
'bid',
),
),
'foreign keys' => array(
'bid' => array(
'table' => 'block',
'columns' => array(
'bid' => 'bid',
),
),
),
);
}