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

13 lines
316 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`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 ;