-- ------------------------------------------------------------ --
-- APM-2527
-- AC, legacy, workflow auto send to approval
-- Updating sod_rule to accomodate data along with some cleanup
-- ------------------------------------------------------------ --
ALTER TABLE `sod_rule` 
	DROP COLUMN `help`,
	DROP COLUMN `version`,
	CHANGE COLUMN `warning_id` `warning_id` INT(2) NULL DEFAULT '0' COMMENT '0-None, 1-Warn, 2-Req.Doc, 3-Prevent' ,
	ADD COLUMN `workflow_autostart` INT(2) NULL DEFAULT '0' AFTER `approver_minimum`,
	ADD COLUMN `workflow_frequency` INT(2) NULL DEFAULT '9' AFTER `workflow_autostart`,
	ADD COLUMN `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `workflow_frequency`;

	
-- ALSO RUN SCRIPT TO MOVE LEGACIES INTO SEPARATE TABLE PER SYSTEM CLIENT
