-- ----------------------------------------------------------------------------------------------------------
-- ----------------------------------------------------------------------------------------------------------
-- Triggers
-- ----------------------------------------------------------------------------------------------------------
-- ----------------------------------------------------------------------------------------------------------

DELIMITER $$

DROP TRIGGER IF EXISTS `clear_answer_attachments`;$$

CREATE TRIGGER `clear_answer_attachments`     
  AFTER DELETE ON `ohrm_answer`     
  FOR EACH ROW     
 BEGIN
  DELETE FROM  ohrm_answer_attachment where id = OLD.attachment_answer;
 END;$$

DELIMITER ;