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

11 lines
250 B
MySQL
Raw Normal View History

DELIMITER $$
2024-01-25 16:33:54 +00:00
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `edi`.`item_feature_beforeInsert`
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 ;