From dff285f9c7107a0b11df38841ebbeb13baa40d20 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Mon, 23 Nov 2020 17:11:43 +0100 Subject: [PATCH] TT#101300 fix subscriber_location_mapping migration * fill caller_pattern, callee_pattern with '.+' Change-Id: Id694a9663085e33b7eec5524610ef36b972e74e0 --- db_scripts/diff/15642.up | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_scripts/diff/15642.up b/db_scripts/diff/15642.up index c786ae37..d632e2f8 100644 --- a/db_scripts/diff/15642.up +++ b/db_scripts/diff/15642.up @@ -17,8 +17,8 @@ CREATE TABLE `voip_subscriber_location_mappings` ( CONSTRAINT `v_subscriber_ref` FOREIGN KEY (`subscriber_id`) REFERENCES `voip_subscribers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; -INSERT INTO voip_subscriber_location_mappings (subscriber_id, location, mode, to_username) -SELECT u.subscriber_id, u.value, COALESCE(u2.value, 'replace') as mode, a.username as to_username +INSERT INTO voip_subscriber_location_mappings (subscriber_id, location, caller_pattern, callee_pattern, mode, to_username) +SELECT u.subscriber_id, u.value, '.+', '.+', COALESCE(u2.value, 'replace') as mode, a.username as to_username FROM voip_preferences p JOIN voip_preferences p2 JOIN voip_usr_preferences u ON u.attribute_id = p.id