salix/db/routines/vn/triggers/supplier_afterDelete.sql

13 lines
312 B
MySQL
Raw Normal View History

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