Verplaatsen van een site die Discourse-integraties gebruikt voor opmerkingen

I dealt with something similar to this recently. In that case the site had gone ahead and changed the domain of their blog. The result of doing that was that duplicate topics were created on Discourse for any of their blog posts that had already generated Discourse topics.

The solution was to run a script from the site’s Rails console to find all TopicEmbed entries that had an embed_url on the old domain. Those embed_url values were then updated to the correct domain after deleting the TopicEmbed entry for the duplicate topic. The new topics that had been generated were then deleted.

This seems like a difficult way to solve the issue. I can post details about the script that I used, but it would be great to hear if anyone else has ideas about how to approach the problem. It’s something that is bound to come up from time to time with embedded topics.