From 79a6e540a1487fbdcbab7bf9669be1cc8bc44ed7 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 14 Oct 2014 14:30:37 +0200 Subject: [PATCH] MT#9565 Introduce gpp0-gpp9 and change cdr schema. Change-Id: I18ea8356e06c45741dfabd2dc19e21fe728d4bd8 --- db_scripts/diff/15106_not_replicated.up | 23 +++++++++++++++++++++++ db_scripts/diff/15107.up | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 db_scripts/diff/15106_not_replicated.up create mode 100644 db_scripts/diff/15107.up diff --git a/db_scripts/diff/15106_not_replicated.up b/db_scripts/diff/15106_not_replicated.up new file mode 100644 index 00000000..0de95078 --- /dev/null +++ b/db_scripts/diff/15106_not_replicated.up @@ -0,0 +1,23 @@ +USE accounting; + +ALTER TABLE cdr + ADD COLUMN source_gpp0 varchar(255) default NULL AFTER source_ip, + ADD COLUMN source_gpp1 varchar(255) default NULL AFTER source_gpp0, + ADD COLUMN source_gpp2 varchar(255) default NULL AFTER source_gpp1, + ADD COLUMN source_gpp3 varchar(255) default NULL AFTER source_gpp2, + ADD COLUMN source_gpp4 varchar(255) default NULL AFTER source_gpp3, + ADD COLUMN source_gpp5 varchar(255) default NULL AFTER source_gpp4, + ADD COLUMN source_gpp6 varchar(255) default NULL AFTER source_gpp5, + ADD COLUMN source_gpp7 varchar(255) default NULL AFTER source_gpp6, + ADD COLUMN source_gpp8 varchar(255) default NULL AFTER source_gpp7, + ADD COLUMN source_gpp9 varchar(255) default NULL AFTER source_gpp8, + ADD COLUMN destination_gpp0 varchar(255) default NULL AFTER destination_domain_in, + ADD COLUMN destination_gpp1 varchar(255) default NULL AFTER destination_gpp0, + ADD COLUMN destination_gpp2 varchar(255) default NULL AFTER destination_gpp1, + ADD COLUMN destination_gpp3 varchar(255) default NULL AFTER destination_gpp2, + ADD COLUMN destination_gpp4 varchar(255) default NULL AFTER destination_gpp3, + ADD COLUMN destination_gpp5 varchar(255) default NULL AFTER destination_gpp4, + ADD COLUMN destination_gpp6 varchar(255) default NULL AFTER destination_gpp5, + ADD COLUMN destination_gpp7 varchar(255) default NULL AFTER destination_gpp6, + ADD COLUMN destination_gpp8 varchar(255) default NULL AFTER destination_gpp7, + ADD COLUMN destination_gpp9 varchar(255) default NULL AFTER destination_gpp8; diff --git a/db_scripts/diff/15107.up b/db_scripts/diff/15107.up new file mode 100644 index 00000000..b9910859 --- /dev/null +++ b/db_scripts/diff/15107.up @@ -0,0 +1,14 @@ +USE provisioning; + +select id into @vpid from voip_preference_groups where name = 'Internals'; + +insert into voip_preferences values(NULL, @vpid, 'gpp0', 'General Purpose Parameter 0', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp0 or destination_gpp0, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp1', 'General Purpose Parameter 1', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp1 or destination_gpp1, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp2', 'General Purpose Parameter 2', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp2 or destination_gpp2, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp3', 'General Purpose Parameter 3', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp3 or destination_gpp3, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp4', 'General Purpose Parameter 4', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp4 or destination_gpp4, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp5', 'General Purpose Parameter 5', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp5 or destination_gpp5, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp6', 'General Purpose Parameter 6', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp6 or destination_gpp6, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp7', 'General Purpose Parameter 7', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp7 or destination_gpp7, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp8', 'General Purpose Parameter 8', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp8 or destination_gpp8, depending on the call direction.'); +insert into voip_preferences values(NULL, @vpid, 'gpp9', 'General Purpose Parameter 9', 0, 1, 1, 0, 0, 0, now(), 0, 0, 'string', 0, 'A general purpose parameter, which is reflected in CDRs of this subscriber either as source_gpp9 or destination_gpp9, depending on the call direction.');