MT#13329 adapt rewrite rules to new upstream syntax [*] -> [+]

Change-Id: If13e0fc7ea42f99d98835402fee148d27198cfea
changes/61/2061/4
Victor Seva 10 years ago committed by Víctor Seva
parent 73f8477e72
commit 7588c96f3d

@ -0,0 +1,20 @@
set sql_log_bin=0;
set autocommit=0;
START TRANSACTION;
USE provisioning;
CREATE TEMPORARY TABLE temp_match SELECT id, REPLACE(match_pattern, '[+]', '[*]') as match_pattern FROM voip_rewrite_rules WHERE match_pattern REGEXP '\\$\\(avp\\(.+\\)\\[\\+\\]\\)';
UPDATE voip_rewrite_rules as d INNER JOIN temp_match as t
ON d.id = t.id
SET d.match_pattern = t.match_pattern;
CREATE TEMPORARY TABLE temp_subst SELECT id, REPLACE(replace_pattern, '[+]', '[*]') as replace_pattern FROM voip_rewrite_rules WHERE replace_pattern REGEXP '\\$\\(avp\\(.+\\)\\[\\+\\]\\)';
UPDATE voip_rewrite_rules as d INNER JOIN temp_subst as t
ON d.id = t.id
SET d.replace_pattern = t.replace_pattern;
COMMIT;

@ -0,0 +1,20 @@
set sql_log_bin=0;
set autocommit=0;
START TRANSACTION;
USE provisioning;
CREATE TEMPORARY TABLE temp_match SELECT id, REPLACE(match_pattern, '[*]', '[+]') as match_pattern FROM voip_rewrite_rules WHERE match_pattern REGEXP '\\$\\(avp\\(.+\\)\\[\\*\\]\\)';
UPDATE voip_rewrite_rules as d INNER JOIN temp_match as t
ON d.id = t.id
SET d.match_pattern = t.match_pattern;
CREATE TEMPORARY TABLE temp_subst SELECT id, REPLACE(replace_pattern, '[*]', '[+]') as replace_pattern FROM voip_rewrite_rules WHERE replace_pattern REGEXP '\\$\\(avp\\(.+\\)\\[\\*\\]\\)';
UPDATE voip_rewrite_rules as d INNER JOIN temp_subst as t
ON d.id = t.id
SET d.replace_pattern = t.replace_pattern;
COMMIT;
Loading…
Cancel
Save