Project

General

Profile

Migrate Mantis 1.1.4 to Redmine 0.9.3

Added by Олег Бахтин over 14 years ago

Where error?

All the fields filled in DB mantis-migrate.mantis_user_table.

Code:
Migrating usersiog@file-storage:/var/www/redmine$ rake redmine:migrate_from_mantst --trace
(in /var/www/redmine)
  • Invoke redmine:migrate_from_mantis (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:migrate_from_mantis

WARNING: Your Redmine data will be deleted during this process.
Are you sure you want to continue ? [y/N] y

Please enter settings for your Mantis database
adapter [mysql]:
host [localhost]: server
database [bugtracker]: mantis-migrate
username [root]:
password []:
encoding [UTF-8]: cp1251

rake aborted!
Validation failed: Firstname can't be blank
/var/www/redmine/vendor/rails/activerecord/lib/active_record/validations.rb:1090:in `save_without_dirty!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/dirty.rb:87:in `save_without_transactions!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in `save!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in `save!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in `save!'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:260:in `migrate'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:251:in `each'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:251:in `migrate'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:516
/usr/lib/ruby/1.8/rake.rb:617:in `call'
/usr/lib/ruby/1.8/rake.rb:617:in `execute'
/usr/lib/ruby/1.8/rake.rb:612:in `each'
/usr/lib/ruby/1.8/rake.rb:612:in `execute'
/usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:564:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2005:in `each'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1999:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1977:in `run'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1974:in `run'
/usr/bin/rake:28


Replies (1)

RE: Migrate Mantis 1.1.4 to Redmine 0.9.3 - Added by Takashi Kokawa over 14 years ago

Hello,

I had faced to the same problem.

It seems occured by character encoding setting problem of mysql client.

I fixed the migration script (lib\tasks\migrate_from_mantis.rake) like bellow,

line:484

  # Default Mantis database settings
  db_params = {:adapter => 'mysql', 
               :database => 'bugtracker', 
               :host => 'localhost', 
               :username => 'root', 
               :password => '' ,
               :encoding => 'utf8'}  # <- add this

    (1-1/1)