Gitlab ce docker upgrade from 11.11.8 to 12.X

Hello,
I recently migrated web installation of gitlab to docker and upgraded version to 11.11.8, everything went sort of smoothly, but if I want to upgrade from version 11.11.8 any version up (I tried 12.0.0 and 12.0.12) I am getting database migration errors:

ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@bjsw-srv | ESC[0m LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@bjsw-srv | ESC[0m ^
gitlab_gitlab.1.x41liwzi17e7@bjsw-srv | ESC[0m : UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@bjsw-srv | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in `up’)

Based on Database migration fails after installing the recently released GitLab 12.0.0 package on Debian stretch (#63612) · Issues · GitLab.org / GitLab FOSS · GitLab I even tried installing ee version, but there is also migration problem but with already existing columns.
I am appending logs from my update experiments:

11.11.8ce->12.0.12ce

Recipe: gitlab::database_migrationsESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | * bash[migrate gitlab-rails database] action run
gitlab_gitlab.1.x41liwzi17e7@censored | [execute] rake aborted!
gitlab_gitlab.1.x41liwzi17e7@censored | StandardError: An error has occurred, this and all later migrations canceled:
gitlab_gitlab.1.x41liwzi17e7@censored |
gitlab_gitlab.1.x41liwzi17e7@censored | PG::UndefinedColumn: ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@censored | LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ^
gitlab_gitlab.1.x41liwzi17e7@censored | : UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nod
es.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 leve
ls) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored |
gitlab_gitlab.1.x41liwzi17e7@censored | Caused by:
gitlab_gitlab.1.x41liwzi17e7@censored | ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column “url” does not exis
t
gitlab_gitlab.1.x41liwzi17e7@censored | LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ^
gitlab_gitlab.1.x41liwzi17e7@censored | : UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nod
es.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 leve
ls) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored |
gitlab_gitlab.1.x41liwzi17e7@censored | Caused by:
gitlab_gitlab.1.x41liwzi17e7@censored | PG::UndefinedColumn: ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@censored | LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ^
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 levels) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored | Tasks: TOP => db:migrate
gitlab_gitlab.1.x41liwzi17e7@censored | (See full trace by running task with --trace)
gitlab_gitlab.1.x41liwzi17e7@censored | == 20190409224933 AddNameToGeoNodes: migrating ================================
gitlab_gitlab.1.x41liwzi17e7@censored | – add_column(:geo_nodes, :name, :string)
gitlab_gitlab.1.x41liwzi17e7@censored | → 0.0008s
gitlab_gitlab.1.x41liwzi17e7@censored | – execute(“UPDATE geo_nodes SET name = url;”)
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ================================================================================ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[31mError executing action run on resource ‘bash[migrate gitlab-rails database]‘ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ================================================================================ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored |
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Mixlib::ShellOut::ShellCommandFailedESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ------------------------------------ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | Expected process to exit with [0], but received ‘1’
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ---- Begin output of “bash” “/tmp/chef-script20210320-26-1un1b3l” ----
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m STDOUT: rake aborted!
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m StandardError: An error has occurred, this and all later migrations canceled:
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m PG::UndefinedColumn: ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ^
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m : UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 levels) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Caused by:
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ^
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m : UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 levels) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Caused by:
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m PG::UndefinedColumn: ERROR: column “url” does not exist
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m LINE 1: UPDATE geo_nodes SET name = url;
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ^
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in up' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in block (3 levels) in <top (required)>’
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in load' gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m /opt/gitlab/embedded/bin/bundle:23:in
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Tasks: TOP => db:migrate
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m (See full trace by running task with --trace)
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m == 20190409224933 AddNameToGeoNodes: migrating ================================
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m – add_column(:geo_nodes, :name, :string)
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m → 0.0008s
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m – execute(“UPDATE geo_nodes SET name = url;”)
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m STDERR:
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m ---- End output of “bash” “/tmp/chef-script20210320-26-1un1b3l” ----
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Ran “bash” “/tmp/chef-script20210320-26-1un1b3l” returned 1ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored |
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m Resource Declaration:ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ---------------------ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 54: bash “migrate gitlab-rails database” do
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 55: code <<-EOH
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 56: set -e
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 57: log_file=“#{node[‘gitlab’][‘gitlab-rails’][‘log_directory’]}/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log”
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 58: umask 077
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 59: /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 60: STATUS=${PIPESTATUS[0]}
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 61: chown #{account_helper.gitlab_user}:#{account_helper.gitlab_group} ${log_file}
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 62: echo $STATUS > #{db_migrate_status_file}
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 63: exit $STATUS
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 64: EOH
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 65: environment env_variables unless env_variables.empty?
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 66: notifies :run, “execute[clear the gitlab-rails cache]”, :immediately
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 67: dependent_services.each do |svc|
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 68: notifies :restart, svc, :immediately
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 69: end
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 70: not_if “(test -f #{db_migrate_status_file}) && (cat #{db_migrate_status_file} | grep -Fx 0)”
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 71: only_if { node[‘gitlab’][‘gitlab-rails’][‘auto_migrate’] }
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 72: end
gitlab_gitlab.1.x41liwzi17e7@censored | ESC[0m 73:

11.11.8ce->12.0.12ee the same error - url does not exist
11.11.8ce->12.0.0ce the same error - url does not exist
11.11.8ce->12.0.0ee the same error - url does not exist

11.11.8ce->11.11.8ee

gitlab_gitlab.1.a3p3j6jefun5@censored | Recipe: gitlab::database_migrationsESC[0m
gitlab_gitlab.1.a3p3j6jefun5@censored | * bash[migrate gitlab-rails database] action run
gitlab_gitlab.1.a3p3j6jefun5@censored | [execute] rake aborted!
gitlab_gitlab.1.a3p3j6jefun5@censored | StandardError: An error has occurred, this and all later migrations canceled:
gitlab_gitlab.1.a3p3j6jefun5@censored |
gitlab_gitlab.1.a3p3j6jefun5@censored | PG::DuplicateColumn: ERROR: column “shared_runners_minutes” of relation “application_settings” already exists
gitlab_gitlab.1.a3p3j6jefun5@censored | : ALTER TABLE “application_settings” ADD “shared_runners_minutes” integer DEFAULT 0 NOT NULL
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/ee/db/migrate/20170106172234_add_shared_runners_minutes_to_application_settings.rb:7:in `change’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in `block (3 levels) in <top (required)>’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `load’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `’
gitlab_gitlab.1.a3p3j6jefun5@censored |
gitlab_gitlab.1.a3p3j6jefun5@censored | Caused by:
gitlab_gitlab.1.a3p3j6jefun5@censored | ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column “shared_runners_minutes” of relation “application_settings” already exists
gitlab_gitlab.1.a3p3j6jefun5@censored | : ALTER TABLE “application_settings” ADD “shared_runners_minutes” integer DEFAULT 0 NOT NULL
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/ee/db/migrate/20170106172234_add_shared_runners_minutes_to_application_settings.rb:7:in `change’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in `block (3 levels) in <top (required)>’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `load’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `’
gitlab_gitlab.1.a3p3j6jefun5@censored |
gitlab_gitlab.1.a3p3j6jefun5@censored | Caused by:
gitlab_gitlab.1.a3p3j6jefun5@censored | PG::DuplicateColumn: ERROR: column “shared_runners_minutes” of relation “application_settings” already exists
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/ee/db/migrate/20170106172234_add_shared_runners_minutes_to_application_settings.rb:7:in `change’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in `block (3 levels) in <top (required)>’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `load’
gitlab_gitlab.1.a3p3j6jefun5@censored | /opt/gitlab/embedded/bin/bundle:23:in `’
gitlab_gitlab.1.a3p3j6jefun5@censored | Tasks: TOP => db:migrate
gitlab_gitlab.1.a3p3j6jefun5@censored | (See full trace by running task with --trace)

What can I do in this situation ? How can I bypass this without losing any of the data stored in my installation ? Thank you for every answer in advance

I have resolved this issue by adding the column url to table myself, then upgrade migration finished successfuly