ERROR: relation does not exist after update

Hello everyone,
I use gitlab-ce with swarm and external postgresql.
I updated from 12.6 to 13.12.15 passing through the intermediate images.
I edited the gitlab.rb file
When I start gitlab and access the various gits, I see the following image:

If I go to Admin Area → Background Jobs, in error I get the following error:

ActiveRecord :: StatementInvalid: PG :: UndefinedTable: ERROR: relation "analytics_instance_statistics_measurements" does not exist LINE 8: WHERE a.attrelid = '"analytics_instance_statistics_measurem

if i run the gitlab-ctl pg-upgrade command i get the following result:

Checking for an omnibus managed postgresql: OK
Checking if postgresql ['version'] is set: OK
Checking if we already upgraded: OK
The latest version 12.6 is already running, nothing to do

while if I run the gitlab-rake command gitlab: env: info

System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.7.2p137
Gem Version: 3.1.4
Bundler Version: 2.1.4
Rake Version: 13.0.3
Redis Version: 6.0.14
Git Version: 2.31.1
Sidekiq Version: 5.2.9
Go Version: unknown

GitLab information
Version: 13.12.15
Revision: 6614e1562c6
Directory: / opt / gitlab / embedded / service / gitlab-rails
DB Adapter: PostgreSQL
DB Version: 13.6
URL: https://git.xxxx.it
HTTP Clone URL: https://git.xxx.it/some-group/some-project.git
SSH Clone URL: git@git.xxx.it: some-group / some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 13.18.1
Repository storage paths:
- default: / var / opt / gitlab / git-data / repositories
GitLab Shell path: / opt / gitlab / embedded / service / gitlab-shell
Git: / opt / gitlab / embedded / bin / git

What can I do?
This isn’t the first time I’ve upgraded and I’ve never had any problems.

Thank you all