SET @old_path := (SELECT `sendmail_path` FROM `ohrm_email_configuration` WHERE `mail_type`='sendmail' AND `sendmail_path` IS NOT NULL AND `sendmail_path` != '');

INSERT INTO ohrm_config(property, `value`) VALUES ('email_config.sendmail_path','/usr/sbin/sendmail -bs');

UPDATE `ohrm_config`
SET `value` = @old_path
WHERE `property`= 'email_config.sendmail_path' AND @old_path!="";

ALTER TABLE `ohrm_email_configuration` DROP COLUMN `sendmail_path`;