-- -----------------------------------------------------
-- Adding workflow as an AC system reaction 
-- -----------------------------------------------------
INSERT INTO sod_warning_types (id, type) VALUES (4, 'Approval Workflow');

-- -----------------------------------------------------
-- Creation of table to track workflow approval 
-- -----------------------------------------------------

CREATE TABLE IF NOT EXISTS `sod_preventive_check_wf_approval` (
  id INT NOT NULL AUTO_INCREMENT,
  sod_preventive_check_handle CHAR(32) NULL,
  `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `system` VARCHAR(8) NULL,
  `client` VARCHAR(3) NULL,
  user VARCHAR(12) NULL,
  `comment` TEXT NULL,
  action ENUM('approved','rejected') NULL,
  PRIMARY KEY (id));