CORE-5772: updated the job deletion endpoints to work with the new database structure