For future generations, consolidating the behavior, as Sam suggests, is a good idea.
The import data was just a pile of JSON files courtesy of Ning. It seemed easier to do the re-categorisation using Discourse’s UI.
Following your comment I looked into accessing Discourse’s database directly. I got as far as accessing it via pgAdmin, but failed to figure out if editing topics in bulk there was easier. But it’s very late and I’ll freely admit to having no idea what I’m doing. I’ll take a look tomorrow.
Although my hunch is that what I’ll end up doing is restoring an earlier backup and starting again using the built-in bulk tools. Which is fine now that (I think) I’ve worked out a process. I was really confused earlier ![]()