You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/diff/8461.up

20 lines
579 B

USE provisioning;
DROP TRIGGER trusted_sources_update;
CREATE TRIGGER trusted_sources_update BEFORE UPDATE ON voip_trusted_sources
FOR EACH ROW
UPDATE kamailio.trusted SET
src_ip=NEW.src_ip, proto=NEW.protocol, from_pattern=NEW.from_pattern, tag=NEW.uuid
WHERE
src_ip=OLD.src_ip and proto=OLD.protocol and tag=OLD.uuid
;
DROP TRIGGER trusted_sources_delete;
CREATE TRIGGER trusted_sources_delete BEFORE DELETE ON voip_trusted_sources
FOR EACH ROW
DELETE FROM kamailio.trusted
WHERE src_ip=OLD.src_ip and proto=OLD.protocol and tag=OLD.uuid
;