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

[wp_ad_camp_1]

  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.

[wp_ad_camp_1]

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *