salix/db/routines/vn/triggers/supplierAccount_afterDelete...

13 lines
337 B
SQL

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