Bug #104022 TIMESTAMP precision is not apply to sql script for synchronizing
Submitted: 15 Jun 2021 8:53 Modified: 17 Jun 2021 12:14
Reporter: Lee Kevin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S7 (Test Cases)
Version:8.0.20 OS:Linux (Ubuntu 18.04 x86_64)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[15 Jun 2021 8:53] Lee Kevin
Description:
----[For better reports, please attach the log file after submitting. You can find it in /home/highvolt/.mysql/workbench/log/wb.log]

I created a column with Datatype 'TIMESTAMP(3)'. However, when I try to synchronize my model to my server, '(3)' is omitted in the sql script for creating the table(the column). So, I can not store milliseconds precision on my TIMESTAMP column.

My server: Server version: 5.7.28-0ubuntu0.18.04.4 (Ubuntu)
My configuration option in Model Options : Target MySQL Version:5.7.24

How to repeat:
1. create a table with innodb.
2. create a columns with Datatype 'TIMESTAMP(3)'.
3. Database -> Synchronize model
4. You can see omitting of '(3)' in end of Datatype in a final sql script which will be applied to target server.
ex)
CREATE TABLE IF NOT EXISTS `kidspay`.`Message` (
  `id_message` INT(11) NOT NULL AUTO_INCREMENT,
  `created` TIMESTAMP NULL DEFAULT NULL,
  PRIMARY KEY (`id_message`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8

Suggested fix:
"`created` TIMESTAMP NULL DEFAULT NULL" should be "`created` TIMESTAMP(3) NULL DEFAULT NULL".
[17 Jun 2021 12:14] MySQL Verification Team
Hello Lee Kevin,

Thank you for the bug report.
Imho this is duplicate of Bug #74617, please see Bug #74617.

Regards,
Ashwini Patil