clean pivot table on record deletion