
CREATE TABLE `was_hub_milestone_action` (
  `milestone_action_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `action_label` varchar(64) NOT NULL,
  `action_type` enum('POPUP', 'PAGE') NOT NULL,
  `action_uri` varchar(256) NOT NULL,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`milestone_action_id`)
) ENGINE=InnoDB COMMENT='stores action item for each milestone task';

CREATE TRIGGER `was_hub_milestone_action_insert_timestamp` BEFORE INSERT ON `was_hub_milestone_action`
FOR EACH ROW SET NEW.insert_timestamp = NOW();


ALTER TABLE `was_hub_milestone` ADD `milestone_action_id` INT(11) UNSIGNED NULL DEFAULT NULL AFTER `description`;
