OMG. So it was, indeed, gremlins.
Strangely, the first db:create didn’t create the multisite database, but when I ran just the db:create rake task by itself it did. And then the migration succeeded, and then it Just Worked.
And @Lilly you and your
crack me up.
I see, so something like I’d had that test database a long time and the randomly generated names started clashing with previous ones. That now makes sense. I changed my upgrade script (that does a git pull, refreshes code from all-the-plugins, checks ruby version and so one) to drop, create, migrate the test database.