salix/db/routines/vn/triggers/supplierAddress_afterDelete...

13 lines
331 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplierAddress_afterDelete`
AFTER DELETE ON `supplierAddress`
FOR EACH ROW
BEGIN
INSERT INTO supplierLog
SET `action` = 'delete',
`changedModel` = 'SupplierAddress',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$
DELIMITER ;