You are here

function getlocations_leaflet_field_schema in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_leaflet/getlocations_leaflet.install \getlocations_leaflet_field_schema()

Implements hook_field_schema().

Defines the database schema of the field, using the format used by the Schema API.

All implementations of hook_field_schema() must be in the module's .install file.

See also

http://drupal.org/node/146939

http://drupal.org/developing/api/schema

File

modules/getlocations_leaflet/getlocations_leaflet.install, line 83
getlocations_leaflet.install @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_leaflet_field_schema($field) {
  switch ($field['type']) {
    case 'getlocations_leaflet':
      $columns = array(
        'locative_field_name' => array(
          'type' => 'varchar',
          'length' => 255,
          'default' => '',
          'not null' => TRUE,
        ),
      );
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => array(
      'locative_field_name' => array(
        'locative_field_name',
      ),
    ),
  );
}