What I’d do is look at the import script that imports the likes to see what it does to add the likes then do that in the rails console. I’m fairly certain it’s a PostAction.
I’m fairly certain that there is not such a rake command, as it’s a fairly unusual request (mostly, I’d just re-run the import script), but I haven’t looked.