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

11 lines
301 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_BEFORE_INSERT`
BEFORE INSERT ON `itemShelving`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
SET NEW.userFk = account.myUser_getId();
SET NEW.available = NEW.visible;
END$$
DELIMITER ;