I'm trying to add an 'updated_at' field to a table using the UI. The default should be either NULL (or CURRENT_TIMESTAMP() would be okay as well), with CURRENT_TIMESTAMP() on update. I'm getting the error:
/ SQL Error (1064): 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 '(CURRENT_TIMESTAMP()) AFTER created_by
' at line 2 /
The ALTER code generated by HeidiSQL is:
ALTER TABLE groups_members_new
CHANGE COLUMN updated_at
updated_at
TIMESTAMP NULL DEFAULT NULL ON UPDATE (CURRENT_TIMESTAMP()) AFTER created_by
;