function getdirections_fields_field_schema in Get Directions 7.3
Implements hook_field_schema().
Defines the database schema of the field, using the format used by the Schema API.
All implementations of hook_field_schema() must be in the module's .install file.
See also
http://drupal.org/developing/api/schema
File
- modules/
getdirections_fields/ getdirections_fields.install, line 38 - getdirections_fields module installation.
Code
function getdirections_fields_field_schema($field) {
switch ($field['type']) {
case 'getdirections_fields':
$columns = array(
'locative_field_name' => array(
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'address_field_name' => array(
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
);
break;
}
return array(
'columns' => $columns,
'indexes' => array(
'locative_field_name' => array(
'locative_field_name',
),
),
);
}