This doesn't seem like a *good* solution, but I'm not sure why sometimes this receives strings and sometimes bytes (maybe it's based on how the data is served).
To get the app working again I ran resetdb, let it crash in initdb, then ran the migration, then re-ran initdb