Would like to try out your module, looks like what we've been needing. However, when enabling the module, we are getting the following SQL errors.

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 ')' at line 15 query: CREATE TABLE jobtrack_client ( clid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(128) NOT NULL DEFAULT '', status BOOL NOT NULL DEFAULT '0', server_name varchar(64) NOT NULL DEFAULT '', server_username varchar(64) NOT NULL DEFAULT '', server_password varchar(64) NOT NULL DEFAULT '', mailfrom varchar(64) NOT NULL DEFAULT '', mailbox varchar(64) NOT NULL DEFAULT '', protocol int(2) UNSIGNED NOT NULL DEFAULT '0', port int(5) UNSIGNED NOT NULL DEFAULT '0', delete_read BOOL NOT NULL DEFAULT '0', notes LONGTEXT NULL, UNIQUE KEY name (name), ) in /var/www/html/sites/all/modules/jobtrack/jobtrack.install on line 26.

user warning: Table 'jobtrack_job' already exists query: CREATE TABLE jobtrack_job ( jid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, clid INT UNSIGNED NOT NULL DEFAULT '0', name VARCHAR(128) NOT NULL DEFAULT '', notes LONGTEXT NULL, status INT(2) UNSIGNED NOT NULL DEFAULT '0' ) in /var/www/html/sites/all/modules/jobtrack/jobtrack.install on line 33.

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 'client INT UNSIGNED NOT NULL DEFAULT '0', )' at line 5 query: CREATE TABLE jobtrack_ticket_comment ( cid INT NOT NULL PRIMARY KEY, state INT(3) UNSIGNED NOT NULL DEFAULT '0', priority INT(3) UNSIGNED NOT NULL DEFAULT '0' client INT UNSIGNED NOT NULL DEFAULT '0', ) in /var/www/html/sites/all/modules/jobtrack/jobtrack.install on line 46.

We are using Drupal 6.8 and MySQL 5.0.51a

Comments

jeremy’s picture

Assigned: Unassigned » jeremy
Category: support » bug
Status: Active » Fixed

Sorry, it seems I was checking code into HEAD and not 6.x-1.x-dev. I've synched the code which includes a fix. Either wait for a new devel tarball to be built or check the latest code out of CVS, completely uninstall then reinstall the module.

bscsi’s picture

Thanks for that fix. However, I'm now getting this error when enabling the module:

user warning: Unknown column 'admin' in 'field list' query: INSERT INTO jobtrack_states (state, weight, admin, phase1, phase2, isdefault) VALUES('new', 0, 0, 1, 0, 1) in /var/www/html/sites/all/modules/jobtrack/jobtrack.install on line 69.

Thanks for your help!

jeremy’s picture

Thanks for the bug report. You can manually remove the reference to admin if you like, then reinstall. That line from jobtrack.install should read as follows (search for "admin" to find the original line):

      db_query("INSERT INTO {jobtrack_states} (state, weight, phase1, phase2, isdefault) VALUES('new', 0, 1, 0, 1)");

I have committed this change to CVS as well, so a CVS update will also work.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.