11 lines
273 B
MySQL
11 lines
273 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeDelete`
|
||
|
BEFORE DELETE ON `buy`
|
||
|
FOR EACH ROW
|
||
|
BEGIN
|
||
|
IF OLD.printedStickers <> 0 THEN
|
||
|
CALL util.throw("it is not possible to delete buys with printed labels ");
|
||
|
END IF;
|
||
|
END$$
|
||
|
DELIMITER ;
|