ALTER TABLE `erp_purchasing_order` ADD `approved_level` INT NOT NULL DEFAULT '0' AFTER `order_approve_notification`, ADD `level1_approved_by` INT NOT NULL AFTER `approved_level`, ADD `level1_approved_time` DATETIME NOT NULL AFTER `level1_approved_by`, ADD `level2_approved_by` INT NOT NULL AFTER `level1_approved_time`, ADD `level2_approved_time` DATETIME NOT NULL AFTER `level2_approved_by`, ADD `level3_approved_by` INT NOT NULL AFTER `level2_approved_time`, ADD `level3_approved_time` DATETIME NOT NULL AFTER `level3_approved_by`;
ALTER TABLE `erp_mas_colour_scheme` CHANGE `type` `type` ENUM('Q','L','O','A','PO') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
ALTER TABLE `erp_approval_history` CHANGE `state` `state` ENUM('Q', 'O', 'PO') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
INSERT INTO `erp_mas_colour_scheme` (`id`, `type`, `item`, `field`, `colour`) VALUES (NULL, 'PO', 'Purchase Order Approval Level 0', 'Finance', '#ffb9b9'), (NULL, 'PO', 'Purchase Order Approval Level 1', 'Managing Director', '#ffff8a'), (NULL, 'PO', 'Purchase Order Approval Level 2', 'Chairman', '#8080ff'), (NULL, 'PO', 'Purchase Order Approval Level 3', 'Approved', '#ffffff');
