anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
178 stars 72 forks source link

Problem with upgrading from 2.0.3 to 2.0.9 #322

Closed dalekgamma closed 1 year ago

dalekgamma commented 1 year ago

When I attempt to upgrade this plugin from 2.0.3 to 2.0.9 using the instructions from the README, which simply states that I should unzip the plugin into the plugins folder, Until now, I have simply done so, overwriting the conflicting files using "tar xvf".

I get the following error when running "bundle exec rake redmine:plugins:migrate RAILS_ENV=production"

This seems to be related to the fact that two of your migrations have the same version from different versions of the plugin:

2.0.9: ./plugins/redmine_custom_workflows/db/migrate/20150525083345_add_author_to_custom_workflows.rb

2.0.3: ./plugins/redmine_custom_workflows/db/migrate/20150525083345_add_author_and_timestamps_to_custom_workflows.rb

bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
rake aborted!
ActiveRecord::DuplicateMigrationVersionError:

Multiple migrations have the version number 20150525083345.

/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/migration.rb:1319:in `validate'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/migration.rb:1185:in `initialize'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:542:in `new'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:542:in `up'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.8.1/lib/active_record/migration.rb:1011:in `migrate'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:574:in `migrate_plugin'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:515:in `migrate'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:529:in `block in migrate'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:528:in `each'
/opt/redmine/app/redmine-4.2.10/lib/redmine/plugin.rb:528:in `migrate'
/opt/redmine/app/redmine-4.2.10/lib/tasks/redmine.rake:135:in `block (3 levels) in <top (required)>'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/bin/rake:23:in `load'
/opt/redmine/app/redmine-4.2.10/vendor/bundle/ruby/2.7.0/bin/rake:23:in `<top (required)>'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `load'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:28:in `run'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:475:in `exec'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:31:in `dispatch'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:25:in `start'
/usr/share/gems/gems/bundler-2.2.24/libexec/bundle:46:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.2.24/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.2.24/libexec/bundle:34:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
Tasks: TOP => redmine:plugins:migrate

I was able to resolve this by removing the existing plugin folder before extracting.

picman commented 1 year ago

README updated accordingly.