Defect #23268

migrate_from_trac.rake - NOT WORKING WITH trac 1.0.1

Added by Anton OG2K about 6 years ago. Updated about 6 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:-
Resolution: Affected version:3.3.0

Description

hello,

i am trying to import data from trac 1.0.1 + mysql.

there are several issues:

1.
self.inheritance_column = :none instead of set_inheritance_column :none
self.primary_key = 'name' instead of #set_primary_key :name

2.
#784 def self.trac_attachments_directory; "#{trac_directory}/files/attachments"

3.
Migrating components..................
Migrating milestones.rake aborted!
TypeError: no implicit conversion from nil to integer
/var/lib/redmine/lib/tasks/migrate_from_trac.rake:422:in `[]'
/var/lib/redmine/lib/tasks/migrate_from_trac.rake:422:in `block in migrate'
/var/lib/gems/1.9.1/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/var/lib/gems/1.9.1/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/var/lib/redmine/lib/tasks/migrate_from_trac.rake:410:in `migrate'

4.
Migrating components..................
Migrating custom fields
Migrating ticketsrake aborted!
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'defect'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite TracMigrate::TracTicket.inheritance_column to use another column for that information.
/var/lib/gems/1.9.1/gems/activerecord-4.2.6/lib/active_record/inheritance.rb:186:in `rescue in find_sti_clas

and I can not get further

please, someone can code new script for newer trac version?

migrate_from_trac_version_1.rake

many thanks


Related issues

Related to Redmine - Defect #20943: migrate_from_trac.rake dont work Resolved

History

#1 Updated by Anton OG2K about 6 years ago

+ in the beginning, when script asks which adapter (... mysql2 ...), script is expecting to receive "mysql", not "mysql2", and as adapter has mysql2 name, it is conficting with human logic.

#2 Updated by Toshi MARUYAMA about 6 years ago

  • Priority changed from Urgent to Normal

#3 Updated by Andreas Kohlbecker about 6 years ago

Please see also #20943 for improvements to the migration scripts.

#4 Updated by Toshi MARUYAMA about 6 years ago

  • Related to Defect #20943: migrate_from_trac.rake dont work added

Also available in: Atom PDF