fix update database bug for sqlite