mirror of https://github.com/sipwise/db-schema.git
Change-Id: If13e0fc7ea42f99d98835402fee148d27198cfeachanges/61/2061/4
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…
Reference in new issue