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

12 lines
308 B
SQL

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