You are here

function mathfield_field_schema in Math Field 7

Implements hook_field_schema().

File

./mathfield.install, line 11
Install, update and uninstall functions for the mathfield module.

Code

function mathfield_field_schema($field) {
  switch ($field['type']) {
    case 'mathfield':
      $columns = array(
        'value' => array(
          'type' => 'numeric',
          'precision' => $field['settings']['precision'],
          'scale' => $field['settings']['scale'],
          'not null' => FALSE,
        ),
      );
      break;
  }
  return array(
    'columns' => $columns,
  );
}