DELETE FROM times WHERE
times.shipcall_id IN
(
	SELECT s.id FROM shipcall s
    JOIN shipcall_participant_map spm ON s.id = spm.shipcall_id
    JOIN participant p ON spm.participant_id = p.id
    WHERE p.id = 10
);

DELETE `history` FROM `history`
JOIN shipcall s on `history`.shipcall_id = s.id
JOIN shipcall_participant_map spm ON s.id = spm.shipcall_id
WHERE spm.participant_id = 10;

-- damit das hier funktioniert muss der FK in shipcall_participant_map von "RESTRICT" auf "SET NULL" 
-- geändert werden

DELETE shipcall FROM shipcall
INNER JOIN shipcall_participant_map spm ON shipcall.id = spm.shipcall_id
JOIN participant p ON spm.participant_id = p.id
WHERE p.id = 10;

DELETE FROM shipcall_participant_map WHERE participant_id = 10;