#3880 workflow sql fix