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

12 lines
306 B
SQL

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