there's a minor typo in the mysql install case within geo.install - all that's missing is a comma (',') at the end of the gfid row of the geo_field create script. The corrected code is below

<?php
function geo_install() {
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
        // create the geo fields table to track each geometry field in the db
        db_query("CREATE TABLE {geo_field} (
           gfid           SERIAL,
           module         VARCHAR(200),
           table_name     VARCHAR(200),
           field_name     VARCHAR(200),
           table_title    VARCHAR(255),
           field_title    VARCHAR(255),
           data_type      VARCHAR(100),
           geometry_type  VARCHAR(100) DEFAULT NULL,
           dimensions     INT DEFAULT NULL,
           srid           INT DEFAULT NULL,
           PRIMARY KEY(gfid)
         )");
         
        // create the link table between tables with geofields and exsiting views tables
        // TODO foreign key to geo_fields, cascade on delete?
        db_query("CREATE TABLE {geo_link} (
           glid           SERIAL,
           gfid           INT DEFAULT NULL,
           left_table     VARCHAR(255),
           left_field     VARCHAR(255),
           right_field    VARCHAR(255),
           additional_fields  TEXT DEFAULT '',
           PRIMARY KEY(glid)
         )");
      break;

    case 'mysql':
      db_query("CREATE TABLE {geo_field} (
        gfid           INTEGER UNSIGNED NOT NULL auto_increment,
        module         VARCHAR(200),
        table_name     VARCHAR(200),
        field_name     VARCHAR(200),
        table_title    VARCHAR(255),
        field_title    VARCHAR(255),
        data_type      VARCHAR(100),
        geometry_type  VARCHAR(100) DEFAULT NULL,
        dimensions     INT DEFAULT NULL,
        srid           INT DEFAULT NULL,
        PRIMARY KEY(gfid)
      )/*!40100 DEFAULT CHARACTER SET utf8 */");

      db_query("CREATE TABLE {geo_link} (
        glid           INTEGER UNSIGNED NOT NULL auto_increment,
        gfid           INT DEFAULT NULL,
        left_table     VARCHAR(255),
        left_field     VARCHAR(255),
        right_field    VARCHAR(255),
        additional_fields TEXT,
        PRIMARY KEY(glid)
      )/*!40100 DEFAULT CHARACTER SET utf8 */");
      break;
  }
}
?>

Comments

webchick’s picture

Priority: Normal » Critical
Status: Active » Reviewed & tested by the community
StatusFileSize
new683 bytes

Confirmed. Here's a patch.

Upgrading to critical, since this prevents the module from being installed.

mlsamuelson’s picture

I experienced the same issue. The patch I was prepared to submit (beaten to the punch by Webchick!) is identical to the one here.

mlsamuelson

moshe weitzman’s picture

still busted :(

greggles’s picture

Title: Install broken on mysql - minor typo » Install broken on mysql - minor typo (double broken on mysqli)
StatusFileSize
new723 bytes

slight additional problem for mysqli users is that there is no "case" for them in the switch statement.

Attached patch adds the case and retains the extra comma from webchick's patch.

bdragon’s picture

Doh! I apparently wasn't subscribed to the issue queue!

bdragon’s picture

Status: Reviewed & tested by the community » Fixed

Okie dokie, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
summit’s picture

Hi,
I am very interested in this Geo module.
Will it be an addition to Location, or a replacement?
Greetings,
Martijn