commit transaction after delete, before insert