When I try to upgrade, the new docker image fails with: PG::UndefinedColumn: ERROR: column "cache_invalidation_event_id" referenced in foreign key constraint does not exist
I initially tried to upgrade from 11.11.1-ce.0 to 12.0.1-ce.0. When that failed, I went restored from backup and upgraded 11.11.1-ce.0 -> 11.11.2-ce.0 -> 11.11.3-ce.0 successfully, but encountered the same error when I tried to jump to 12.0.0-ce.0.
It appears to be caused by changes made when we tried out Enterprise Edition back on version 7 (or maybe 8?). This post has the right idea for fixing it, but it appears I have quite a few more missing columns than them. As of yet haven’t had the time to track them all down, but I will post again once I have a working command.
I am not sure if this is the same issue, but when upgrading from 11.11.5 to 12.0.0 on Debian 9, the upgrade process fails with the following:
PG::UndefinedColumn: ERROR: column "url" does not exist
LINE 1: UPDATE geo_nodes SET name = url;
^
: UPDATE geo_nodes SET name = url;
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20190409224933_add_name_to_geo_nodes.rb:17:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Caused by:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "url" does not exist
LINE 1: UPDATE geo_nodes SET name = url;
It could be. That is one of the errors I have encountered as I have tried to fix mine. Unfortunately, progress has been slow as the upgrade hasn’t been deemed “critical” so I’ve had to poke at it in my off hours.
So, after going through twenty or so fields with no end in sight, I started looking for another way. As I searched, I stumbled across a blog post that recommended going up to 11.11.5-ce.0, then jumping to 11.11.5-ee.0 before going to 12.0.0-ce.0 and onwards.