-- ---------------------------- --
-- APM-2843
-- IC, risk management, add areas individually
-- Expanding table with area id
-- ---------------------------- --
ALTER TABLE `ic_risk_control` 
CHANGE COLUMN `risk_id` `risk_id` INT(11) NOT NULL FIRST,
ADD COLUMN `area_id` INT NOT NULL DEFAULT '0' AFTER `control_id`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`risk_id`, `control_id`, `area_id`);