Project

General

Profile

Actions

Defect #10501

closed

migrate_from_mantis script fails on first project using sqlite3

Added by Alan Chandler over 12 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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

fix_project.patch (1.24 KB) fix_project.patch Alan Chandler, 2012-03-21 09:24

Related issues

Related to Redmine - Defect #10532: migrate_from_mantis script fails with missing table nameResolvedAlan Chandler

Actions
Actions

Also available in: Atom PDF