diff --git a/db_scripts/diff/15362.down b/db_scripts/diff/15362.down new file mode 100644 index 00000000..3b809e7b --- /dev/null +++ b/db_scripts/diff/15362.down @@ -0,0 +1,8 @@ +USE provisioning; +set autocommit = 0; + +SELECT id INTO @pref_id FROM voip_preferences WHERE attribute='callrecording_type'; +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/15362.up b/db_scripts/diff/15362.up new file mode 100644 index 00000000..5085578a --- /dev/null +++ b/db_scripts/diff/15362.up @@ -0,0 +1,17 @@ +use provisioning; +set autocommit=0; + +SELECT id into @vpg_id FROM voip_preference_groups where name = 'Applications'; + +INSERT INTO voip_preferences (voip_preference_groups_id, attribute, label, type, max_occur, usr_pref, prof_pref, dom_pref, peer_pref, contract_pref, modify_timestamp, internal, expose_to_customer, data_type, read_only, description) +VALUES + (@vpg_id, 'callrecording_type', 'Call Recording Type', 0, 1, 0, 0, 1, 0, 0, NOW(), 0, 0, 'enum', 0, 'Use integrated call recording functionality or notify external call recording server by providing SIP header specified in \'rtpproxy.recording.add_header_for_external_callrecording\' config.yml key'); +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, default_val) +VALUES +(@pref_id, 'Internal', 'internal', 0, 1, 0, 0, 0, 1), +(@pref_id, 'External', 'external', 0, 1, 0, 0, 0, 0); + +commit;