function postal_code_field_schema in Postal Code 7
Implements hook_field_schema().
File
- ./
postal_code.install, line 32 - Based on example from http://www.slideshare.net/zugec/fields-in-core-how-to-create-a-custom-field and http://drupal.org/project/examples.
Code
function postal_code_field_schema($field) {
if ($field['type'] == 'postal_code') {
$columns = array(
'postal' => array(
'type' => 'varchar',
'length' => '16',
'not null' => FALSE,
),
);
}
return array(
'columns' => $columns,
);
}