Project

General

Profile

can't upgrade redmine_agile plugin. relation "agile_ranks_pkey" does not exist

Added by Ninja Ya over 5 years ago

I am upgrading redmine-3.3 to redmine-4.0.3
database: postgresql

also, i have downloaded last plugin redmine_agile-light
migrations gives the error:

#bundle exec rake redmine:plugins:migrate RAILS_ENV=production

(eval):53: warning: key :format is duplicated and overwritten on line 53
== 4 RenameAgileRanks: migrating ==============================================
-- index_exists?(:agile_ranks, :issue_id, {:name=>"index_agile_ranks_on_issue_id"})
   -> 0.0033s
-- index_exists?(:agile_ranks, :position, {:name=>"index_agile_ranks_on_position"})
   -> 0.0017s
-- rename_table(:agile_ranks, :agile_data)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: ERROR:  relation "agile_ranks_pkey" does not exist
: ALTER INDEX "agile_ranks_pkey" RENAME TO "agile_data_pkey" 

file: 004_rename_agile_ranks.rb

class RenameAgileRanks < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
  def up
    remove_index :agile_ranks, :issue_id if index_exists? :agile_ranks, :issue_id
    remove_index :agile_ranks, :position if index_exists? :agile_ranks, :position

    rename_table :agile_ranks, :agile_data

    add_index :agile_data, :issue_id
    add_index :agile_data, :position
  end

Can someone help how to solve ?


Replies (3)

RE: can't upgrade redmine_agile plugin. relation "agile_ranks_pkey" does not exist - Added by Ninja Ya over 5 years ago

fixed, but now on project issues page:

NoMethodError (undefined method `active' for #<Array:0x00000009191ac8>
Did you mean?  acts_like?):

app/models/query.rb:828:in `project_statement'
app/models/query.rb:906:in `statement'
app/models/issue_query.rb:254:in `base_scope'
app/models/issue_query.rb:259:in `issue_count'
app/controllers/issues_controller.rb:49:in `block (2 levels) in index'
app/controllers/issues_controller.rb:47:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'


There is no error when i remove redmine_agile plugin

RE: can't upgrade redmine_agile plugin. relation "agile_ranks_pkey" does not exist - Added by Ninja Ya over 5 years ago

fixed

sed -i -e '/acts_as_colored/ s/^/#/' plugins/redmine_agile/lib/redmine_agile/patches/project_patch.rb 

RE: can't upgrade redmine_agile plugin. relation "agile_ranks_pkey" does not exist - Added by Dimitar (RedmineUP) almost 2 years ago

Dear Ninja,

This is Dimitar from the RedmineUP Support Team.

We highly appreciate the effort you put for finding the solution as well as your feedback. Glad to know that the plugin is running as expected now.

However, if any other questions or problems arise, please contact us at , thanks.

Have a great and successful day!

Ninja Ya wrote:

fixed
[...]

    (1-3/3)