CM: Refresh timestamp column in application or database?
I am trying to simulate something like this in a Workbench, but I donβt know where to set the βON UPDATEβ part. The best I can get is the following:
-- ----------------------------------------------------- -- Table `foo`.`test` -- ----------------------------------------------------- DROP TABLE IF EXISTS `foo`.`test` ; CREATE TABLE IF NOT EXISTS `foo`.`test` ( `test_id` INT NOT NULL , `date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `date_updated` TIMESTAMP NOT NULL DEFAULT 0 , PRIMARY KEY (`test_id`) ) ENGINE = InnoDB;
Where can I go to Workbench to configure this part of ON UPDATE?
In addition, I have a rule that all timestamps stored in the database must be UTC. How to do CURRENT_TIMESTAMP, NOW, etc. UTC?
mysql timestamp utc mysql-workbench
StackOverflowNewbie Nov 19 '11 at 12:50 2011-11-19 12:50
source share