Index: lib/tasks/migrate_from_trac.rake =================================================================== --- lib/tasks/migrate_from_trac.rake (revision 4425) +++ lib/tasks/migrate_from_trac.rake (working copy) @@ -167,7 +167,7 @@ has_many :attachments, :class_name => "TracAttachment", :finder_sql => "SELECT DISTINCT attachment.* FROM #{TracMigrate::TracAttachment.table_name}" + " WHERE #{TracMigrate::TracAttachment.table_name}.type = 'ticket'" + - ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{id}\'' + ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{TracMigrate::TracAttachment.connection.quote_string(id.to_s)}\'' has_many :customs, :class_name => "TracTicketCustom", :foreign_key => :ticket def ticket_type @@ -207,7 +207,7 @@ has_many :attachments, :class_name => "TracAttachment", :finder_sql => "SELECT DISTINCT attachment.* FROM #{TracMigrate::TracAttachment.table_name}" + " WHERE #{TracMigrate::TracAttachment.table_name}.type = 'wiki'" + - ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{id}\'' + ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{TracMigrate::TracAttachment.connection.quote_string(id.to_s)}\'' def self.columns # Hides readonly Trac field to prevent clash with AR readonly? method (Rails 2.0)