-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwikiloc.install
73 lines (72 loc) · 1.54 KB
/
wikiloc.install
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* @file
* Install, update, and uninstall functions for the wikiloc module.
*/
/**
* Implements hook_field_schema().
*
* Defines the database schema of the field, using the format used by the
* Schema API.
*
* The data we will store here is just one 7-character element, even
* though the widget presents the three portions separately.
*
* All implementations of hook_field_schema() must be in the module's
* .install file.
*
* @see http://drupal.org/node/146939
* @see schemaapi
* @see hook_field_schema()
* @ingroup field_example
*/
function wikiloc_field_schema($field) {
$columns = array(
'id' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'measures' => array(
'type' => 'varchar',
'length' => 2,
'not null' => FALSE,
'default' => 'on',
),
'near' => array(
'type' => 'varchar',
'length' => 2,
'not null' => FALSE,
'default' => 'on',
),
'images' => array(
'type' => 'varchar',
'length' => 2,
'not null' => FALSE,
'default' => 'on',
),
'maptype' => array(
'type' => 'varchar',
'length' => 2,
'not null' => FALSE,
'default' => 'S',
),
'width' => array(
'type' => 'int',
'length' => 12,
'not null' => FALSE,
),
'height' => array(
'type' => 'int',
'length' => 12,
'not null' => FALSE,
),
);
$indexes = array(
'id' => array('id'),
);
return array(
'columns' => $columns,
'indexes' => $indexes,
);
}