mirror of https://github.com/sipwise/db-schema.git
Since allowing duplicate ips in peering servers, we need to identify the peers using the kamailio.lcr_gw.flags column, which is actually provisioning.voip_peer_hosts.id, instead of trying to match on the ip address.agranig/subprof
parent
1a2aac4345
commit
0a60e09542
@ -0,0 +1,17 @@
|
||||
USE provisioning;
|
||||
|
||||
DROP TRIGGER voip_phost_drepl_trig;
|
||||
DELIMITER ;;
|
||||
|
||||
CREATE TRIGGER voip_phost_drepl_trig AFTER DELETE ON voip_peer_hosts
|
||||
FOR EACH ROW BEGIN
|
||||
|
||||
DELETE FROM kamailio.lcr_gw
|
||||
WHERE flags <=> OLD.id;
|
||||
|
||||
DELETE FROM kamailio.peer_preferences
|
||||
WHERE uuid = OLD.id;
|
||||
|
||||
END ;;
|
||||
|
||||
DELIMITER ;
|
||||
Loading…
Reference in new issue