Database migration from Redmine 3.2.9 to 5.0.4
Added by Cédric HATEM almost 2 years ago
Hello Guys,
I'm trying to migration an old Redmine 3.2.9 to the latest version of branch 5.
I'm stopped at database migration step.
I've solved a few errors but I'm now blocked by "Mysql2::Error: Duplicate column name 'updated_on'" errors.
The issue is that I don't know which tables is it refering to.
Do you know how I can manage this migration ?
Thanks & regards.
Cédric
Replies (2)
RE: Database migration from Redmine 3.2.9 to 5.0.4 - Added by Cédric HATEM almost 2 years ago
Found... I forgot to set the config/configuration.yml file
But now I face new issue... the database schema is not migrated or not fully migrated. I'm editing table after table to make it consistant with new schema.
I've recreate the table auth_sources. But when I'm trying to create a new auth source I got :
I, [2022-12-06T09:38:40.131546 #27802] INFO -- : [ec16fe3c-97ed-46bf-be58-09271b3a72c4] Completed 500 Internal Server Error in 24ms (ActiveRecord: 1.6ms | Allocations: 4955)
F, [2022-12-06T09:38:40.132316 #27802] FATAL -- : [ec16fe3c-97ed-46bf-be58-09271b3a72c4]
[ec16fe3c-97ed-46bf-be58-09271b3a72c4] NoMethodError (undefined method `verify_peer=' for #<AuthSourceLdap id: nil, type: "AuthSourceLdap", name: "test", host: "172.16.21.12", port: 936, account: nil, account_password: [FILTERED], base_dn: nil, attr_login: nil, attr_firstname: nil, attr_lastname: nil, attr_mail: nil, onthefly_register: false, tls: false, filter: nil, timeout: nil>):
[ec16fe3c-97ed-46bf-be58-09271b3a72c4]
[ec16fe3c-97ed-46bf-be58-09271b3a72c4] app/models/auth_source_ldap.rb:134:in `ldap_mode='
[ec16fe3c-97ed-46bf-be58-09271b3a72c4] lib/redmine/safe_attributes.rb:90:in `safe_attributes='
Do you know How I can solve that ?
Thanks
RE: Database migration from Redmine 3.2.9 to 5.0.4 - Added by Cédric HATEM almost 2 years ago
The solution is :
drop table imports;
drop table import_items;
ALTER TABLE tokens DROP COLUMN updated_on;
drop table custom_field_enumerations;
Before bundle exec rake db:migrate RAILS_ENV=production