You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/diff/15896.up

26 lines
719 B

USE provisioning;
SET autocommit=0;
SELECT id INTO @vp_id_cdr FROM voip_preferences
WHERE attribute='cdr';
SELECT id INTO @vp_id_app FROM voip_preferences
WHERE attribute='csc_app_info';
SELECT id INTO @vp_id_admin FROM voip_preferences
WHERE attribute='admin_manage_only';
SELECT id INTO @vp_id_sound FROM voip_preferences
WHERE attribute='contract_sound_set';
SELECT id INTO @vp_id_moh FROM voip_preferences
WHERE attribute='music_on_hold';
INSERT IGNORE INTO voip_subscriber_profile_attributes (profile_id, attribute_id)
SELECT p.id, vp.id
FROM voip_subscriber_profiles p
JOIN voip_preferences vp
ON vp.id IN (@vp_id_cdr, @vp_id_app, @vp_id_admin, @vp_id_sound, @vp_id_moh);
COMMIT;