MySQL migration error on upgrade
Summary
On upgrading from 9.2 to 9.3+ customers using MySQL are getting errors with migrations.
What is the current bug behavior?
On upgrade, an error such as the following appears:
= 20170503140202 TurnNestedGroupsIntoRegularGroupsForMysql: migrating ========
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
undefined method `plan' for #<Group:0x007f52ebe98c80>/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb:56:in `block in up'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb:28:in `up'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
NoMethodError: undefined method `plan' for #<Group:0x007f52ebe98c80>
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb:56:in `block in up'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb:28:in `up'
/opt/gitlab/embedded/bin/bundle:22:in `load'
What is the expected correct behavior?
A normal upgrade without errors.
Relevant logs and/or screenshots
See above.
Example tickets
- https://gitlab.zendesk.com/agent/tickets/80888
- https://gitlab.zendesk.com/agent/tickets/81233
- https://gitlab.zendesk.com/agent/tickets/80609
/cc @yorickpeterse @cpallares @dblessing
Edited by Harish Ramachandran