You are here

google_map_field.install in Google Map Field 7

Same filename and directory in other branches
  1. 8 google_map_field.install
  2. 7.2 google_map_field.install

Defines schema for google_map fields

File

google_map_field.install
View source
<?php

/**
 * @file
 * Defines schema for google_map fields
 */

/**
 * Implements hook_field_schema().
 */
function google_map_field_field_schema($field) {
  return array(
    'columns' => array(
      'lat' => array(
        'type' => 'float',
        'length' => 15,
        'not null' => FALSE,
      ),
      'lon' => array(
        'type' => 'float',
        'length' => 15,
        'not null' => FALSE,
      ),
      'map_width' => array(
        'type' => 'int',
        'length' => 10,
        'not null' => FALSE,
      ),
      'map_height' => array(
        'type' => 'int',
        'length' => 10,
        'not null' => FALSE,
      ),
      'zoom' => array(
        'type' => 'int',
        'length' => 10,
        'not null' => FALSE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
      ),
    ),
  );
}

/**
 * Implements hook_uninstall().
 */
function google_map_field_uninstall() {
  variable_del('google_map_field_*');
}