Bug #61087 on update CURRENT_TIMESTAMP does not update model
Submitted: 6 May 2011 23:50 Modified: 20 Jan 2012 7:31
Reporter: Bill Sutton Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.33 OS:Any (Mac OS X, Windows XP)
Assigned to: CPU Architecture:Any

[6 May 2011 23:50] Bill Sutton
Description:
When using Synchronize Model, the following seems to be copied to the table, but is not recognized as a difference for future synchronizations:

ALTER TABLE `database`.`table` CHANGE COLUMN `modified_on` `modified_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

How to repeat:
Define a field as a timestamp, and set the default value to 

CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP

Suggested fix:
Get Workbench to recognize whatever MySQL is sending back so it doesn't keep thinking it needs to needlessly update these fields.
[10 May 2011 7:34] Valeriy Kravchuk
Thank you for the bug report. Verified on Windows XP also (server version 5.5.11 was used).
[12 Oct 2011 14:18] Jan W. Hentsch
I can confirm this as still happens on my current MacOSX Version 5.2.35.

And even further, if you later decide to remove "ON UPDATE CURRENT_TIMESTAMP" from your models column definition, it stops from unnecessarily syncing again and again the same thing, BUT it also does not sync the removal of this feature, leaving this feature still swiched on in the database.

So if you once switched that feature on on a column, you'll never get rid of it from within Workbench, but of course with other tools

So my guess is, that feature shoul get supported seperated from the "default value" like it is done in phpMyAdmin

tnx and cu

jwh
[20 Jan 2012 7:31] Philip Olson
Fixed as of 5.2.38:

Workbench would not behave correctly with ON UPDATE
CURRENT_TIMESTAMP as a default value, while
synchronizing models, and would update the field.