alter table `ohrm_requestdesk_custom_field` add constraint foreign key (`section_id`) references ohrm_requestdesk_custom_field_section(`id`) on delete cascade;
ALTER TABLE `ohrm_requestdesk_custom_field` DROP FOREIGN KEY IF EXISTS `ohrm_requestdesk_custom_field_ibfk_1`;
ALTER TABLE `ohrm_requestdesk_custom_field` DROP COLUMN `form_type_id`;

-- droping unwanted columns and tables
ALTER TABLE `ohrm_request` DROP FOREIGN KEY IF EXISTS `ohrm_request_ibfk_5`;
ALTER TABLE `ohrm_request` DROP COLUMN `status_id`;

ALTER TABLE `ohrm_request` DROP FOREIGN KEY IF EXISTS `ohrm_request_ibfk_4`;
ALTER TABLE `ohrm_request` DROP COLUMN `approver_id`;


-- droping reports
DELETE FROM `ohrm_advanced_report` WHERE `unique_name`='helpdesk.requests_by_priority';
DELETE FROM `ohrm_advanced_report` WHERE `unique_name`='helpdesk.requests_by_type';
DELETE FROM `ohrm_advanced_report` WHERE `unique_name`='helpdesk.requests_by_status';
DELETE FROM `ohrm_advanced_report` WHERE `unique_name`='helpdesk.request_dashboard_summary_1';
DELETE FROM `ohrm_advanced_report` WHERE `unique_name`='helpdesk.request_closure_by_owner';
