Scripts to permanently delete irrelevant Data Import profiles

MODDICONV-335 - Getting issue details... STATUS

Usually profiles are only marked as deleted and not deleted permanently. In case something goes wrong while deleting the associations between the profiles, deleting (marking deleted) those profiles is not possible from UI. To delete profiles the following scripts can be used (please note that these scripts are only relevant to releases prior to Poppy)

-- profiles associations:
-- delete profileAssociation from job_to_match_profiles table
DELETE FROM {tenantId}_mod_di_converter_storage.job_to_match_profiles
WHERE masterprofileid IN ('{job_profile_UUID_1}', '{job_profile_UUID_2}')
   OR detailprofileid IN ('{match_profile_UUID_1}', '{match_profile_UUID_2}');

-- delete profileAssociation from job_to_action_profiles table
DELETE
FROM {tenantId}_mod_di_converter_storage.job_to_action_profiles
WHERE masterprofileid IN ('{job_profile_UUID_1}', '{job_profile_UUID_2}')
   OR detailprofileid IN ('{action_profile_UUID_1}', '{action_profile_UUID_2}');

-- delete profileAssociation from match_to_action_profiles table
DELETE FROM {tenantId}_mod_di_converter_storage.match_to_action_profiles
WHERE masterprofileid IN ('{match_profile_UUID_1}', '{match_profile_UUID_2}')
   OR detailprofileid IN ('{action_profile_UUID_1}', '{action_profile_UUID_2}');

-- delete profileAssociation from match_to_match_profiles table
DELETE FROM {tenantId}_mod_di_converter_storage.match_to_match_profiles
WHERE masterprofileid IN ('{match_profile_UUID_1}', '{match_profile_UUID_2}')
   OR detailprofileid IN ('{match_profile_UUID_1}', '{match_profile_UUID_2}');

-- delete profileAssociation from action_to_mapping_profiles table
DELETE FROM {tenantId}_mod_di_converter_storage.action_to_mapping_profiles
WHERE masterprofileid IN ('{action_profile_UUID_1}', '{action_profile_UUID_2}')
   OR detailprofileid IN ('{mapping_profile_UUID_1}', '{mapping_profile_UUID_2}');


-- mapping_profiles:
-- delete mappingProfiles
DELETE FROM {tenantId}_mod_di_converter_storage.mapping_profiles
WHERE id IN ('{mapping_profile_UUID_1}', '{mapping_profile_UUID_2}');

-- action_profiles:
-- delete actionProfiles
DELETE FROM {tenantId}_mod_di_converter_storage.action_profiles
WHERE id IN ('{action_profile_UUID_1}', '{action_profile_UUID_2}');

-- match_profiles:
-- delete matchProfiles
DELETE FROM {tenantId}_mod_di_converter_storage.match_profiles
WHERE id IN ('{match_profile_UUID_1}', '{match_profile_UUID_2}');

-- job_profiles:
-- delete jobProfiles
DELETE FROM {tenantId}_mod_di_converter_storage.job_profiles
WHERE id IN ('{job_profile_UUID_1}', '{job_profile_UUID_2}');