Bug #67502 Sync Model to
Submitted: 7 Nov 2012 15:12 Modified: 11 Jun 2013 23:29
Reporter: Richard Wilde Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:All OS:Windows
Assigned to: CPU Architecture:Any

[7 Nov 2012 15:12] Richard Wilde
Description:
For decimal columns that have default values defined the syncing does not work as expected. 

How to repeat:
On Model I have the following column:-

DECIMAL (18,4) DEFAULT '0'

On first sync MySQL creates the following column:-

DECIMAL (18,4) DEFAULT '0.0000'

Every subsequent sees a difference between the columns and generates the following SQL:-

ALTER TABLE ... CHANGE COLUMN ... DECIMAL(18,4) NOT NULL DEFAULT 0;

I can only fix the problem by changing my model to:-

DECIMAL (18,4) DEFAULT '0.0000'

Suggested fix:
I think you might need to change the model to the default specified when the column gets created.
[15 Jan 2013 17:52] Armando Lopez Valencia
Thanks a lot for your report.
Verified.
[11 Jun 2013 23:29] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.2 release, and here's the changelog entry:

Default values for "DECIMAL" column definitions would not be preserved
during synchronization.

Thank you for the bug report.