Upgrade from 3.0.0-buster to production-buster (3.1.0) failed

In case anybody get stuck there answer is https://github.com/Chocobozzz/PeerTube/issues/4172 (with the « ; » at the end of the update).

Most likely you arrived there due to a messed up update (e.g 3.0 to 3.4) requiring a PostgreSQL update, for that you can check Issues when upgrading from Peertube 2.4 to 3.1 - #4 par utopiah