merge and update trigger