update history while insert

update history while insert