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

13 lines
314 B
SQL

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