salix/db/routines/account/triggers/user_afterInsert.sql

11 lines
255 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`user_afterInsert`
AFTER INSERT ON `user`
FOR EACH ROW
BEGIN
CALL hedera.image_ref('user', NEW.image);
INSERT IGNORE INTO userSync SET `name` = NEW.`name`;
END$$
DELIMITER ;