PG::UniqueViolation Problem during 3.1.0.beta4 upgrade

That looks like either a corrupt index or that somehow users were able to create accounts with the same username with different capitalization.

You should be able to start the old container with

./launcher start app

You can then try to reindex the table, see which user is broken, fix it, and repeat until the index will rebuild.