ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
migrate from mantis script fails on first project with attempt to double allocate tracker id. (Bug #942)
Description
I am trying to compare redmine and chiliproject, but before I can do so I need to migrate my mantis database
The following fault in the migrate_from_mantis script is in both. I have reported it to redmine, so now I am reporting it to you.
I am including a patch which seems to fix it, but I need to warn you that I am learning ruby and rails as I go along, so I am not sure its correct.
There is also another bug, which I will report in a minute, which I don't know how to fix
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.8.15
Rack version 1.1.3
Rails version 2.3.14
Active Record version 2.3.14
Active Resource version 2.3.14
Action Mailer version 2.3.14
Active Support version 2.3.14
Application root /home/alan/dev/chiliproject
Environment production
Database adapter sqlite3
Database schema version 20120131142401
Migrating users......
rake aborted!
SQLite3::ConstraintException: columns project_id, tracker_id are not unique: INSERT INTO "projects_trackers" ("project_id", "tracker_id") VALUES (1, 1)
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/sqlite_adapter.rb:418:in `catch_schema_changes'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/sqlite_adapter.rb:186:in `insert_sql'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/has_and_belongs_to_many_association.rb:78:in `insert_record'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:119:in `<<'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:435:in `add_record_to_target_with_callbacks'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:118:in `<<'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:116:in `each'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:116:in `<<'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:141:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/transactions.rb:182:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:140:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:115:in `<<'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:272:in `migrate'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:265:in `each'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:265:in `migrate'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:508
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/var/lib/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Tasks: TOP => migrate_from_mantis => redmine:migrate_from_mantis
Migrating projects