This migration is working smoothly now, based on the latest commit:
https://github.com/discourse/discourse/pull/12062