diff --git a/db_scripts/diff/15575.down b/db_scripts/diff/15575.down new file mode 100644 index 00000000..04cc67a0 --- /dev/null +++ b/db_scripts/diff/15575.down @@ -0,0 +1,8 @@ +USE provisioning; +set autocommit = 0; + +SELECT id INTO @pref_id FROM voip_preferences WHERE attribute='outbound_pai_display'; +DELETE FROM voip_preferences_enum WHERE preference_id=@pref_id; +DELETE FROM voip_preferences WHERE id=@pref_id; + +COMMIT; diff --git a/db_scripts/diff/15575.up b/db_scripts/diff/15575.up new file mode 100644 index 00000000..f06dac20 --- /dev/null +++ b/db_scripts/diff/15575.up @@ -0,0 +1,29 @@ +USE provisioning; +set autocommit = 0; + +SELECT id INTO @vpgid FROM voip_preference_groups WHERE name = 'Number Manipulations'; + +INSERT INTO voip_preferences +(voip_preference_groups_id, attribute, type, max_occur, usr_pref, prof_pref, dom_pref, peer_pref, contract_pref, modify_timestamp, internal, data_type, expose_to_customer, read_only, label, description) +VALUES +(@vpgid, 'outbound_pai_display', 0, 1, 1, 1, 1, 1, 0, '1970-01-01 00:00:00', 0, 'enum', 0, 0, 'Outbound PAI Display-Name Field', 'The content to put into the PAI display-name for outbound calls'); + +SELECT last_insert_id() INTO @pref_id; + +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, prof_pref, peer_pref, contract_pref, contract_location_pref, default_val) +VALUES +(@pref_id, 'None', NULL, 0, 1, 1, 1, 0, 0, 1), +(@pref_id, 'None', 'none', 1, 0, 0, 0, 0, 0, 0), +(@pref_id, 'use domain default', NULL, 1, 0, 0, 0, 0, 0, 1), +(@pref_id, 'Network-Provided-Number', 'npn', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'User-Provided-Number', 'upn', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'Authentication-User', 'auth_user', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'Received Display-name', 'rcv_display', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'UPRN (if set) or Network-Provided-Number', 'uprn/npn', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'UPRN (if set) or User-Provided-Number', 'uprn/upn', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'UPRN (if set) or Authentication-User', 'uprn/auth_user', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'UPRN (if set) or Received Display-name', 'uprn/rcv_display', 1, 1, 1, 1, 0, 0, 0), +(@pref_id, 'Network-Provided Display-name', 'np_display', 1, 1, 1, 1, 0, 0, 0); + +COMMIT;