sql update and models update