function getlocations_fields_schema in Get Locations 7.2
Same name and namespace in other branches
- 7 modules/getlocations_fields/getlocations_fields.install \getlocations_fields_schema()
Implements hook_schema().
File
- modules/
getlocations_fields/ getlocations_fields.install, line 14 - getlocations_fields.install @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_schema() {
$schema['getlocations_fields'] = array(
'description' => 'Locational data managed by getlocations_fields module.',
'fields' => array(
'glid' => array(
'description' => 'Primary Key: Unique location ID.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'name' => array(
'description' => 'Place Name.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'street' => array(
'description' => 'Street address, line 1.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'additional' => array(
'description' => 'Street address, line 2.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'city' => array(
'description' => 'City.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'province' => array(
'description' => 'State / Province.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'postal_code' => array(
'description' => 'Postal / ZIP code.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'country' => array(
'description' => 'Country.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'address' => array(
'description' => 'Address.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'latitude' => array(
'description' => 'Location latitude (decimal degrees).',
'type' => 'numeric',
'precision' => 10,
'scale' => 6,
'default' => 0.0,
'not null' => TRUE,
),
'longitude' => array(
'description' => 'Location longitude (decimal degrees).',
'type' => 'numeric',
'precision' => 10,
'scale' => 6,
'default' => 0.0,
'not null' => TRUE,
),
'marker' => array(
'description' => 'Marker.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'field_name' => array(
'description' => 'Field name.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => TRUE,
),
'data' => array(
'description' => 'Data.',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
),
'primary key' => array(
'glid',
),
);
return $schema;
}