salix/db/routines/edi/triggers/item_feature_bi.sql

11 lines
240 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`item_feature_bi`
BEFORE INSERT ON `item_feature`
FOR EACH ROW
BEGIN
IF NEW.expiry_date = '0000-00-00' THEN
SET NEW.expiry_date = NULL;
END IF;
END$$
DELIMITER ;