MySQL is not allowing ON UPDATE CURRENT_TIMESTAMP for a DATETIME field

DATETIME cannot use CURRENT_TIMESTAMP on update. Instead, change it to a TIMESTAMP.

Or, consider using a trigger for this situation: http://dev.mysql.com/doc/refman/5.0/en/trigger-syntax.html

EDIT: As in the comments (thanks @АлександрФишер!), this is no longer the case since MySQL 5.6.5, so another solution is to upgrade your server if possible.


That feature appears to have been introduced in 5.6. Works as expected on my default OS X install.

Reference: Automatic Timestamp Properties Before MySQL 5.6.5