I got the following syntax error when enabling the module:

user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'falsekwh decimal(10,2) NOT NULL default 0,enableco2 tinyint(1) query: CREATE TABLE carbon_footprint (nid int(10) unsigned NOT NULL default 0,postcode varchar(10) NOT NULL default '',organization varchar(40) NOT NULL default '',model varchar(20) NOT NULL default '', firstdate int(11) NOT NULL, enablekwh tinyint(1) NOT NULL default falsekwh decimal(10,2) NOT NULL default 0,enableco2 tinyint(1) NOT NULL default trueco2 decimal(10,2) NOT NULL default 0,filing_status int (2) NOT NULL default '0',protection int(2) NOT NULL default '0',PRIMARY KEY (nid)) in includes/database.mysql.inc on line 121.

Not sure whether that's serious or not!

Drupal: 4.7.4
Carbon: carbon.module,v 1.12 2007/01/30 20:19:33 johnackers Exp $

Comments

dbassendine’s picture

I'm also getting user warning: Table 'zamama_cration2.carbon_footprint' doesn't exist.

john ackers’s picture

Assigned: Unassigned » john ackers
Status: Active » Fixed

Apologies. New install had not been tested. There are spaces missing at the ends of the recently added lines. Please wait for an overnight build or take
this version of carbon.install from CVS,

dbassendine’s picture

Thanks, John.

That solves the error message when enabling, but the install still doesn't create the carbon_footprint table i.e. I get user warning: Table 'zamama_cration2.carbon_footprint' doesn't exist when going to admin>carbon_footprint.

Actually, no carbon_* tables are getting created, it seems!

john ackers’s picture

It sounds like Drupal thinks the install was successful. In fact the carbon.install functions afaik cannot indicate that the install previously failed.

I would run these two lines of SQL

delete  from system where name='carbon' ;
drop table carbon_source; drop table carbon_stamp; drop table carbon_stamp_footprint ; drop table carbon_footprint;  drop table carbon_footprint_share;

The first line uninstalls the carbon module and deletes information about the current schema.

Then reenable the module. The install will be reattempted. Hope this works. Sorry you are having this problem as a result of my bug.

dbassendine’s picture

Fine now, thanks. No worries!

Anonymous’s picture

Status: Fixed » Closed (fixed)