ilya-maltsev / access_tickets

Access Rights Manager based on Redmine - учет прав доступа к ресурсам
http://www.redmine.org/plugins/access_tickets
GNU General Public License v3.0
6 stars 5 forks source link

ActiveRecord::DuplicateMigrationNameError: CreateIAccesses #2

Closed pr0l closed 5 years ago

pr0l commented 5 years ago

Greetings. When installing the plugin error comes out

$ bundle exec rake redmine: plugins: migrate name = access_tickets RAILS_ENV = production Migrating a_common_libs (A common libraries) ... Migrating access_tickets (Access tickets) ... rake aborted! ActiveRecord :: DuplicateMigrationNameError:

Multiple migrations have the name CreateIAccesses

/opt/redmine/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/migration.rb:1017:in validate ' /opt/redmine/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/migration.rb:923:ininitialize ' /opt/redmine/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in new ' /opt/redmine/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:inup ' /opt/redmine/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in migrate ' /opt/redmine/redmine/lib/redmine/plugin.rb:481:inmigrate_plugin ' /opt/redmine/redmine/lib/redmine/plugin.rb:453:in migrate ' /opt/redmine/redmine/lib/redmine/plugin.rb:467:inblock in migrate ' /opt/redmine/redmine/lib/redmine/plugin.rb:466:in each ' /opt/redmine/redmine/lib/redmine/plugin.rb:466:inmigrate ' /opt/redmine/redmine/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)> ' /opt/redmine/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/exe/rake:27:in<top (required)> ' /opt/redmine/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in eval ' /opt/redmine/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in

' Tasks: TOP => redmine: plugins: migrate (See full trace by running task with --trace)

as I understand it, either CreateIAccesses is duplicated with another plugin, or a replacement of the name CreateIAccesses2 can help.

pr0l commented 5 years ago

I had to sort out the problem myself. I deleted files names that started 40XX in the access_tickets / db / migrate / folder as they duplicated files that started with the name 1XXX After that, everything was fixed without errors.