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.
Comments
Comment #1
firfin commentedThis 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.
Comment #2
keesje commented@anyone: Please confirm if this patch works for you
Comment #3
keesje commentedShould be fixed in current release, please reopen if necessary.
Comment #4
praseodym commentedWould be better to fix this with the Schema API so that it also works with PostgreSQL.
Comment #5
keesje commentedAgreed, will give this more attention.
Comment #6
keesje commentedPlease try this patch
Comment #7
firfin commentedPatch failed for me. Tried to apply it to the 1.4 version from 2009-Aug-18 (from http://drupal.org/project/uc_ideal_easy) with the following command:
patch -b ./uc_ideal_easy_payment.install ./uc_ideal_easy_payment.install_1p0.patchWhich resulted in:
I attached this file for you (I just added .txt to the filename, else drupal.org won't let me upload). Don't know if it helps at all. Looks the same as the original patchfile.
I will try patching the file manually. I will get back to you on that.
Comment #8
firfin commentedI have made a new patch. This works for me with a fresh 1.4 uc_ideal_easy. It fixes a typo, uses the correct dbtypes for hook_schema and calls the correct schema.
I believe I have followed Schema API to the letter. As specified on http://api.drupal.org/api/group/schemaapi/6 and http://api.drupal.org/api/function/db_type_map/6
What exactly do you mean praseodym?
Comment #9
firfin commentedThis seemed to be fixed in the 1.5 release. Unfortunately this is because the DB tables were not created. See #562230: errors while activating and using module comment #14 for a fix. This fix needs to be applied before the one in this thread will work!
Once DB tables are created the SQL errors return:
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 'NOT NULL, `transaction_id` NOT NULL, `description` VARCHAR(9) NOT NULL, `ord' at line 2 query: CREATE TABLE uc_payment_ideal_easy ( `order_id` NOT NULL, `transaction_id` NOT NULL, `description` VARCHAR(9) NOT NULL, `order_status` NOT NULL, `return_succes` TEXT NOT NULL, PRIMARY KEY (order_id) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /srv/www/tmf/public_html/includes/database.inc on line 551.This warning occurs because of incorrect definition of items in de schema array.
Patch is attached in next comment ( apply patch in #562230: errors while activating and using module first! )
Comment #10
firfin commentedPatch created with git for 1.5 version.
Fixes schema definition
Apply patch in #562230: errors while activating and using module first!
Comment #11
keesje commentedobsolete module