Script to delete duplicated mapping rules by record type:
Delete duplicated mapping rules
DELETE FROM diku_mod_source_record_manager.mapping_rules a USING diku_mod_source_record_manager.mapping_rules b WHERE a.id < b.id AND a.record_type = b.record_type RETURNING a.id, a.record_type;