Routes in a migration?

So this is a strange request, but I’m writing a large migration
inserting a lot of content into my db. Some of the entries have a link
to another section of the site in the text column. I’d like to use the
routes that I have set up, but they aren’t available.

Any ideas how to make the routes available in the migration?