Both queries use invalid SQL syntax.
The first query is
ALTER TABLE {userpoints_txn} CHANGE event VARCHAR(32)
MySQL requires a new column name even if the column name does not change.
ALTER TABLE {userpoints_txn} CHANGE event event VARCHAR(32)
The second query is
ALTER TABLE {userpoints_txn} CHANGE status BEFORE event
BEFORE does not exist. Positions can only be specified with AFTER. This change also requires the name and type to be declared, even if it remains unchanged. In this case, the desired result would be achieved with this:
ALTER TABLE {userpoints_txn} CHANGE status status INTEGER NOT NULL default '0' AFTER event
This is not yet a patch because I don't know the standard procedure: Should a fix be made to hook_update_3 or should that one be abandoned and the correct update put in hook_update_4?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | userpoints_update_4.patch | 414 bytes | cburschka |
Comments
Comment #1
cburschkaSecond query should of course read:
Comment #2
kbahey commentedPlease submit a patch. See http://drupal.org/patch for details.
Comment #3
cburschkaApologies, it appears to be update #4, not #3.
Lacking instructions, I have made my patch in hook_update_4, keeping the schema number unchanged.
Comment #4
kbahey commentedThe patch was not in unidiff format. Please make future patches in unidiff format.
Anyway, thanks for that.
Committed to HEAD and 5.x.
Comment #5
(not verified) commented