Changed 'query' datatype to text