update the sql script