Potentially bad DB migration - ActiveRecord::StatementInvalid: PG::InternalError

Hi, in progress of upgrade to latest version of Gitlab docker image I get this error:

---- Begin output of /opt/gitlab/bin/gitlab-rake cache:clear ----
STDOUT: 
STDERR: rake aborted!
ActiveRecord::StatementInvalid: PG::InternalError: ERROR:  catalog is missing 2 attribute(s) for relid 17139
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"users"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/ignorable_column.rb:17:in `columns'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb:40:in `<class:User>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb:3:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/event.rb:39:in `<class:Event>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/event.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:7:in `block (2 levels) in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:32:in `block (2 levels) in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:30:in `block in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:25:in `<class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:2:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:114:in `<class:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:2:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb:12:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
PG::InternalError: ERROR:  catalog is missing 2 attribute(s) for relid 17139
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/ignorable_column.rb:17:in `columns'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb:40:in `<class:User>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb:3:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/event.rb:39:in `<class:Event>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/event.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:7:in `block (2 levels) in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:32:in `block (2 levels) in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:30:in `block in <class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:25:in `<class:Events>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:2:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/events.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:114:in `<class:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:2:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb:12:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => cache:clear => cache:clear:redis => environment
(See full trace by running task with --trace)
---- End output of /opt/gitlab/bin/gitlab-rake cache:clear ----
Ran /opt/gitlab/bin/gitlab-rake cache:clear returned 1

I get this error for all of rake tasks. Its look like bad DB migration. Can I create some DB structure checksum?