You are here

function units_field_field_schema in Units of Measurement 7.2

Implements hook_field_schema().

File

units_field/units_field.install, line 11
Install and uninstall hooks of the Units field module.

Code

function units_field_field_schema($field) {
  $schema = array();
  switch ($field['type']) {
    case 'units_value':
      $schema['columns'] = array(
        'mathematical_expression_id' => array(
          'type' => 'int',
          'length' => 10,
          'not null' => TRUE,
          'description' => 'Pointer to {units_mathematical_expression_postfix}.mathematical_expression_id that represents this mathematical expression.',
        ),
      );
      break;
  }
  return $schema;
}