Upgrading Windows BItnami to CentOS Redmine (getting DB Migration error)
- RUBYGEMS VERSION: 3.0.6
- RUBY VERSION: 2.4.6 (2019-04-01 patchlevel 354) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.4.6
Redmine Version: 3.4.12
System: CentOS 7.7
Httpd: Apache 2.4.6 with Passennger
I am in the process of upgrading Redmine from 3.2.0 to 3.4.12 as per the doc/UPGRADING documentation and during DB migration I got the folowing error:
Command: bundle exec rake db:migrate RAILS_ENV="production"
Mysql2::Error: Duplicate column name 'default_status_id': ALTER TABLE `trackers` ADD `default_status_id` int(11)
I went through different documentation and many suggest to drop that column and prceed. I am not sure about it.
Later when I try to upgrade from 3.2.0 to 3.2.9, I got the same error too.
Any pointers please?
RE: Upgrading Windows BItnami to CentOS Redmine (getting DB Migration error) - Added by Dominic Prakash 3 months ago
After trying various option I was able to solve this issue.
I installed Ruby version 2.3.8
There are some difference between bitnami (windows) version 3.2.0 and the core Redmi version (3.2.0). So instead of upgrding I actually installed the "approximately" same version in my CentOS. First, separately exported the DB with and without data from both Win and new CentOS installations. I did not see any table structural differences. Next I inspected the newly installed database and checked the "INSERT" staements. There were 4 INSERT seatements noted and I removed those records manually from `users`, `email_addresses`, `roles` and `schema_migrations`. Before removing the records from `schema_migrations`, I copied the stement and replaced into the windows exported SQL with full data.
Then I imported the data into the new DB structure. Now I am able to upgrade to subsequent versions. Now I have upgraded from 3.2.0 to 3.2.9.