Project

General

Profile

Actions

Defect #10501

closed

migrate_from_mantis script fails on first project using sqlite3

Added by Alan Chandler almost 13 years ago. Updated almost 5 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 #1

Updated by Alan Chandler almost 13 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

Actions #2

Updated by Alan Chandler almost 13 years ago

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.

Actions #3

Updated by Alan Chandler over 12 years ago

  • Status changed from New to Resolved

The fix for this issue is contained in #10532

Actions #4

Updated by Go MAEDA almost 5 years ago

  • Related to Defect #10532: migrate_from_mantis script fails with missing table name added
Actions #5

Updated by Go MAEDA almost 5 years ago

  • Status changed from Resolved to Closed

Alan Chandler wrote:

The fix for this issue is contained in #10532

Closing this issue.

Actions

Also available in: Atom PDF