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

10 lines
227 B
MySQL
Raw Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_beforeDelete`
BEFORE DELETE ON `entry`
FOR EACH ROW
BEGIN
CALL entry_isEditable(OLD.id);
DELETE FROM buy WHERE entryFk = OLD.id;
END$$
DELIMITER ;