Date types for createdAt and updatedAt in MySQL Leave a Comment / Database / November 19, 2018 November 19, 2018 If you really want them work well, : 1. Make sure your mysql’s version is 5.6.5+ 2. The two columns exact data types must be createdAt timestamp not null DEFAULT CURRENT_TIMESTAMP, updatedAt timestamp null DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP