"You have an error in your SQL syntax" when installing in D6
firfin - September 3, 2009 - 23:23
| Project: | IDEAL Easy | Ubercart Payment |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I get the following error when trying to install the module in D6:
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
'(9) NOT NULL, `transaction_id` (9) NOT NULL, `description` VARCHAR(9) NOT NULL' at line 2 query:
CREATE TABLE uc_payment_ideal_easy ( `order_id` (9) NOT NULL, `transaction_id` (9) NOT NULL, `description` VARCHAR(9) NOT NULL, `order_status` (4) NOT NULL, `return_succes` TEXT NOT NULL, PRIMARY KEY (order_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /site/includes/database.inc op regel 515.And I also solved the problem, after I realized it is because of the new schema API. Tinyint and mediumint are no longer recognized as valid type for the fields. Int is. Also see:
http://api.drupal.org/api/group/schemaapi/6
http://drupal.org/node/159605
So I just changed the 'tinyint' and 'mediumint' in the field definitions of the .install file to 'int' and a appropiate size parameter. After that I could install the module without errors.

#1
This is a patch for the 1.4 version of the iDEAL Easy payment module.
It fixes 'type' and 'size' parameters of various fields in the schema.
Also corrects a small typo.
#2
@anyone: Please confirm if this patch works for you