-- ------------------------------------------------
-- Changes to support workflow functionality
-- ------------------------------------------------
CREATE TABLE IF NOT EXISTS `sod_workflow` (
	handle		CHAR(32) NOT NULL,
	`system`	VARCHAR(8) NULL,
	client		VARCHAR(3) NULL,
	admin		VARCHAR(12) NULL,
	status		ENUM('approved','rejected','pending') NOT NULL DEFAULT 'pending',
	marked_seen ENUM('true','false') NOT NULL DEFAULT 'false',
	assigned	ENUM('true','false') NOT NULL DEFAULT 'false',
	begining_addrs		MEDIUMTEXT NULL,
	approved_addrs		MEDIUMTEXT NULL,
	rejected_addrs		MEDIUMTEXT NULL,
	approval_details	MEDIUMTEXT NULL,
PRIMARY KEY (handle));

ALTER TABLE sod_preventive_check 
	DROP COLUMN marked_seen,
	DROP COLUMN workflow;
