Please see this post for more info as has been encountered before and lists steps you can use to upgrade:
going from 12.0.0 you will need to ensure you don’t go straight to 13.x otherwise you will have major problems. The link in the output you provided will help also. My link will help you with the commands required to install/upgrade to specific versions before you go to 13.x. You cannot go to 13.x until you are on 12.10.x because of the postgresql upgrade and postgres version required.
You need to check the upgrade path of which versions between 12.0.0 and 12.10.x are required. This link will help with some of that info: Upgrading GitLab | GitLab
so upgrade to 12.0.12 first, and then each of the other versions listed above should be your path to the latest version. Of course, make sure you have backups in case this fails.
Also make sure that when going between each version that you make sure that background migrations have finished. If any of them are running, keep checking until the value output is zero. Once zero it means the background migrations have finished and you can then do the next upgrade. The command to check it is in this section: Upgrading GitLab | GitLab