Bug #81962 Error on Timestamp missing default value, if another timestamp exists
Submitted: 21 Jun 2016 21:44 Modified: 21 Jun 2016 23:05
Reporter: Benjamin Tamási Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.7.13 OS:MacOS (10.11)
Assigned to: CPU Architecture:Any

[21 Jun 2016 21:44] Benjamin Tamási
Description:
When defining a timestamp column with a default value and NOT NULL, no more timestamp columns can be defined without giving them a default value as well. If you try to run the following SQL code, you will get an error.
Here is the original issue on github that I submitted:
https://github.com/cakephp/migrations/issues/247#issuecomment-227578994

How to repeat:
Run the following sql code:

CREATE TABLE `packages` (
  `created`       TIMESTAMP           NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified`      TIMESTAMP           NOT NULL
)
[21 Jun 2016 23:05] MySQL Verification Team
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

http://bugs.mysql.com/bug.php?id=81875