SEE: Update timestamp column in Application or Database?
I'm trying to model something similar in 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 do I go in Workbench to set up this ON UPDATE part?
Also, I have a rule that all timestamps stored in the database should be UTC. How do I make CURRENT_TIMESTAMP, NOW, etc. be UTC?