blob: d5e6b1cf2d33b21f65f168468f873d450fdd4a5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
// $Id$
/**
* @file
* Install, update and uninstall functions for the number module.
*/
/**
* Implements hook_field_schema().
*/
function number_field_schema($field) {
switch ($field['type']) {
case 'number_integer' :
$columns = array(
'value' => array(
'type' => 'int',
'not null' => FALSE
),
);
break;
case 'number_float' :
$columns = array(
'value' => array(
'type' => 'float',
'not null' => FALSE
),
);
break;
case 'number_decimal' :
$columns = array(
'value' => array(
'type' => 'numeric',
'precision' => $field['settings']['precision'],
'scale' => $field['settings']['scale'],
'not null' => FALSE
),
);
break;
}
return array(
'columns' => $columns,
);
}
|