From ead92dcf39ccccca89e8c3a0ddb44220e361dc14 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 22 Apr 2014 12:08:50 +0200 Subject: [PATCH] MT#6693 Align to new pbx schema. --- db_scripts/diff/15055.down | 5 +++++ db_scripts/diff/15055.up | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/db_scripts/diff/15055.down b/db_scripts/diff/15055.down index 0309eae4..a808e52a 100644 --- a/db_scripts/diff/15055.down +++ b/db_scripts/diff/15055.down @@ -1,6 +1,11 @@ USE provisioning; +DELETE FROM voip_preferences WHERE attribute = 'music_on_hold'; + ALTER TABLE voip_subscribers + DROP COLUMN pbx_hunt_policy, + DROP COLUMN pbx_hunt_timeout, + DROP COLUMN pbx_extension, DROP COLUMN profile_set_id, DROP COLUMN profile_id; diff --git a/db_scripts/diff/15055.up b/db_scripts/diff/15055.up index 6058959c..64a34017 100644 --- a/db_scripts/diff/15055.up +++ b/db_scripts/diff/15055.up @@ -32,6 +32,14 @@ CREATE TABLE `voip_subscriber_profile_attributes` ( CONSTRAINT `voip_subscriber_profile_attributes_ibfk_2` FOREIGN KEY (`profile_id`) REFERENCES `voip_subscriber_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; -ALTER TABLE voip_subscribers - ADD COLUMN profile_set_id INT(11) UNSIGNED DEFAULT NULL AFTER pbx_group_id, +ALTER TABLE voip_subscribers + ADD COLUMN pbx_hunt_policy enum('serial','parallel') DEFAULT NULL AFTER is_pbx_group, + ADD COLUMN pbx_hunt_timeout int(4) unsigned DEFAULT NULL AFTER pbx_hunt_policy, + ADD COLUMN pbx_extension varchar(255) DEFAULT NULL AFTER pbx_group_id, + ADD COLUMN profile_set_id INT(11) UNSIGNED DEFAULT NULL AFTER pbx_extension, ADD COLUMN profile_id INT(11) UNSIGNED DEFAULT NULL AFTER profile_set_id; + +INSERT INTO voip_preferences VALUES + (NULL, 5, 'music_on_hold', 'Music on Hold', 1, 1, 1, 0, 0, now(), 0, 1, + 'boolean', 0, '"Music on Hold" - if set to true and a music on hold file is provided, a calling party gets that file played when put on hold' + );