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


DROP TRIGGER IF EXISTS `clear_vacancy_user_config`;$$

CREATE TRIGGER `clear_vacancy_user_config`     
  AFTER DELETE ON `ohrm_job_vacancy`     
  FOR EACH ROW     
 BEGIN
  DELETE FROM  `ohrm_user_config` where `key` = CONCAT('recruitment.candidate_filter_for_vacancy.',OLD.id);
 END;