Defect #10501
closedmigrate_from_mantis script fails on first project using sqlite3
0%
Description
The script fails when starting the migration. See below for a trace of the failure. I have discussed much more of my findings here http://www.redmine.org/boards/2/topics/29592
Migrating users......
rake aborted!
SQLite3::SQLException: columns project_id, tracker_id are not unique: INSERT INTO "projects_trackers" ("project_id", "tracker_id") VALUES (1, 1)
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:418:in `catch_schema_changes'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:186:in `insert_sql'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb:78:in `insert_record'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:119:in `<<'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:435:in `add_record_to_target_with_callbacks'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:118:in `<<'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:116:in `each'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:116:in `<<'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:141:in `transaction'
/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/associations/association_collection.rb:140:in `transaction'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:115:in `<<'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:274:in `migrate'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:267:in `each'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:267:in `migrate'
/var/www/redmine/lib/tasks/migrate_from_mantis.rake:510
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28
Files
Related issues
Updated by Alan Chandler over 12 years ago
Sorry forgot to add redmine version is 1.3.2 but the bug report wouldn't let me choose that. The rest of my environment is...
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.7
Rack version 1.1.2
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
Edge Rails revision unknown
Application root /var/www/redmine
Environment production
Database adapter sqlite3
Database schema version 20110902000000
Updated by Alan Chandler over 12 years ago
- File fix_project.patch fix_project.patch added
I think this patch fixes this particular issue. However the migration process doesn't get much further before a further problem which I will report separately.
Updated by Alan Chandler over 12 years ago
- Status changed from New to Resolved
The fix for this issue is contained in #10532
Updated by Go MAEDA over 4 years ago
- Related to Defect #10532: migrate_from_mantis script fails with missing table name added
Updated by Go MAEDA over 4 years ago
- Status changed from Resolved to Closed