function color_field_field_schema in Color Field 7
Same name and namespace in other branches
- 7.2 color_field.install \color_field_field_schema()
Implements hook_field_schema().
Defines the database schema of the field, using the format used by the Schema API.
The data we will store here is just one 7-character element.
File
- ./
color_field.install, line 15 - Install, update, and uninstall functions.
Code
function color_field_field_schema($field) {
$columns = array(
'rgb' => array(
'type' => 'varchar',
'length' => 7,
'not null' => FALSE,
),
);
$indexes = array(
'rgb' => array(
'rgb',
),
);
return array(
'columns' => $columns,
'indexes' => $indexes,
);
}