Redmine - Windows - Technical issue - Upgrade

Added by Fernando Silva 4 months ago

Hi All, I'm trying to upgrade my current Redmine instance 2.5.2 stable to the 4.1.0-8 version. I'm using the Bitnami package. I posted the issue on the Bitnami forum, but they told that probably, there is something else to be done, once I'm jumping to a new version, from an older one, and maybe an extra step has to be performed to migrate my DB schema.

I'm following the instructions on the page: https://docs.bitnami.com/installer/apps/redmine/administration/upgrade/ and I'm using the Bitnami Console to run my commands:

Note: No issues to get the MySQL dump file.

1 - Execute the DB restore = no issues

Microsoft Windows Version 6.2.9200 2012 Microsoft Corporation. All rights reserved.

C:\Bitnami\redmine-4.1.0-8>cd mysql\bin

C:\Bitnami\redmine-4.1.0-8\mysql\bin>mysql.exe -u root -p < bitnami_redmine.sql
Enter password: **

C:\Bitnami\redmine-4.1.0-8\mysql\bin>

2- Execute the DB migration = not working :frowning:

C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/ruby bin/rake db:migrate RAILS_ENV=production --trace
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/exe/rake:27:in <top (required)>'
bin/rake:29:inload'
bin/rake:29:in `'

Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Duplicate column name 'format_sto
re': ALTER TABLE custom_fields ADD format_store text
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:131:in _query'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:131:inblock in query'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:130:in handle_interrupt'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:130:inquery'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:187:in block (2 levels) in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/dependencies/interlock.rb:48:inblock in
permit_concurrent_loads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/concurrency/share_lock.rb:187:in yield_sh
ares'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/dependencies/interlock.rb:47:inpermit_co
ncurrent_loads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:186:in block in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:
inblock (2 levels) in log'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/monitor.rb:235:in mon_synchroniz
e'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:
inblock in log'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in instr
ument'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:
inlog'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:185:in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/mysql/database_statement
s.rb:28:inexecute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract/schema_statemen
ts.rb:581:in add_column'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:871:inblock in method_missing
'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:840:in `block in say_with_time'

C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/benchmark.rb:293:in measure'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:840:insay_with_time'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:860:in method_missing'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration/compatibility.rb:108:inadd_colum
n'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/db/migrate/20131124175346_add_cus
tom_fields_format_store.rb:3:in up'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:817:inexec_migration'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:798:in block (2 levels) in mig
rate'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/benchmark.rb:293:inmeasure'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:797:in block in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract/connection_pool
.rb:416:inwith_connection'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:796:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:977:inmigrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1292:in block in execute_migra
tion_in_transaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1345:inddl_transaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1291:in execute_migration_in_t
ransaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1263:inblock in migrate_witho
ut_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1262:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1262:inmigrate_without_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1210:in block in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1363:inwith_advisory_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1210:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1036:inup'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1011:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/tasks/database_tasks.rb:172:inmigrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/railties/databases.rake:60:in block (2 leve
ls) in <top (required)>'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:inblock in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:inexecute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:219:in block in invoke_with_call_chain'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/monitor.rb:235:inmon_synchroniz
e'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:199:in invoke_with_call_chain'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:188:ininvoke'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:160:in invoke_task'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:inblock (2 levels) in top_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:inblock in top_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:125:in run_with_threads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:110:intop_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:83:in block in run'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:186:instandard_exception_handling'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:80:in run'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/exe/rake:27:in'
bin/rake:29:in load'
bin/rake:29:in'

Caused by:
Mysql2::Error: Duplicate column name 'format_store'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:131:in _query'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:131:inblock in query'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:130:in handle_interrupt'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/mys
ql2-0.5.2-x64-mingw32/lib/mysql2/client.rb:130:inquery'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:187:in block (2 levels) in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/dependencies/interlock.rb:48:inblock in
permit_concurrent_loads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/concurrency/share_lock.rb:187:in yield_sh
ares'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/dependencies/interlock.rb:47:inpermit_co
ncurrent_loads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:186:in block in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:
inblock (2 levels) in log'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/monitor.rb:235:in mon_synchroniz
e'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:
inblock in log'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
ivesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in instr
ument'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:
inlog'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract_mysql_adapter.r
b:185:in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/mysql/database_statement
s.rb:28:inexecute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract/schema_statemen
ts.rb:581:in add_column'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:871:inblock in method_missing
'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:840:in `block in say_with_time'

C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/benchmark.rb:293:in measure'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:840:insay_with_time'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:860:in method_missing'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration/compatibility.rb:108:inadd_colum
n'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/db/migrate/20131124175346_add_cus
tom_fields_format_store.rb:3:in up'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:817:inexec_migration'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:798:in block (2 levels) in mig
rate'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/benchmark.rb:293:inmeasure'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:797:in block in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/connection_adapters/abstract/connection_pool
.rb:416:inwith_connection'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:796:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:977:inmigrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1292:in block in execute_migra
tion_in_transaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1345:inddl_transaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1291:in execute_migration_in_t
ransaction'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1263:inblock in migrate_witho
ut_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1262:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1262:inmigrate_without_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1210:in block in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1363:inwith_advisory_lock'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1210:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1036:inup'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/migration.rb:1011:in migrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/tasks/database_tasks.rb:172:inmigrate'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/act
iverecord-5.2.4.1/lib/active_record/railties/databases.rake:60:in block (2 leve
ls) in <top (required)>'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:inblock in execute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:281:inexecute'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:219:in block in invoke_with_call_chain'
C:/Bitnami/redmine-4.1.0-8/ruby/lib/ruby/2.5.0/monitor.rb:235:inmon_synchroniz
e'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:199:in invoke_with_call_chain'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/task.rb:188:ininvoke'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:160:in invoke_task'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:inblock (2 levels) in top_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:in each'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:116:inblock in top_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:125:in run_with_threads'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:110:intop_level'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:83:in block in run'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:186:instandard_exception_handling'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/lib/rake/application.rb:80:in run'
C:/Bitnami/redmine-4.1.0-8/apps/redmine/htdocs/vendor/bundle/ruby/2.5.0/gems/rak
e-13.0.1/exe/rake:27:in'
bin/rake:29:in load'
bin/rake:29:in'
Tasks: TOP => db:migrate

C:\Bitnami\redmine-4.1.0-8\apps\redmine\htdocs>

I compared the databases (2.5.2) and (4.1.0) and there are two main differences:

4.1.0-8 = new table = ar_internal_metadata
2.5.2 = removed = custom_fields

Red. Version 2.5.2 4.1.0-8
Instance SACNT846 SACNT872
agile_colors agile_colors TRUE
agile_ranks agile_ranks TRUE
?? ar_internal_metadata FALSE
attachments attachments TRUE
auth_sources auth_sources TRUE
boards boards TRUE
changes changes TRUE
changeset_parents changeset_parents TRUE
changesets changesets TRUE
changesets_issues changesets_issues TRUE
comments comments TRUE
custom_fields ??? FALSE
custom_fields_projects custom_fields_projects TRUE
custom_fields_roles custom_fields_roles TRUE
custom_fields_trackers custom_fields_trackers TRUE
custom_values custom_values TRUE
documents documents TRUE
enabled_modules enabled_modules TRUE
enumerations enumerations TRUE
groups_users groups_users TRUE
issue_categories issue_categories TRUE
issue_relations issue_relations TRUE
issue_statuses issue_statuses TRUE
issues issues TRUE
journal_details journal_details TRUE
journals journals TRUE
member_roles member_roles TRUE
members members TRUE
messages messages TRUE
news news TRUE
open_id_authentication_associations open_id_authentication_associations TRUE
open_id_authentication_nonces open_id_authentication_nonces TRUE
projects projects TRUE
projects_trackers projects_trackers TRUE
queries queries TRUE
queries_roles queries_roles TRUE
repositories repositories TRUE
roles roles TRUE
schema_migrations schema_migrations TRUE
settings settings TRUE
time_entries time_entries TRUE
tokens tokens TRUE
trackers trackers TRUE
user_preferences user_preferences TRUE
users users TRUE
versions versions TRUE
watchers watchers TRUE
wiki_content_versions wiki_content_versions TRUE
wiki_contents wiki_contents TRUE
wiki_pages wiki_pages TRUE
wiki_redirects wiki_redirects TRUE
wikis wikis TRUE
workflows workflows TRUE

This is what I got from my log file:

lib/redmine/sudo_mode.rb:65:in sudo_mode'
e[1me[35m (1.0ms)e[0m e[1me[35mSET NAMES utf8mb4, @SESSION.sql_mode = CONCAT(CONCAT(@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @SESSION.sql_auto_is_null = 0, @SESSION.wait_timeout = 2147483e[0m
e[1me[35m (27.2ms)e[0m e[1me[35mCREATE TABLEar_internal_metadata(keyvarchar(255) NOT NULL PRIMARY KEY,valuevarchar(255),created_atdatetime NOT NULL,updated_atdatetime NOT NULL)e[0m
e[1me[35m (0.6ms)e[0m e[1me[34mSELECT GET_LOCK('3681418610437180620', 0)e[0m
e[1me[35m (1.0ms)e[0m e[1me[34mSELECTschema_migrations.versionFROMschema_migrationsORDER BYschema_migrations.versionASCe[0m
Migrating to AddCustomFieldsFormatStore (20131124175346)
e[1me[35m (2.4ms)e[0m e[1me[35mALTER TABLEcustom_fieldsADDformat_storetexte[0m
e[1me[35m (0.6ms)e[0m e[1me[34mSELECT RELEASE_LOCK('3681418610437180620')e[0m
e[1me[35m (0.8ms)e[0m e[1me[35mSET NAMES utf8mb4, @SESSION.sql_mode = CONCAT(CONCAT(@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @SESSION.sql_auto_is_null = 0, @SESSION.wait_timeout = 2147483e[0m
e[1me[35m (0.4ms)e[0m e[1me[34mSELECT GET_LOCK('3681418610437180620', 0)e[0m
e[1me[35m (1.0ms)e[0m e[1me[34mSELECTschema_migrations.versionFROMschema_migrationsORDER BYschema_migrations.versionASCe[0m
Migrating to AddCustomFieldsFormatStore (20131124175346)
e[1me[35m (2.4ms)e[0m e[1me[35mALTER TABLEcustom_fieldsADDformat_store` texte[0m
e[1me[35m (0.6ms)e[0m e[1me[34mSELECT RELEASE_LOCK('3681418610437180620')e[0m

It looks like there is an issue with the custom_fields table, but I don't know how to fix it. I do have many custom fields on my old Redmine version, so I can not leave them behind.

Please, could you guys help to migrate this database file?

Thanks in advance!
Fernando Sampaio

Replies (5)

RE: Redmine - Windows - Technical issue - Upgrade - Added by Liane Hampe 4 months ago

Hi Fernando,

Unfortunately it is impossible for outsiders to find the error with your Bitnami Stack. Such major version jump is always risky.

The only thing I can recommend is to update in smaller steps. That is, go from Redmine 2.5.2 over 3.x.x to the current stable version. Moreover, if you are using plugins, it might lead to further problems.

Sorry, for having no better help for you.

Best,
Liane

RE: Redmine - Windows - Technical issue - Upgrade - Added by Fernando Silva 4 months ago

Hi Liane, this plan was in my mind, but I was crossing my fingers for a miracle command :)

I'll ask bitnami team to share with me some older version, and let see what will work.

Thank you for your help.

BR,
Fernando

RE: Redmine - Windows - Technical issue - Upgrade - Added by Liane Hampe 4 months ago

Fernando Silva wrote:

Hi Liane, this plan was in my mind, but I was crossing my fingers for a miracle command :)

Sure! We all do that. :)

Good luck!

Liane

RE: Redmine - Windows - Technical issue - Upgrade - Added by Fernando Silva 4 months ago

Hey Liane, I found a way to make it work in my environment; in summary, I had to drop some columns and tables...

ALTER TABLE custom_fields DROP format_store;
ALTER TABLE custom_fields DROP description;

DROP TABLE email_addresses;
DROP TABLE roles_managed_roles;
DROP TABLE imports;
DROP TABLE import_items;
DROP TABLE custom_field_enumerations;

Then ran the commands.

ruby bin/rake tmp:clear
ruby bin/rake db:migrate RAILS_ENV=production --trace

And it worked :)

BR
Fernando Sampaio

RE: Redmine - Windows - Technical issue - Upgrade - Added by Liane Hampe 4 months ago

Hi Fernando,

Congratulations!

Rather brutal your approach. :) But the main thing is, it works for you.

Best,
Liane

(1-5/5)