Upgrading from GitLab v7.8.4 to v7.9.0 does not run all migrations
I just did a quick upgrade to v7.9.0 using omnibus (sudo gitlab-ctl reconfigure
), and I saw this 502 error:
NoMethodError (undefined method `push_events=' for #<GitlabIssueTrackerService:0x0000000ca46918>):
app/models/project.rb:329:in `default_issue_tracker'
app/controllers/application_controller.rb:190:in `add_gon_variables'
It turns out that v7.8.4 advances the DB migration ahead and skips over a number of migrations:
# sudo -u gitlab-psql psql -h /tmp -d gitlabhq_production (wd: /opt/gitlab/embedded/service/gitlab-rails/app/models)
gitlabhq_production=# select * from schema_migrations order by version;
<snip>
20150211172122
20150211174341
20150213104043
20150213114800
20150213121042
20150306023106
20150306023112
Notice that everything between 20150213 and 20130306 is missing (e.g. 20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
).