Skip to content

ERROR: column ci_commits.gl_project_id does not exist

Hi all,

After updating to 8.1.2 (Omnibus) on Ubuntu 14.04, I get a HTTP 500 after logging in on my Gitlab instance. The Rails logs show this error:

Started GET "/" for 5.79.74.235 at 2015-10-29 07:23:34 +0100
Processing by RootController#index as HTML
Read fragment views/groups/4-20141129144149970817000/projects/3-20151007073950631441000/root/index/v2.2/17a9be7e7a3312932b1dc0f6cb8338aa (0.2ms)
PG::UndefinedColumn: ERROR:  column ci_commits.gl_project_id does not exist
LINE 1: SELECT  "ci_commits".* FROM "ci_commits"  WHERE "ci_commits"...
                                                        ^
: SELECT  "ci_commits".* FROM "ci_commits"  WHERE "ci_commits"."gl_project_id" = $1 AND "ci_commits"."sha" = '766437484d370e272d4a87a4a40aa5ca72291b19' LIMIT 1
Completed 500 Internal Server Error in 46ms (ActiveRecord: 6.5ms)

ActionView::Template::Error (PG::UndefinedColumn: ERROR:  column ci_commits.gl_project_id does not exist
LINE 1: SELECT  "ci_commits".* FROM "ci_commits"  WHERE "ci_commits"...
                                                        ^
: SELECT  "ci_commits".* FROM "ci_commits"  WHERE "ci_commits"."gl_project_id" = $1 AND "ci_commits"."sha" = '766437484d370e272d4a87a4a40aa5ca72291b19' LIMIT 1):
    20: 
    21:     .project-controls
    22:       - if ci && !project.empty_repo? && project.commit
    23:         - if ci_commit = project.ci_commit(project.commit.sha) 
    24:           = link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
    25:             title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
    26:             = ci_status_icon(ci_commit) 
  app/models/project.rb:770:in `ci_commit'
  app/views/shared/projects/_project.html.haml:23:in `block in _app_views_shared_projects__project_html_haml___3556083176510368861_114724840'
  app/views/shared/projects/_project.html.haml:8:in `_app_views_shared_projects__project_html_haml___3556083176510368861_114724840'
  app/views/shared/projects/_list.html.haml:10:in `block in _app_views_shared_projects__list_html_haml___868839655584614728_113479580'
  app/views/shared/projects/_list.html.haml:8:in `_app_views_shared_projects__list_html_haml___868839655584614728_113479580'
  app/views/dashboard/projects/_projects.html.haml:11:in `_app_views_dashboard_projects__projects_html_haml__3003415766827178651_113264260'
  app/views/dashboard/projects/index.html.haml:14:in `_app_views_dashboard_projects_index_html_haml__1203613233414657712_112715160'
  app/controllers/dashboard/projects_controller.rb:9:in `index'
  app/controllers/root_controller.rb:13:in `index'

A column seems to be missing in the DB, but gitlab-ctl upgrade and gitlab-ctl reconfigure show no errors. Am I missing something?

Thanks in advance!