Closed (fixed)
Project:
Geo
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2007 at 11:04 UTC
Updated:
15 Nov 2007 at 15:20 UTC
Jump to comment: Most recent file
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;
}
}
?>
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | geo-install-file-typo-168864.patch | 723 bytes | greggles |
| #1 | geo-install-file-typo-168864-1.patch | 683 bytes | webchick |
Comments
Comment #1
webchickConfirmed. Here's a patch.
Upgrading to critical, since this prevents the module from being installed.
Comment #2
mlsamuelson commentedI experienced the same issue. The patch I was prepared to submit (beaten to the punch by Webchick!) is identical to the one here.
mlsamuelson
Comment #3
moshe weitzman commentedstill busted :(
Comment #4
gregglesslight 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.
Comment #5
bdragon commentedDoh! I apparently wasn't subscribed to the issue queue!
Comment #6
bdragon commentedOkie dokie, committed.
Comment #7
(not verified) commentedComment #8
summit commentedHi,
I am very interested in this Geo module.
Will it be an addition to Location, or a replacement?
Greetings,
Martijn