You are here

function gm3_region_update_7001 in Google Maps API V3 7

Add the mysql_polygons column.

File

gm3_region/gm3_region.install, line 148

Code

function gm3_region_update_7001() {
  db_add_field('gm3_region_data', 'mysql_polygons', array(
    'description' => 'MySQL GEO extension',
    'mysql_type' => 'MULTIPOLYGON',
  ));

  // Finally, we set the shape data.  This query is MySQL specific.
  db_query('UPDATE {gm3_region_data} SET mysql_polygons = POLYGONFROMTEXT(polygons)');
}