mirror of https://github.com/sipwise/db-schema.git
- field separator - source cli/destination user in rewrite rule set Change-Id: I36b3f8aac206937ae94730f637394b8992275998changes/14/27614/4
parent
0d5a9ab224
commit
ea32582efc
@ -0,0 +1,16 @@
|
||||
use provisioning;
|
||||
|
||||
drop table voip_reseller_preferences;
|
||||
|
||||
begin;
|
||||
|
||||
delete from voip_preferences where attribute = "cdr_export_field_separator";
|
||||
delete from voip_preferences where attribute = "cdr_export_sclidui_rwrs";
|
||||
delete from voip_preferences where attribute = "cdr_export_sclidui_rwrs_id";
|
||||
|
||||
delete from voip_preference_groups where name = "CDR/EDR Export Settings";
|
||||
|
||||
commit;
|
||||
|
||||
alter table voip_preferences drop column reseller_pref;
|
||||
alter table voip_preferences_enum drop column reseller_pref;
|
@ -0,0 +1,53 @@
|
||||
use provisioning;
|
||||
|
||||
alter table voip_preferences add column reseller_pref tinyint(1) not null default '0' after dynamic;
|
||||
alter table voip_preferences_enum add column reseller_pref tinyint(1) default null after default_val;
|
||||
|
||||
create table voip_reseller_preferences (
|
||||
id int(11) unsigned not null auto_increment,
|
||||
reseller_id int(11) unsigned not null,
|
||||
attribute_id int(11) unsigned not null,
|
||||
value varchar(128) not null,
|
||||
modify_timestamp timestamp not null default current_timestamp on update current_timestamp,
|
||||
primary key (id),
|
||||
#key residattrid_idx (reseller_id,attribute_id),
|
||||
key attributeid_idx (attribute_id),
|
||||
constraint v_r_p_reseller_ref foreign key (reseller_id) references billing.resellers (id) on delete cascade on update cascade,
|
||||
constraint v_r_p_attributeid_ref foreign key (attribute_id) references voip_preferences (id) on delete cascade on update cascade
|
||||
) engine=InnoDB;
|
||||
|
||||
begin;
|
||||
|
||||
insert into voip_preference_groups set
|
||||
name = "CDR/EDR Export Settings";
|
||||
select last_insert_id() into @vpg_id;
|
||||
|
||||
insert into voip_preferences set
|
||||
voip_preference_groups_id = @vpg_id,
|
||||
attribute = "cdr_export_field_separator",
|
||||
label = "Field delimiter",
|
||||
description = "Field delimiter symbol used in .cdr files.",
|
||||
reseller_pref = 1,
|
||||
data_type = "string",
|
||||
max_occur = 1;
|
||||
|
||||
insert into voip_preferences set
|
||||
voip_preference_groups_id = @vpg_id,
|
||||
attribute = "cdr_export_sclidui_rwrs",
|
||||
label = "Rewrite Rule Set for Source/Destination fields",
|
||||
description = "Rewrite rule set to apply caller outbound rule to \"SOURCE_CLI\", callee outbound rule to \"DESTINATION_USER_IN\" CDR export fields.",
|
||||
reseller_pref = 1,
|
||||
internal = -1,
|
||||
data_type = "int",
|
||||
max_occur = 1;
|
||||
|
||||
insert into voip_preferences set
|
||||
voip_preference_groups_id = @vpg_id,
|
||||
attribute = "cdr_export_sclidui_rwrs_id",
|
||||
label = "Internal Rewrite Rule Set # for Source/Destination fields",
|
||||
reseller_pref = 1,
|
||||
internal = 1,
|
||||
data_type = "int",
|
||||
max_occur = 1;
|
||||
|
||||
commit;
|
Loading…
Reference in new issue