updated insert command generation after database update