MySQL Workbench and ERROR 1067: Invalid default value for ” (timestamp column)

When I publish my database schema to server by command “Database/Forward engineering” in MySQL Workbench I have a error
ERROR: Error 1067: Invalid default value for 'updated'

“updated” is Timestamp column and there is solution how you can fix this problem.

mysql

  1. Open MySQL Workbench
  2. Open Preferences “Edit / Preferences”
  3. Go to “Modeling / MySQL”
  4. Sets “SQL_MODE to be used in generated scripts:” to “STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
  5. OK button

 

You can do “Database/Forward engineering” again, problem with timestamo should be fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *