Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7682

Closed
Open
Created Sep 03, 2014 by Administrator@rootOwner

Database migration issues: 7.1.0 omnibus -> 7.2.1 omnibus

Created by: iiSeymour

Upgrading from 7.1.0 omnibus to 7.2.1 omnibus on Ubuntu 14.04 cause a 500 when visiting explore/projects/starred

PG::Error: ERROR:  column "star_count" does not exist
LINE 1: ...R projects.visibility_level IN (20,10))  ORDER BY star_count...
                                                             ^
: SELECT  "projects".* FROM "projects"  WHERE (projects.id IN (3) OR projects.visibility_level IN (20,10))  ORDER BY star_count DESC LIMIT 10 OFFSET 0
Completed 500 Internal Server Error in 26ms

ActionView::Template::Error (PG::Error: ERROR:  column "star_count" does not exist
LINE 1: ...R projects.visibility_level IN (20,10))  ORDER BY star_count...
                                                             ^
: SELECT  "projects".* FROM "projects"  WHERE (projects.id IN (3) OR projects.visibility_level IN (20,10))  ORDER BY star_count DESC LIMIT 10 OFFSET 0):
     5:   %hr
     6:   .public-projects
     7:     %ul.bordered-list
     8:       = render @starred_projects
     9: 
    10:   = paginate @starred_projects, theme: 'gitlab'
  app/views/explore/projects/starred.html.haml:8:in `_app_views_explore_projects_starred_html_haml___3471824508874624776_44270200'

And for /{{user}}/{{project}}

Started GET "/{{user}}/{{project}}" for 127.0.0.1 at 2014-09-03 22:24:04 +0100
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"{{user}}/{{project}}"}
PG::Error: ERROR: relation "users_star_projects" does not exist
LINE 5: WHERE a.attrelid = '"users_star_projects"'::r...
^
: 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_star_projects"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Completed 500 Internal Server Error in 33ms
ActiveRecord::StatementInvalid (PG::Error: ERROR: relation "users_star_projects" does not exist
LINE 5: WHERE a.attrelid = '"users_star_projects"'::r...
^
: 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_star_projects"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):
app/models/user.rb:526:in `starred?'
app/controllers/projects_controller.rb:63:in `show'

I followed the upgrade guide at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md. Looks like a database migration issue. Any ideas?

Assignee
Assign to
Time tracking