I ran the command from step 3 on my SQL server for my Jira test database which was restored with a copy of my production database and when I run the query I get this error message:
Msg 243, Level 16, State 1, Line 1
Type next is not a defined system type.
The query I ran is:
<span>update</span> gadgetuserpreference <span>set</span> userprefvalue <span>=</span> cast<span>(</span>replace<span>(</span>cast<span>(</span>userprefvalue <span>as</span> nvarchar<span>(</span>max<span>)</span><span>)</span><span>,</span><span>'//prod.jira.base.url/'</span><span>,</span><span>'//test.jira.base.url/'</span><span>)</span> <span>as</span> <span>next</span><span>)</span> <span>where</span> userprefvalue <span>like</span> <span>'%//prod.jira.base.url/%'</span><span>;</span>
I replaced both production and test base URLs as requested