Defect #32141

Migration from 3.4.10 to 4.0.4 fail on database upgrade

Added by Xavier ANDRE almost 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Invalid Affected version:4.0.4

Description

Hello,

I'm trying to upgrade from 3.4.10 to 4.0.4 by following your procedure : [[https://www.redmine.org/projects/redmine/wiki/RedmineUpgrade]]

But at step 4, I got this error my mysql database :

bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

  class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.3/lib/active_record/migration.rb:528:in `inherited'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/acts-as-taggable-on-4.0.0/db/migrate/1_acts_as_taggable_on_migration.rb:1:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/bundler/gems/redmine_acts_as_taggable_on-0ebef70ef692/lib/redmine_acts_as_taggable_on/migration.rb:6:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/bundler/gems/redmine_acts_as_taggable_on-0ebef70ef692/lib/redmine_acts_as_taggable_on/initialize.rb:3:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/redmine-4.0.4/plugins/redmine_knowledgebase/init.rb:2:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:175:in `block in load'
/home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:166:in `each'
/home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:166:in `load'
/home/redmine/redmine-4.0.4/config/initializers/30-redmine.rb:21:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:657:in `block in load_config_initializer'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:656:in `load_config_initializer'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:613:in `each'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:613:in `block in <class:Engine>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `each'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `tsort_each_child'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
/home/redmine/redmine-4.0.4/config/environment.rb:14:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/application.rb:337:in `require'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/application.rb:337:in `require_environment!'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
/home/redmine/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
[redmine@stouredmine01 redmine-4.0.4]$ ruby bin/about
Traceback (most recent call last):
        58: from bin/about:4:in `<main>'
        57: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        56: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        55: from /home/redmine/redmine-4.0.4/config/environment.rb:14:in `<top (required)>'
        54: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
        53: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
        52: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
        51: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
        50: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
        49: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `call'
        48: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each'
        47: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
        46: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from'
        45: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `call'
        44: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `tsort_each_child'
        43: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `each'
        42: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        41: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
        40: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        39: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        38: from /home/redmine/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
        37: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
        36: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
        35: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
        34: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:613:in `block in <class:Engine>'
        33: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:613:in `each'
        32: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
        31: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:656:in `load_config_initializer'
        30: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
        29: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/railties-5.2.3/lib/rails/engine.rb:657:in `block in load_config_initializer'
        28: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
        27: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        26: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
        25: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
        24: from /home/redmine/redmine-4.0.4/config/initializers/30-redmine.rb:21:in `<top (required)>'
        23: from /home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:166:in `load'
        22: from /home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:166:in `each'
        21: from /home/redmine/redmine-4.0.4/lib/redmine/plugin.rb:175:in `block in load'
        20: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
        19: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        18: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
        17: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
        16: from /home/redmine/redmine-4.0.4/plugins/redmine_knowledgebase/init.rb:2:in `<top (required)>'
        15: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
        14: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        13: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
        12: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
        11: from /home/redmine/.rvm/gems/ruby-2.5.1/bundler/gems/redmine_acts_as_taggable_on-0ebef70ef692/lib/redmine_acts_as_taggable_on/initialize.rb:3:in `<top (required)>'
        10: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
         9: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
         8: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
         7: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
         6: from /home/redmine/.rvm/gems/ruby-2.5.1/bundler/gems/redmine_acts_as_taggable_on-0ebef70ef692/lib/redmine_acts_as_taggable_on/migration.rb:6:in `<top (required)>'
         5: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
         4: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
         3: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
         2: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
         1: from /home/redmine/.rvm/gems/ruby-2.5.1/gems/acts-as-taggable-on-4.0.0/db/migrate/1_acts_as_taggable_on_migration.rb:1:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.3/lib/active_record/migration.rb:528:in `inherited': Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: (StandardError)

  class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]

Could you help me please ?

Thanks for your kind help.
Regards,

History

#1 Updated by Marius BALTEANU almost 3 years ago

  • Status changed from New to Needs feedback

Please try without plugins because ActsAsTaggableOnMigration is not part of Redmine core. Also, you'll need to check your plugins compatibility with Redmine 4.0 and contact plugin authors if you have any issue. Here we discuss only about Redmine core.

#2 Updated by Xavier ANDRE almost 3 years ago

All my apologies ! I didn't notice is was due to a plugin.
I confirm that everything is working well after removing old plugins.

Thanks for your kind help !
Regards,

#3 Updated by Marius BALTEANU almost 3 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Xavier ANDRE wrote:

All my apologies ! I didn't notice is was due to a plugin.
I confirm that everything is working well after removing old plugins.

Thanks for your kind help !
Regards,

Thanks for your feedback!

Also available in: Atom PDF