Deleting before insert or update