3
I went to create a table in the bank and appeared following error:
Invalid default value for "updated_at"
Here is the table to create:
CREATE TABLE  `user` (
 `id` INT( 11 ) NOT NULL ,
 `uuid` CHAR( 12 ) NOT NULL ,
 `fullname` VARCHAR( 512 ) DEFAULT NULL ,
 `username` VARCHAR( 128 ) DEFAULT NULL ,
 `email` VARCHAR( 512 ) DEFAULT NULL ,
 `device` TEXT,
 `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ,
 `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE = MYISAM DEFAULT CHARSET = latin1;
The database is created on a machine with Amazon Linux AMI, and I’m using client’s version Mysql: 5.5.54. Is it something related to the version? How can I solve the problem?
Default error for datetime field in Mysql
– rray