Gitlab ce upgrade failed with error as PG::DuplicateColumn: ERROR: column "artifacts_file_store" of relation "ci_builds" already exists

While I am upgrading the GitLab ce on ubuntu server I am getting the following error

There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20180719-17169-q3fgbl” ----
STDOUT: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateColumn: ERROR: column “artifacts_file_store” of relation “ci_builds” already exists
: ALTER TABLE “ci_builds” ADD “artifacts_file_store” integer
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in add_column' /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb:7:in change’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load’
/opt/gitlab/embedded/bin/bundle:23:in `’

Caused by:
ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column “artifacts_file_store” of relation “ci_builds” already exists
: ALTER TABLE “ci_builds” ADD “artifacts_file_store” integer
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in add_column' /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb:7:in change’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load’
/opt/gitlab/embedded/bin/bundle:23:in `’

Caused by:
PG::DuplicateColumn: ERROR: column “artifacts_file_store” of relation “ci_builds” already exists
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in add_column' /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb:7:in change’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load’
/opt/gitlab/embedded/bin/bundle:23:in `’

1 Like

Hi,
it would be great if some one can help me on this issue.

1 Like