constraint query change