I got to work by commenting out the line that prints the alter table queries (having it print any short string instead of the query also works)

By watching the mysql log I can see that it completes - the page itself never refreshes, and in fact it (oddly) does not render the main content at all - just the breadcrumb and about half of the side menu. This is repeatable.

Anyhow, it's certainly strange but it seems to have worked now.