I agree doing this via the API is definitely the way to do it. Direct MySQL data manipulation is discouraged in most cases, although there are certainly times when that is necessary.
Just a question, but do you know the policy IDs or exact names of all the policies you need to edit? If not, I wonder if a similar sql query could grab all the policies that use that custom trigger. Maybe something like select policies where trigger_manual='somename' I don't know much about proper mysql queries, so that's just a wild guess. If it does get you the policy IDs, you could use them in a script by dropping all the IDs into an array to loop over. Here's an example that could do this
#!/bin/bash
apiUser="apiusername"
apiPass="apipassword"
jssURL="https://your.jss.url"
new_custom_trigger="somename2"
POLICYIDS=(
10
20
30
40
)
function update_policy_trigger ()
{
echo "Editing policy ID: $ID"
cat << EOD > /tmp/$ID.xml
<policy><general><trigger_other>$new_custom_trigger</trigger_other></general></policy>
EOD
/usr/bin/curl -sfku "${apiUser}:${apiPass}" "${jssURL}/JSSResource/policies/id/$ID" -T /tmp/$ID.xml -X PUT
if [ $? == 0 ]; then
echo -e "
Policy $ID edited successfully"
rm /tmp/$ID.xml
else
echo -e "
Policy $ID could not be edited"
rm /tmp/$ID.xml
fi
}
while read ID; do
update_policy_trigger
done < <(printf '%s
' "${POLICYIDS[@]}")