14 lines
313 B
MySQL
14 lines
313 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `pbx`.`sip_afterInsert`
|
||
|
AFTER INSERT ON `sip`
|
||
|
FOR EACH ROW
|
||
|
BEGIN
|
||
|
INSERT INTO sipReg
|
||
|
SET userId = NEW.user_id;
|
||
|
|
||
|
INSERT IGNORE INTO `account`.userSync (`name`)
|
||
|
SELECT `name` FROM `account`.`user`
|
||
|
WHERE id = NEW.user_id;
|
||
|
END$$
|
||
|
DELIMITER ;
|