Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.19
-
None
Description
CURRENT_TIMESTAMP can be set as DEFAULT with MODIFY but not with ALTER:
> ALTER TABLE attachment_version ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURRENT_TIMESTAMP' at line 1
> ALTER TABLE attachment_version MODIFY COLUMN created_at timestamp DEFAULT CURRENT_TIMESTAMP;
Query OK, 0 rows affected (0.02 sec)
The table in example is InnoDB.